neam / codeception-saucelabs-metadata
Codeception extension that provides metadata to Saucelabs when running tests
Installs: 1 678
Dependents: 2
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 4
Open Issues: 2
Requires
- php: >=5.3.3
- sauce/sausage: ~0.11
Requires (Dev)
- codeception/codeception: >=2.0.2
This package is not auto-updated.
Last update: 2024-11-23 16:52:08 UTC
README
Codeception extension that provides metadata to Saucelabs when running tests.
Requirements
- A Saucelabs account
- A Codeception acceptance testing suite that is configured to run tests against Saucelabs
- Codeception >= 2.0.2
Installation
- 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"
Testing this extension
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.