Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.88 KB

README.md

File metadata and controls

40 lines (34 loc) · 1.88 KB

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