- Print
- DarkLight
When a Step Fails
Now that we've seen what a passed test looks like, let's take a look at a failed test.
As you can see there are several differences between a passed test and a failed test. At the top we can still see the status message. Underneath however, an error message is displayed. This can give you clues as to where to start investigating in order to identify the issue. In our case, the test is saying that step 6 has a problem executing Javascript, with the Javascript error reading: "Purposefully breaking test to show a fail".
So let's take a closer look at step 6.
Here, at the top you can see that the Javascript that was written was the culprit and nothing was wrong with the website. We purposefully threw in an error to break this test.
This brings us to a great point about building tests for the first time. Your tests may not automatically pass after the first recording, especially if you are using Javscript. There are many reasons errors can occur when building tests and it can take some editing before the test is ready to be used.