Skip to content

radomyr-horban/k6-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 k6 Performance Testing with Grafana Cloud

This project uses k6 for performance and load testing, with metrics sent to Grafana Cloud for powerful visualizations and dashboards. It is designed for local development and CI environments.

⚙️ Setup

1. Install k6

Install k6 on your local machine:

# macOS (Homebrew)
brew install k6

# Ubuntu
sudo apt install k6

# Windows (winget)
winget install k6 --source winget

⚙️ Grafana Cloud Setup

  • create a Grafana Cloud account
  • generate and copy Personal API token
  • run k6 cloud login --token <YOUR_API_TOKEN>

🧪 Running Tests

Local Run

k6 run tests/basic-concepts/groups.test.js

Local Run with verbose logs

k6 run tests/basic-concepts/groups.test.js --summary-mode=full

Run browser tests in headless mode (default)

k6 tests/basic-concepts/browser.test.js

Run browser tests in headed mode

K6_BROWSER_HEADLESS=false k6 tests/basic-concepts/browser.test.js

Export test results in json format

k6 run tests/basic-concepts/groups.test.js --summary-export=src/test-results/results.json

or more verbose results

k6 run tests/basic-concepts/groups.test.js --out json=src/test-results/full_results.json

Cloud Run

k6 cloud tests/example-test.js

Cloud run results

Local Run and Export results to Grafana Cloud

k6 run tests/basic-concepts/groups.test.js -o cloud

Exported results on cloud

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published