Network Logs and Console Logs in Test Runs: See Why a Test Failed
Network logs and console logs show why a test failed. GUI Test Studio records them during each run, beside every step, for web, desktop and phone apps.
To learn why a test failed, look beside the screen: the requests the app made and the lines it logged at that moment. GUI Test Studio records both during a run and shows them next to each step.
You know the moment. The pipeline is red, the report shows a cart total that did not change, and the first question in the team chat is the same as always: is the test wrong, is the server down, or is the app broken?
Why did my test fail: the screen, the server or the app?
A failed check tells you what the screen did not show. It does not tell you why. The same red step can come from three places, and each one goes to a different person.
One failed check
Text Assert: the cart total
The screen
The cart total still shows the old amount.
A screenshot shows this
The server
The request that saves the cart was answered with an error.
Only the network log shows this
The app
The page logged an error and stopped updating the cart.
Only the console log shows this
| Where the cause is | What it looks like on the screen | Who fixes it |
|---|---|---|
| The screen | A label moved, a button changed, a new look shipped on purpose. | The tester updates what the check expects. |
| The server | A request failed, timed out or answered with an error, so the screen never got its data. | The backend team. |
| The app | The code hit an error, logged it and stopped halfway. | The developers of the app. |
Telling these apart quickly is what keeps a team from re-running a red test until it turns green.Why that habit hides real bugs is the subject of flaky tests and false positives.
Why a screenshot alone does not say why a test failed
Definition
A screenshot records the result, never the cause.
- It shows the cart total that did not change, not the request that failed behind it.
- It shows an empty list, not the error the page wrote a second earlier.
To debug a failed test, you need what the app was doing at that moment, not only what it showed.
So someone opens the app by hand, tries to reproduce the failure, and often cannot: the server is fine again, the data has changed, the moment has passed. The evidence was there during the run, and nobody kept it.
The best time to record why a test failed is during the run that failed.
What is recorded for a web app, a desktop app and a phone
GUI Test Studio, which automates end-to-end tests of any app without code, records what each kind of app can give. The report's panel for it is called Activity, with a Network tab and a Log tab.
| App under test | Network | Log |
|---|---|---|
| A web app in Chrome, Edge or Firefox, with a browser window or without | Every request the page makes: method, address, status, type, size, how long the server was waited for and how long the answer took to arrive, failures with the browser's reason, answers from the cache, web sockets. | The page's console: messages, warnings, errors and uncaught errors. |
| A desktop app | Its connections: which server and port it connected to, the server's name, and a connection that was refused or failed. | Its debug output, and any log file you name, from the lines written during the run. |
| An Android phone plugged into the computer | Not recorded. | The phone's own log: its warnings and errors. |
| The whole screen | The connections of the programs you name. | The debug output and the log files of the programs you name. |
Web apps
When a web page's network is recorded, the page is opened empty first and then sent to its address, so even its very first request is kept.
Desktop apps
A log file can be named with a star in its name, and every file that matches is followed from the start of the run.
Phones
Plug the phone in once, and its warnings and errors land beside the steps they happened in.
The articles on Electron app testing, Windows desktop app testing without code and Android app testing on a real phone show each kind of app in a whole test.
Network logs and console logs on the run's own clock
A log file on a server tells you what happened at a time of day. A test run needs to know what happened during step 7. That is why GUI Test Studio keeps the network activity and the logs on the run's own clock, the clock of its steps and of its video.
Step
Open the shop
passed
Network
Log
Selected step
Click Add to cart
passed
Network
Log
Step
Check the cart total
failed
Network
Nothing during this step
Log
Nothing during this step
On one clock, a failure points at its own place in the test.
- Clicking a request or a log line takes you to the step that was running.
- The run's timeline carries a mark wherever a request failed or an error was logged.
- In the waterfall of requests, the selected step's time is shaded, so you see what it waited for.
How a test records network activity and logs, without code
There are three ways to turn it on, and none of them is code.
| Where | What you do |
|---|---|
| When you record a test | In What do you want to test?, keep Record network activity and logs during test runs ticked. It is on by default for a web app, an app and a phone, and the recorded test then records them at every run. |
| On a step that opens the app | Open Web App, Run App and Connect Phone each have Record During a Run: the requests and the console, the connections, the debug output and a log file, or the phone's log. |
| Anywhere on the timeline | Drag Watch Network or Watch Log from the Test Flow group of GUI Test Studio's Events palette. Each starts or stops recording the app under test, a program you name, a log file, or for the network this whole computer. |
Every Test Flow step, the Waits and the steps that open an app included, is described in Waits and Test Flow steps.The whole feature, every option included, is in the Network activity and logs guide.
How to debug a failed test with its network and logs, step by step
Record
At every run
Select
The failed step
Narrow
Errors only
Hand on
HAR, log, bug report
- 1
Record the evidence at every run
Keep Record network activity and logs during test runs ticked when you record, or add a Watch Network and a Watch Log step at the start of an existing test.
- 2
Run the test
Run it in GUI Test Runner-Recorder, or with gtr-cli in your pipeline. The requests and the logs are recorded on the run's own clock, beside the screen.
- 3
Open the failed step
In the Confidence Report, select the failed step or the one before it.When something went wrong during that step, a line above the steps says so, with Show in Activity.
During this step: POST shop.example.com/api/cart answered 500 · 2 errors logged
Show in ActivityActivity
Network · 6Log · 23Errors onlySelected step onlyAll typesPOST/api/cart500· waited for the server, then answered with an errorThe report names what went wrong during the selected step, and one click opens it in the Activity panel. - 4
Narrow it down in the Activity panel
Use Errors only, Selected step only, the type filter (Data, Pages, Scripts, Styles, Images, Fonts, Other, Connections) and the search.Open a request to read its headers and its timing, or a log line to read it whole.
- 5
Hand it on
Export the requests as a HAR file and the log as a text file, copy a request to replay it, or file a bug report that carries both.
The check of the cart total failed. Selecting the step before it, the report says that the request saving the cart answered 500 and that the page logged an error. The tester attaches the HAR file to the bug, and the backend team has the failing request before anyone tries to reproduce it.
Everything else the report shows, expected beside actual, the run's video and the history of earlier runs, is in how to read a test report and the Confidence Report guide.
From evidence to a check: failed requests and console errors
Once you know what matters, you can make it a check. Two Test Flow steps can fail a test, and you add them yourself: a recording never generates them.
| Check | Its rules |
|---|---|
| Check Network | No request failed, with addresses to let through as known noise. A request was answered: it waits for a request to that address to be answered without an error. |
| Check Log | No error was logged, with lines to let through. The log says, which waits for a line. The log does not say. |
Each check looks at what was recorded since the previous check of the same rule, so a failure points at the part of the test where it happened. Like every step, it says what a failure does: stop the test or continue. A check with nothing being recorded fails and says what to add.
Failing a run on a console error, with an allow-list for known noise, is the subject of catching console errors in automated tests.Waiting for an API response instead of a fixed sleep is in wait for an API response in UI tests.
What it takes in a coded test framework
In a coded framework such as Playwright, Selenium or Cypress, the same evidence is yours to collect in code.
| What you need | In a coded framework | In GUI Test Studio |
|---|---|---|
| A web page's console | A listener on the page's console in the test code, and code to keep what it hears. | A switch, on by default when you record. |
| A web page's requests | A listener on the page's network, or a trace to turn on and save for each run. | The same switch, or a Watch Network step. |
| A desktop app's connections and log files | Other tools and other code, outside the browser framework. | A Watch Network or Watch Log step naming the program or the file. |
| The link to the failed step | Your own timestamps to match against the test's output. | One clock for the steps, the video and the evidence. |
| A failure on a console error | An assertion with your own allow-list, in code. | A Check Log step with its exceptions. |
The idea is the same: keep what the app did beside what it showed. What differs is how much you write and maintain to get there, and whether it covers more than a web page.
Hand the evidence to a developer, or to your pipeline
The evidence of a run is meant to travel. A tester reads it, a developer replays it, a pipeline keeps it.
| Where | What you get |
|---|---|
| The Activity panel | The requests as a HAR file, the format browsers' developer tools open, and the log as a text file. Copy as cURL on a request replays it in a terminal, without its hidden headers. |
| A bug report, as a PDF, Excel or a Jira issue | What went wrong around the failed step in its notes, and the HAR file, the log and a summary in its evidence. |
| gtr-cli in a pipeline | One line per test with its requests and log lines, the first failures under a test that did not pass, the activity in its JSON results, and network.har and log.txt in the artifacts folder. |
| An AI assistant | Through the connector, a run's results include its activity, and the assistant can add Watch and Check steps to a test. |
gtr-cli run tests --junit results\junit.xml --artifacts results\artifactsThe assistant can be Claude, ChatGPT with Codex, or a local AI model, ours or your own, connected through Create a test from a prompt.Pipelines are covered in Run tests in your pipeline, and a failed run that becomes a bug in failed UI tests to Jira bugs with TeamCity.Exporting the requests is the subject of a HAR file from your automated tests.
What is never recorded: bodies and secrets
Network logs can hold sensitive data, so the rule is strict and the same everywhere.
- A request's body and an answer's body are never kept.
- A header or a part of an address that carries a secret, such as an authorization, a cookie, a token, a key or a password, is kept as hidden.
- A copied request never carries a hidden header.
- The recording stays in the test's results folder, on your team's computers.
How the rest of a test's data stays yours is in data privacy in test automation.
What to know before you start
| Limit | What it means |
|---|---|
| A desktop app's requests are not read | Its connections are: the servers it reached and the ones that refused it. Its requests stay encrypted inside the program. |
| A phone's network is not read | The phone's own log is, its warnings and errors. |
| No bodies | What a request sent and what came back are never kept, only their address, status, size and timing. |
| Only during a run | Nothing is recorded while you record the test or edit it. The evidence belongs to each run. |
| The site icon a site does not have | A browser asks for it by itself. That missing icon is shown muted and never counts as a failure. |
Key takeaways
- 1A screenshot shows that a test failed, not whether the screen, the server or the app was the cause.
- 2GUI Test Studio records the network activity and the logs of a run on the run's own clock, beside every step.
- 3Each kind of app gives what it can: a web app its requests and console, a desktop app its connections, debug output and log files, a phone its own log.
- 4No code is needed: a switch when you record, an option on a step, or a Watch step on the timeline, and the report names what went wrong during the selected step.
- 5Bodies are never kept and secrets are hidden, and recording alone never fails a test.
Questions
How do I find out why an automated test failed?
Look at what happened beside the screen at the moment of the failed step: the requests the app made and the lines it logged. In GUI Test Studio, the Confidence Report shows both next to each step, so you can tell a broken screen from a server error or an app error.
What are network logs and console logs in a test run?
Network logs list the requests an app made during the run, with their address, status, timing and failures. Console logs are the messages, warnings and errors a web page wrote. Recorded on the run's own clock, they show what the app was doing at every step.
Do I need to write code to capture console logs and network requests?
Not in GUI Test Studio. A recording keeps a switch on that records them at every run, and a Watch Network or Watch Log step added on the timeline does the same for any test. Nothing is written in code.
Can I see the network activity of a desktop app during a test?
Yes, its connections: which server and port it connected to, and any connection that was refused or failed. Its requests themselves are not read, because they are encrypted inside the program. Its debug output and any log file you name are recorded too.
Does it record the logs of an Android phone?
Yes, the phone's own log, its warnings and errors, when the phone is plugged into the computer that runs the test. The phone's network is not recorded.
Are request bodies, passwords or tokens recorded?
No. A request's or an answer's body is never kept, and a header or a part of an address that carries a secret, such as a password, a cookie, a token or a key, is kept as hidden. The recording stays in the test's results folder, on your computers.
How do I export network logs from a test run as a HAR file?
In the Confidence Report's Activity panel, export the requests as a HAR file, the format browsers' developer tools open, and the log as a text file. In a pipeline, gtr-cli writes both into its artifacts folder.
Can a test fail on a console error or a failed request?
Yes, with a check you add. Check Network fails when a request failed, Check Log fails when an error was logged, and both let known noise through. Recording alone never fails a test: it only keeps the evidence.
Playwright, Selenium, Cypress, Chrome, Edge, Firefox, Android, Jira, TeamCity, Windows and cURL are trademarks of their respective owners.


