Testing Flashcards Preview

Full Stack Web Development > Testing > Flashcards

Flashcards in Testing Deck (5)
Loading flashcards...
1
Q

What is the difference between load and stress testing?

A

LOAD TEST:

  • measures system performance as the workload increases
  • usually conducted to understand the behaviour of the system under a specific EXPECTED load.

E.G. concurrent users or transactions within the set duration.

This test will give out the response times of all the important business critical transactions.

STRESS TESTING:

  • performed to understand the upper limits of capacity within the system
  • determine the system’s robustness in terms of extreme load
  • helps application administrators to determine if the system will perform sufficiently if the current load goes well above the expected maximum
2
Q

What is Mocking?

A

An object under test may have dependencies on other (complex) objects.

To isolate the behaviour, we replace the other objects by “mocks” that replicate the behaviour of the real objects.

In short, *mocking *is creating objects that simulate the behavior of real objects.

Mocking is primarily used in unit testing.

3
Q

Difference between unit & integration tests?

A

Unit Test - testing an individual unit, such as a method (function) in a class, with all dependencies mocked up.

Functional Test - AKA Integration Test, testing how one function integrates with another.

This will test many methods and may interact with dependencies like Databases or Web Services.

4
Q

Difference between acceptance test and functional test?

A

A functional test verifies that the product actually works as you (the developer) think it does:

  • did we build a correctly working product?
  • does the software meet the business requirements?

Acceptance tests verify the product actually solves the problem it was made to solve.

  • did we build the right thing?
  • Is this what the customer really needs?
5
Q

What is profiling?

A

*Profiling *measures how long various parts of the code take to run.

This is particularly useful if you have some code that is running slower than you need it to run.

  • identify where the time is going
  • concentrate your efforts on fixing that bottleneck