Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K6 initial setup #812

Closed
kclark-scottlogic opened this issue Feb 5, 2024 · 0 comments · Fixed by #813
Closed

K6 initial setup #812

kclark-scottlogic opened this issue Feb 5, 2024 · 0 comments · Fixed by #813
Assignees
Labels
testing Related to testing

Comments

@kclark-scottlogic
Copy link
Contributor

kclark-scottlogic commented Feb 5, 2024

Ticket for visibility on adding in K6 structure to allow for load testing.

This ticket will have a basic smoke test script implemented.

Smoke tests in this form of testing have a minimal load. Run them to verify that the system works well under minimal load and to gather baseline performance values.

This test type consists of running tests with a few VUs — more than 5 VUs could be considered a mini-load test.

Similarly, the test should execute for a short period, either a low number of iterations or a duration from seconds to a few minutes maximum.

Image

Example code segment for smoke testing:

import http from 'k6/http';
import { check, sleep} from 'k6';

export const options = {
  vus: 3, // Key for Smoke test. Keep it at 2, 3, max 5 VUs
  duration: '1m', // This can be shorter or just a few iterations
};

export default () => {
  const urlRes = http.get('https://test-api.k6.io');
  sleep(1);
  // MORE STEPS
  // Here you can have more steps or complex script
  // Step1
  // Step2
  // etc.
};

@kclark-scottlogic kclark-scottlogic added the testing Related to testing label Feb 5, 2024
@kclark-scottlogic kclark-scottlogic self-assigned this Feb 5, 2024
@kclark-scottlogic kclark-scottlogic mentioned this issue Feb 5, 2024
3 tasks
@kclark-scottlogic kclark-scottlogic linked a pull request Feb 5, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant