Generate a script from a plain-language prompt
This milestone is hands-on with QuickPizza at https://quickpizza.grafana.com. You do not need your own API or credentials to complete the steps.
You open Grafana Assistant, choose k6 Script Authoring, paste a starter prompt, then continue in the Cloud script editor when possible.
Open Performance, then open Grafana Assistant to prepare a script.
Open Performance.
Open Assistant from the top toolbar.
You should now see the Assistant panel and be in the Grafana Cloud k6 Performance area.
Choose k6 Script Authoring and send a prompt for a short QuickPizza test.
Open the Assistant mode selector and choose k6 Script Authoring.
Paste this starter prompt, or adapt it to describe your intended test:
Create a minimal k6 HTTP test for https://quickpizza.grafana.com that checks for a 200 response, uses sleep(1) between iterations, and runs for 10 iterations.
Click Send when the complete prompt is ready.
Enter a complete prompt describing the test, success criteria, pacing, and run length.
When your message is complete, click Send.
Assistant returns a draft; review the generated request, checks, pacing, and run length before using it.
Ask Assistant to open its draft in the Cloud script editor, then choose your project and review the test.
Ask Assistant to open the Cloud script editor. You can enter: Open the k6 script editor. Click Send when ready.
Ask Assistant to open the k6 script editor.
When your message is complete, click Send.
If Assistant asks which project should hold the test, enter the project you want and click Send. Skip this step if the editor opens without a project question.
Enter your chosen project only when Assistant asks for it.
When your message is complete, click Send.
In the editor, use Create to save or Create and Run for a short smoke run. Review the draft before running it. See Use the script editor.
Review the draft and confirm it includes a request to
https://quickpizza.grafana.com(or paths under that host), at least onecheck()for status 200,sleep(1)or equivalent pacing, and sensibleoptionsfor a short run.
You have reviewed the draft in Cloud or are ready to copy it for an optional local check.
If you use a local file instead of only Cloud runs, you will smoke-test with the k6 CLI.
Copy the script into a file such as
quickpizza-assistant.js, then run:k6 run --iterations 1 quickpizza-assistant.jsSkip this section if you stay entirely in the script editor.
You can skip local CLI work when Cloud-only validation is enough for your team.
More to explore (optional): at this point in the path you can read Author and run tests in Grafana Cloud k6 for a broader view of authoring in Cloud.
Example prompt to copy for QuickPizza in Assistant:
Create a minimal k6 HTTP test for https://quickpizza.grafana.com that checks for a 200 response, uses sleep(1) between iterations, and runs for 10 iterations.Compare Assistant output to what you expect from Write your first k6 test script before you change load or add CI.
In the next milestone on the learning path, you either discover endpoints from your stack’s telemetry or stay on QuickPizza for conversion and improvement steps.
Continue on Discover real endpoints and generate a script when you are ready.