Automation Testing Performance and Load Testing 2 — Questions and Answers
Question 1: What does the term 'virtual user' (VU) mean in performance testing?
- A simulated user executing a test script concurrently with other simulated users (Correct answer)
- A headless browser instance
- An API endpoint tester
- A monitoring agent
Correct answer: A simulated user executing a test script concurrently with other simulated users
Virtual users (VUs) are concurrent simulated users that execute test scripts simultaneously to generate load on the target system.
Question 2: What is a 'ramp-up period' in a load test?
- The time to gradually increase virtual users to the target load level (Correct answer)
- The time to decrease load after peak
- The warmup time for the server
- The test setup duration
Correct answer: The time to gradually increase virtual users to the target load level
A ramp-up period gradually adds virtual users over time to reach peak load, avoiding sudden spikes that don't reflect real traffic patterns.
Question 3: What does 'soak testing' (endurance testing) measure?
- System behavior and memory/resource usage under sustained load over a long period (Correct answer)
- Maximum system capacity
- Cold start performance
- Database query speed
Correct answer: System behavior and memory/resource usage under sustained load over a long period
Soak testing runs the system under normal load for an extended period (hours/days) to detect memory leaks, resource exhaustion, and degradation over time.
Question 4: In k6 performance testing, what language are test scripts written in?
- JavaScript (ES6+) (Correct answer)
- Python
- Groovy
- Ruby
Correct answer: JavaScript (ES6+)
k6 uses modern JavaScript (ES6+) for test scripts, making it accessible to developers already familiar with JS.
Question 5: What is the purpose of a baseline performance test?
- Establishing a performance benchmark to compare future changes against (Correct answer)
- Finding the maximum system load
- Testing performance after a failure
- Measuring cold start time only
Correct answer: Establishing a performance benchmark to compare future changes against
A baseline test captures current performance metrics so future changes can be compared against it to detect regressions or improvements.
Question 6: Which metric indicates the percentage of failed requests during a performance test?
- Error rate (Correct answer)
- Throughput
- Latency
- Apdex score
Correct answer: Error rate
Error rate tracks the percentage of requests that returned an error response, indicating system stability under load.
What does the term 'virtual user' (VU) mean in performance testing?