Codeception extension that provides metadata to Saucelabs when running tests.
Modified by Datalink to have the correct include path to vendor/autoload.php
- A Saucelabs account
- A Codeception acceptance testing suite that is configured to run tests against Saucelabs
- Codeception >= 2.0.2
- Install Codeception via Composer
- Run
composer require neam/codeception-saucelabs-metadata dev-develop
- Include the extension into
codeception.yml
configuration:
Sample configuration:
paths:
tests: tests
log: tests/_log
data: tests/_data
helpers: tests/_helpers
extensions:
enabled:
- Codeception\Extension\SaucelabsMetadata
config:
Codeception\Extension\SaucelabsMetadata:
username: "foouser"
accesskey: "secretavbcde1234"
build: "Shows up in the Build column in the Saucelabs dashboard"
tags: "shows up,in the tags column,in the saucelabs dashboard"
Run the following from the same directory as this README (change the access details accordingly):
composer install
vendor/bin/codecept bootstrap
vendor/bin/codecept generate:cept acceptance ExampleTest
export SAUCE_USERNAME="changeme"
export SAUCE_ACCESS_KEY="changeme"
export SAUCE_METADATA_BUILD="foo"
export SAUCE_METADATA_TAGS="foo,bar,zoo"
export SELENIUM_HOST=$SAUCE_USERNAME:$SAUCE_ACCESS_KEY@ondemand.saucelabs.com
export SELENIUM_PORT=80
erb extension-testing/codeception.yml.erb > codeception.yml
erb extension-testing/acceptance.suite.yml.erb > tests/acceptance.suite.yml
cp extension-testing/*Cept.php tests/acceptance/
vendor/bin/codecept run acceptance
Verify in your Saucelabs dashboard that the tests show up properly.