I'm newbie in testing with K6. I have read the document of K6 but i'm not clear about "vus" and "iterations". I'm understand that vus = number of people go to the URL that declared, but I'm not sure about "iterations".
- Can anyone help me to explain this clearly? I have my code below. My target is test a Restful API, try to find out the performance when about 100 users use this API continuously in 5 minutes.
- Is my code right ? Because I'm understand that we need only "vus" and "duration" that can achive the goal of the test I mentioned (100 users use this API continuously in 5 minutes). So why need to add "iterations"?
- What is different if i change iterations to 100, 1000 or remove it?
import http from 'k6/http';
export let options = {
vus: 100,
iterations: 20,
duration: '300s'
};
export default function () {
http.get('https://test.k6.io/contacts.php');
}