DebugTools
trait DebugTools (View source)
Step tools to help debug failing steps
Methods
Ensure utilty steps are reset for subsequent scenarios
Useful step for working out why a behat testing isn't working when running the browser headless Remove this step from in a feature file once the test is working correct
Utility function for debugging failing behat tests Remove this step from in a feature file once the test is working correct
Take a screenshot when step fails, or take a screenshot after every step if the use has specified "I take a screenshot after every step" Works only with FacebookWebDriver.
Dump rendered HTML to disk Useful for seeing the state of a page when writing and debugging feature files
Details
void
resetUtilitiesAfterStep(AfterScenarioScope $event)
Ensure utilty steps are reset for subsequent scenarios
iTakeAScreenshotAfterEveryStep()
Useful step for working out why a behat testing isn't working when running the browser headless Remove this step from in a feature file once the test is working correct
iDumpTheRenderedHtmlAfterEveryStep()
Utility function for debugging failing behat tests Remove this step from in a feature file once the test is working correct
takeScreenshotAfterFailedStep(AfterStepScope $event)
Take a screenshot when step fails, or take a screenshot after every step if the use has specified "I take a screenshot after every step" Works only with FacebookWebDriver.
void
dumpHtmlAfterStep(AfterStepScope $event)
Dump HTML when step fails.
dumpRenderedHtml(StepScope $event)
Dump rendered HTML to disk Useful for seeing the state of a page when writing and debugging feature files
takeScreenshot(StepScope $event)
Take a nice screenshot