Behat UI

Module Drupal Illustration Voir sur Drupal.org
Nb téléchargements : 94

Components

  • Code
  • Documentation
  • Miscellaneous
  • User interface

Documentation

Images





Next Major version

Drupal 10 compatibility

Licence

http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

permet d'implémenter Behat dans l'admin de Drupal.

Release

Status : Published
Projects : Modules
Maintenance status : Actively maintained
Development status : Under active development
Supported Branches : 4.0., 5.0.
shield Stable releases for this project are covered by the security advisory policy.




Description

The Behat UI module lets any person to run automated tests and create new tests (and also run them while they are being created). The user can later download the updated feature with the newly created test. It's fully customizable and the interface is very interactive/intuitive.

Features on running an existing test suite:

  • The Behat binary and behat.yml can be located at any place, you just need to provide the path to them
  • HTTP authentication, for both headless testing and real browser testing (Selenium)
  • Tests run on background, the module checks for the process periodically and the output is updated on the screen (because some large test suites can take even hours to run)
  • Kill execution
  • Colored and meaningful output
  • Run the testing suite as a Drush command: `drush bui` or `drush behat-ui`
  • Export output as HTML or plain text

Features on creating a new test (scenario) through the interface:

  • Choose feature (among the existing ones), title and whether it requires a real browser (i.e., needs JavaScript or not)
  • Check available step types
  • Choose step type from select field ("Given", "When", "Then", "And", and "But" )
  • Auto-complete and syntax highlighting on the step fields
  • Add new steps
  • Remove a step
  • Reorder steps
  • Run test at any time (even if it's not completed yet)
  • Download the updated feature with the new scenario

YAML extension is required. You can install it through PECL: `# pecl install yaml`

Check the example FeatureContext.php file for two examples of useful steps:

  • Take screenshot (very useful for debugging specially if you run Selenium headless, using XVFB or something like that)
  • HTTP authentication

You can run the tests using PhantomJS instead of Selenium. In order to do that, just run PhantomJS on port 8643, this way: phantomjs --webdriver=8643 --cookies-file=/tmp/cookies.txt. In that case, you should put the path http://localhost:8643/wd/hub as the wd_host in behat.yml. It didn't work with PhantomJS 2.0, but it does work with PhantomJS 1.9.8.

If you don't know from where to start, check the file sample-test-suite.zip.

Check this video to understand better how it works.

Check the module on Github.

Behat UI - Settings - Editing Mode - Free text

Behat UI - Settings - Editing Mode - Free text

Only to start with “Guided entry” for new automated testing writers then move to “Free text” style for more expert automators writing

Quick preview of the UI/UX

Click to watch the video

Quick privew of the UI/UX. Click to watch the video

Long Complete Video - Click to watch
https://www.youtube.com/watch?v=O1cuU-mdYgo

Small Example with Better HTML test report in the Create Test with Behat UI

Scenario: Check the welcome message at the home page
Better HTML test report in the Create Test with Behat UI

Realistic Example with Better HTML test report in the Create Test with Behat UI

Scenario: Check how we could create a landing page with the Layout Builder

Better HTML test report in the Run Behat Tests with Behat UI

Better HTML test report in the Run Behat Tests with Behat UI


The Drupal 8/9+ of this module is sponsored and developed by Vardot.

Vardot




Toutes les informations proviennent du site drupal.org