Skip to content

UKHO/k6-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K6 Workshop

The workshop is designed for a novice to get started writing some load tests. These are written using K6

This repository contains the instructions for the UKHO K6 workshop, some example code for each exercise and the code for the mock API that will be load tested.

Pre-requisites

  • k6 installed
  • Grafana Cloud account created
  • IDE (VS Code recommended)
  • This repo cloned onto your local dev environment
  • A running instance of the 'Cricket API'. This will either be provided by the person running the workshop, or you can run this locally (open /sut/CricketAPI.sln in Visual Studio and run; it requires .Net 8).

You will need the following information to run exercise 2 onwards:

  • The host name of the system you are going to load (SUT_HOSTNAME) which will be given to you at the start of the workshop
  • Your personal API token which can be found in your Grafana Cloud account settings (API_TOKEN)

You will see these labels referenced in the exercises in { }. Substitute in the correct values.

How to do the workshop

This workshop sets you some load testing challenges, in /exercises/EXERCISES.md, to be solved using K6

If you are confident with coding each exercise can be solved by reading the referenced documentation. If you are less confident, or get stuck, each exercise has a suggested solution in the /exercises/src folder which you can play around with instead.

Most of exercises involve calling a "Cricket API". At the start of the workshop, you will be given the host name for this service (SUT_HOSTNAME). More information on the API can be found at http://{SUT_HOSTNAME}/swagger

If you run the Cricket API locally from Visual Studio then SUT_HOSTNAME will be localhost:7258

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages