Stress Testing Vs Load Testing

Stress Testing Vs Load Testing

Interviewers often ask applicants to explain the difference between stress testing vs load testing. The two kinds of tests are certainly related, and being able to distinguish stress testing vs load testing will show you have more experience and knowledge with software testing questions than most of your competition.

 

So how should you answer this question?

First, give a definition of the two kinds of testing. Load testing is testing an application at normal or peak levels. Stress testing is testing an application at levels beyond any expected load, or at expected load but with reduced resources.

Second, explain the purpose behind each kind of test. The purpose of load testing is to ensure the application has satisfactory performance under the expected loads, and to expose and problems and bottlenecks that might arise. On the other hand, the purpose of stress testing is to expose problems that don’t arise under normal operation, and to see if the application fails gracefully even under those conditions.

Finally, give some examples to show the interviewer you actually understand the difference between stress testing vs load testing. In case you are testing an application that should be able to handle as many as 50 concurrent users, a load test would be testing with 25 (normal conditions) and 50 (peak conditions) users. A stress test might test with 500 users. A second example might be testing a multithreaded application that should handle 5 separate threads (load testing), and seeing how that application behaves in an environment in which mutliple threads are not available (stress testing).

Types of Software Testing

Types of Software TestingWhat are the different types of software testing?

If you’re asked this software testing question during an interview, first list some of the different categories headlined below. Be prepared to explain a little bit about each of the different types of software testing to show the interviewer you have a broad knowledge of software testing.

White Box vs. Black Box Testing

These are probably the two most famous types of software testing.

The difference between them is the level of insight that a tester has into the program under test.

White box tests mean that the tester has some insight into the inner workings of the program. In general, this means access to the code, but it could just be access to API’s or a description of system internals.

Black box testing is testing without this kind of access. In general, this means you know what the program is supposed to do, and you have to check that the program actually does what it should by feeding in input and looking at the output.

Unit vs. Integration vs. System Testing

The difference among the three categories is the level at which the tests are performed.

Unit testing is done at a very low level: typically individual methods or functions.

Integration testing is done at an intermediate level. Imagine that a part of your program has to read in and process an Excel file to represent it in some internal format. A second part of your program takes the internal representation of the Excel file, and does some computation based on it. Both of these parts can be internally complex (for example, consisting of multiple classes), but they are not the whole of your program. Testing that both of these pieces work together as expected would be an example of an integration test.

System testing is done at the system level: making sure that the system as a whole actually does what it should.

Regression vs. Acceptance Testing

The distinction is the objective of the tests (though also when the tests are performed).

Regression testing checks whether a new change broke something that used to work (so the program regresses to an earlier state with worse functionality). In order to test for regressions, you need to have a body of tests that are run regularly (let’s say, daily, or after every code change), and to compare the outputs.

Acceptance testing is performed to check whether the completed program satisfies the specifications as given by the customer. Preliminary acceptance testing is first performed internally by the developers or by a testing team. A second (and hopefully final) step is user acceptance testing, in which the user or customer goes through the program and validates that the program meets the requirements.

Functional vs. Non-Functional

The distinction is whether you are testing what the program does (functional) or how it does it (non-functional).

Functional testing means testing program correctness: the program should do the right thing (and not crash, or give a wrong result).

What other things might you care about besides correctness? Some answers are resource usage, security, and usability. These are all examples of non-functional testing.

Stress vs. Load vs. Performance Testing

Not much distinction here. Generally all three refer to working the system to check how it behaves and whether it might crash, become unusably slow, or eat up crazy amounts of resources.