Improve integration of acceptance tests (#7)

Do not handle necessary processes ourself.
Instead use codeception extension.

Wrap strings in yaml to ensure they are not interpreted as something
else.
This commit is contained in:
Daniel Siepmann 2022-10-20 08:45:56 +02:00 committed by GitHub
parent 46922636d6
commit 5170c5445b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 25 deletions

View file

@ -1,21 +1,20 @@
namespace: WerkraumMedia\Watchlist\Tests\Acceptance\Support namespace: 'WerkraumMedia\Watchlist\Tests\Acceptance\Support'
paths: paths:
tests: Tests/Acceptance tests: 'Tests/Acceptance'
data: Tests/Acceptance/Data data: 'Tests/Acceptance/Data'
output: .Build/web/typo3temp/var/tests/AcceptanceReports output: '.Build/web/typo3temp/var/tests/AcceptanceReports'
support: Tests/Acceptance/Support support: 'Tests/Acceptance/Support'
extensions:
enabled:
- Codeception\Extension\RunFailed
suites: suites:
acceptance: acceptance:
actor: AcceptanceTester actor: 'AcceptanceTester'
path: . path: '.'
extensions: extensions:
enabled: enabled:
- 'Codeception\Extension\RunProcess':
- 'geckodriver > Tests/Acceptance/_output/geckodriver.log 2>&1'
- 'TYPO3_PATH_APP="$INSTANCE_PATH" TYPO3_PATH_ROOT="$INSTANCE_PATH" php -S 127.0.0.1:8080 -t "$INSTANCE_PATH" > Tests/Acceptance/_output/php.log 2>&1'
- WerkraumMedia\Watchlist\Tests\Acceptance\Support\Environment: - WerkraumMedia\Watchlist\Tests\Acceptance\Support\Environment:
typo3DatabaseUsername: 'testing' typo3DatabaseUsername: 'testing'
typo3DatabasePassword: 'testing' typo3DatabasePassword: 'testing'

View file

@ -59,22 +59,10 @@ let
text = '' text = ''
project-install project-install
_instance_path="$PROJECT_ROOT/.Build/web/typo3temp/var/tests/acceptance/" export INSTANCE_PATH="$PROJECT_ROOT/.Build/web/typo3temp/var/tests/acceptance/"
mkdir -p "$_instance_path" mkdir -p "$INSTANCE_PATH"
geckodriver > /dev/null 2>&1 &
_pid_geckodriver=$!
TYPO3_PATH_APP="$_instance_path" \
TYPO3_PATH_ROOT="$_instance_path" \
php -S 127.0.0.1:8080 -t "$_instance_path" > /dev/null 2>&1 &
_pid_php=$!
./vendor/bin/codecept build
./vendor/bin/codecept run ./vendor/bin/codecept run
kill "$_pid_geckodriver" "$_pid_php"
''; '';
}; };