A
A
Arthur Gurinovich2014-09-17 14:14:38
PHP
Arthur Gurinovich, 2014-09-17 14:14:38

How can I catch an error when executing an automated test using Codeception and handle this error in the right way?

To automate the project, we use the Codeception 2.0.1 framework.
Module for testing: Selenium WebDriver.
When writing test scripts, it is necessary to determine not only the place where the error occurred, but also for what reason.
In other words, if the test script exits with a Fail status.
Question: Is it possible to catch an error and process it in such a way that a specific text for a given situation is displayed in the console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-09-17
@ArthurGurinovich

the error is not executed in the test runner but in the application. 99% that the application is launched separately and you cannot influence it through Codeception. So it needs to be sorted out somehow at the application level. Or, in case of an error, extract what happened from the logs. The latter is perhaps the best option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question