This repo contains files that are meant to help anyone understand K6 scripting usage. It is just an example with a script and data set file working together to simulate workload on an application.
Depending on platform you are on, the installation of K6 is detailed on https://k6.io/docs/getting-started/installation/
In the application folder there is a jar package file. It represents the application that you have to deploy to run your test agains't. The app will run on port 8080
$ java -jar mybatis-spring-boot-jpetstore-2.0.0-SNAPSHOT.jar
The js file is the result of har file generated from the web browser after recording all requests. The har-to-k6 tool then allows to generate a js script that you can modify as you see fit.
- Browse.js => this script is written in javascript containing
- data.json => It contains an example of file containing test data set
$ k6 run browse.js