Skip to content

A Docker image to run Behat test using Selenium with no external dependencies

Notifications You must be signed in to change notification settings

mtift/behat-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Includes

Installation

  1. git clone [email protected]:mtift/behat-selenium.git

Usage

  1. Move to the necessary directory: cd behat-selenium/tests
  2. Start docker: docker-compose up -d
  3. Run all tests: ./run-behat

Customize

  • To test your site, add features in the tests/features directory.
  • Run ./run-behat -dl to see a list of available gherkin commands.
  • Add custom gherkin commands to tests/features/bootstrap/FeatureContext.php.
  • Use the @javascript tag to test your javascript code.
  • Use the @api tag to test your Drupal code.

Related

  • To run the tests for a single feature: ./run-behat features/drupal.feature
  • To test a different site, change the "base_url" value in tests/behat.yml.
  • Shut down docker: docker-compose down
  • To view the HTML report of your tests, visit http://<your-docker-host-ip>:8000/html_report (e.g. http://localhost:8000/html_report) or open behat-selenium/tests/html_report/index.html

Notes

About

A Docker image to run Behat test using Selenium with no external dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published