Download the PHP package seretos/behat-logger-extension without Composer
On this page you can find all versions of the php package seretos/behat-logger-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download seretos/behat-logger-extension
More information about seretos/behat-logger-extension
Files in seretos/behat-logger-extension
Package behat-logger-extension
Short Description log the behat execution into json result
License MIT
Homepage https://github.com/Seretos/BehatLoggerExtension
Informations about the package behat-logger-extension
BehatLoggerExtension
this package provides an extension for behat to log the test results in an json-file. this package also provide commands to validate and merge this json files.
Installation
INFORMATION: if you want to use the behat logger extension for your project, please read the "PHP Integration" section! The installation section installs only the cli-commands as standalone application
For users is now a docker-image available. For developers see PHP Integration
Migration from 1.x to 2.x
since the major release 2, the identification of tests for synchronization has changed. In version 1 the title of the scenario was used for synchronization. in this release, an id will used, given by an behat-tag. every test requires an unique identifier tag. for example "@testrail-case-1,@testrail-case-2, e.t.c." update your dependency to the last 1.x version and add the following properties to your .testrail.yml
execute the testrail:push:cases command to add all the ids to your cases in testrail. Now you can update to 2.x (but some .testrail.yml properties has changed!!!)
docker image
add the docker-container to your docker-compose.yml
PHP Integration
add the package to your project as below
activate the logger in your behat.yml:
OPTIONAL: if you use an symfony application, you can add this extension (seretos\BehatLoggerExtension\BehatLoggerExtensionBundle) to your Symfony Kernel and integrate the commands in your cli
Command line usage
combine different result jsons into one file and one suite:
if different jsons contain a testresult for one test with the same environment, this command throws an exception
convert all found feature-files to one json-file without results:
check that all scenarios in the log file has an unique title:
This command is deprecated please use validate:scenario:id in future!
check that all schenarios in the log file has an unique id tag:
check that all tests are executed in the given environments:
send a json-result to testrail and create sections and cases
send a json-result to testrail and create environment configurations:
send a json-result to testrail and create results
the commands testrail:push:cases and testrail:push:results requires an .testrail.yml in the current work directory with the following informations:
log format
first of all, the json file contains the behat suite. if the log-writer can not detect the suite name, they use a suite named "default"
the suite contains a list of features:
and a feature contains scenarios with steps and results
and last but not least, contains the features results. the environment property is the browser name. on guette the environment name is setted to "unknown"
All versions of behat-logger-extension with dependencies
behat/behat Version ^3.3
behat/mink-extension Version ^2.2
behat/mink-selenium2-driver Version ^1.3
symfony/http-kernel Version ^3.3|^4.2
symfony/finder Version ^3.3|^4.2
symfony/framework-bundle Version ^3.3|^4.2
seretos/testrail-php-api Version ^1.0
stecman/symfony-console-completion Version ^0.8.0
ext-json Version ^1.5