|
| 1 | +export const SLEEP = { |
| 2 | + MIN: 1, |
| 3 | + MAX: 5 |
| 4 | +} |
| 5 | + |
| 6 | +/** |
| 7 | + * For this Project the virtual uses and duration are set to small values. |
| 8 | + * To see Real world examples see: https://k6.io/docs/test-types/load-test-types/ |
| 9 | + */ |
| 10 | +export const TEST_TYPES = { |
| 11 | + smoke: { |
| 12 | + // Test the minimal load |
| 13 | + vus: 3, // Little virtual Users |
| 14 | + duration: '15s' // Only a few iterations |
| 15 | + }, |
| 16 | + load: { |
| 17 | + // Test the average load |
| 18 | + stages: [ |
| 19 | + { duration: '5s', target: 5 }, // Ramp-up from 1 to 10 virtual users |
| 20 | + { duration: '30s', target: 5 }, // Stay at 10 virtual users for 90s |
| 21 | + { duration: '5s', target: 0 } // Ramp-down to 0 virtual users |
| 22 | + ] |
| 23 | + }, |
| 24 | + stress: { |
| 25 | + // Test heavy load |
| 26 | + stages: [ |
| 27 | + { duration: '30s', target: 20 }, // Ramp-up from 1 to 20 virtual users |
| 28 | + { duration: '90s', target: 20 }, // Stay at 20 virtual users for 90 seconds |
| 29 | + { duration: '15s', target: 0 } // Ramp-down to 0 virtual users |
| 30 | + ] |
| 31 | + }, |
| 32 | + soak: { |
| 33 | + // Test average load over a longer time |
| 34 | + stages: [ |
| 35 | + { duration: '30s', target: 10 }, // Ramp-up to 10 virtual users |
| 36 | + { duration: '1m', target: 10 }, // Stay at 10 virtual users for 1 minute |
| 37 | + { duration: '30s', target: 0 }, // Ramp-down to 0 virtual users |
| 38 | + { duration: '1m', target: 0 } // Do nothing for 1 minute |
| 39 | + ] |
| 40 | + }, |
| 41 | + spike: { |
| 42 | + // Test sudden load |
| 43 | + stages: [ |
| 44 | + { duration: '30s', target: 100 }, // Ramp-up to 100 virtual users |
| 45 | + { duration: '15s', target: 0 } // Rapidly decrease virtual users to 0 |
| 46 | + ] |
| 47 | + }, |
| 48 | + break: { |
| 49 | + // Find the Limits of the tested system |
| 50 | + executor: 'ramping-arrival-rate', // Assure load increase if the system slows |
| 51 | + stages: [ |
| 52 | + { duration: '5m', target: 250 } // Slowly Ramp-up to a Huge load |
| 53 | + ] |
| 54 | + } |
| 55 | +} |
0 commit comments