Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edmondscommerce/behat-zalenium-context
A Behat Context for integrating with Zalenium and allowing split videos for test scenarios
https://github.com/edmondscommerce/behat-zalenium-context
Last synced: about 2 months ago
JSON representation
A Behat Context for integrating with Zalenium and allowing split videos for test scenarios
- Host: GitHub
- URL: https://github.com/edmondscommerce/behat-zalenium-context
- Owner: edmondscommerce
- Created: 2018-10-02T13:21:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-10T10:42:00.000Z (almost 5 years ago)
- Last Synced: 2024-04-22T20:06:45.736Z (8 months ago)
- Language: PHP
- Homepage: https://www.edmondscommerce.co.uk/
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Behat Zalenium Context
## By [Edmonds Commerce](https://www.edmondscommerce.co.uk)A Behat Context for integrating with Zalenium and allowing split videos for test scenarios
The context passes message to Zalenium through the use of Browser cookies:
* To indicate test pass and failure
* Add current step message to output video
* Some error handling## Requirements
* PHP7.0+
* Using Zalenium (based on Selenium 3)
* Docker (for Zalenium to run)
* Using Chrome in automated tests## Installation
Install via composer -
```bash
composer require edmondscommerce/behat-zalenium-context:dev-master@dev
```*if you are using this in your main repository we suggest add this as a dev dependency with the `--dev` flag*
## Configuration
### Use ZaleniumExtension
Replace the `MinkExtension` in your `behat.yml` file with the `ZaleniumExtension`.
This is required to allow the Zalenium messages to be set in the videos correctly.```yaml
default:
extensions:
Behat\MinkExtension:
```Becomes
```yaml
default:
extensions:
EdmondsCommerce\ZaleniumContext\ZaleniumExtension:
```### Include Context in Behat Configuration
```yaml
default:
# ...
suites:
default:
# ...
contexts:
- # ...
- EdmondsCommerce\ZaleniumContext\ZaleniumContext
```### Update your profile to use Zalenium
This will allow the `ZaleniumDriver` to work in place of `Selenium2Driver`.
The `ZaleniumDriver` is an extension of the `Selenium2Driver`.```yaml
# ...
selenium_chrome_session_headless:
selenium2:
browser: chrome
capabilities:
# ...
```Becomes
```yaml
# ...
selenium_chrome_session:
zalenium:
browser: chrome
capabilities:
# ...
```## Usage
See our handbook page in the links below for further information on how to use Zalenium with Behat.
If you find a bug or want to help improve the extension, drop us an issue/pull request!### Notes
By default, the `ZaleniumDriver` will disable W3C mode, this is not supported by the underlying web driver.
As a matter of convenience, this has been done in the driver itself, along with the allowance of insecure SSL.
These options are automatically added to the desired capabilities.All test scenarios must have a name, the following will cause an exception in the Zalenium driver.
```gherkin
Scenario:
Given I don't set my scenario name
Then I see my tests are broken
```
## Links
[Packagist](https://packagist.org/packages/edmondscommerce/zalenium-context)[Zalenium Github](https://github.com/zalando/zalenium)
[Zalenium on the EC handbook](https://www.edmondscommerce.co.uk/handbook/Development-Tools/Testing/Zalenium/)