Contains some sample scripts for performance testing These scripts uses basic public APIs but can be replaced by any API we need.
Install k6 to run tests(scripts) on local or on cloud. Run command 'k6 --version' to verify k6 is installed.
Steps to run the scripts locally:
- Run command 'k6 run scripts/'
Steps to run the scripts on grafana cloud:
- Create an account in grafana.
- Copy personal API key from granfana.
- Clicking 'Testing & Synthetics' in the left navigation bar.
- Select 'Performance' -> 'Settings'
- API key can be found in 'Personal API Key' tab.
- Run command 'k6 cloud login --token ', notice the logged in successfully message.
- Run command 'k6 cloud scripts/' The script now runs on the grafana cloud.
- View the test execution and test results on grafana dashboard.