> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/en/autify-university/foundation/test-results/when-a-step-fails.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# When a Step Fails

## When a Step Fails

Now that we've seen what a passed test looks like, let's take a look at a failed test.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-a139368c09520be33c3f4b13fc9817994c369881%2FIndividual%20Test%20Failure.png?alt=media)

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.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-083f3c393bba1df2dd71508bcfbd85e13bc8a104%2FError%20test%20result.png?alt=media)

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/en/autify-university/foundation/test-results/when-a-step-fails.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
