Validator
The Validator can help you validate that a test script is working as expected. You can use it to run one iteration of your test, and visualize the request and response of any requests on your test script, as well as checks and logs. The Validator works with any k6 test script, not only scripts generated in k6 Studio.

The Validator window is composed of:
- Test script name: The name of the test script.
- Validator actions: On the top-right you can see the action buttons for the Validator. From here you can:
- Click Validate script to run one iteration of your test script.
- Click Run in Grafana Cloud to run your test in Grafana Cloud k6.
- Click the menu icon to:
- Open external script: Open a k6 test script from your computer. After opening it, click Validate script to run one iteration of the test.
- Delete: Deletes the selected test script.
- Validator options: Below the test script name, you can see:
- Requests: The total number of requests executed from the test script run.
- Search: A search box that lets you search the list of requests by URL, method (such as GET or POST), and status code. You can also use the toggle to search across all request data.
- Requests and groups list: The list of requests, and groups if any, that were executed in the test run. The requests are organized by time, and you can see the method, status code, host, and path for each one. You can also collapse and expand groups to inspect them more easily.
- Request and response inspector: When you click on a request from the requests list, a panel opens on the right side which shows the request and response details for that request. You can use it to inspect the headers, payload, cookies, and content of the requests.
- Logs, checks, and script inspector: Any logs or checks generated by test run can be found on their respective tabs. You can also visualize the script that was executed here, to help you debug the behavior from the test run results.
Validate a test
There are two ways to validate a test:
- Use the Generator component:
- Open a test generator.
- Click the menu icon on the top-right, and select Validate script.
- Use the Scripts component:
- Open a script.
- Click Validate script on the top-right.
After you click Validate script, k6 Studio runs one iteration of the test script and shows you the results of the test as the script is executed.
Run a test in Grafana Cloud
After validating a script, you can execute the same test, but using the load profile and load zones you have configured in Generator -> Test options, to run a performance test and see how your application behaves in a real-world scenario.
k6 Studio includes a built-in integration with Grafana Cloud, that enables you to login and run a test by clicking Run in Grafana Cloud. For more details, refer to Run a test script in Grafana Cloud k6.
Inspect test results
During a test script run, and once it’s completed, you can inspect the test results. Similar to the Test Recording component, you can click on any requests from the Requests list to view the request and response data, including the header, payload, and cookies.
You can also view any logs and checks generated by the test run in the Logs and Checks tabs to help you debug your test script.
Validate external script
You can use the Validator to validate scripts that are created outside k6 Studio as well:
- From the k6 Studio homepage, click Validate script.
- Click Open external script.
Alternatively, from the Validator screen you can:
- Click the menu options icon on the top-right.
- Click Open external script.
You can then select a script located outside of k6 Studio, and then click Validate script to execute one iteration of the test.
If you want to view the script under the Scripts section of the k6 Studio application, you can:
- Open the k6-studio Scripts folder.
- For macOS, that can be found in
~/Documents/k6-studio/Scripts
. - For Windows, that can be found in
C:\Users\<USERNAME>\Documents\k6-studio/Scripts
. - For Linux, that can be found in
~/Documents/k6-studio/Scripts
. - If you have a script in k6 Studio already, you can right-click on it and click Open containing folder.
- For macOS, that can be found in
- Copy your script to the Scripts folder.
After that, you should be able to see your test script in k6 Studio under Scripts.