Lecture 10 Flashcards
What is Software testing?
An Activity designed to uncover faults in software
3 Stages of Testing
Development testing, where the system is tested during development to discover bugs and defects
Release testing
User testing
What is Unit testing?
Low-level focusing on a small part of the system
Written by the software developers
Should be fast, so they can be repeated many times
Unit testing: How?
- Arrange: set up the test data
- Act: call your method under test
- Assert that the expected results are returned
Unit Test: Best Practices
Each unit test should be able to run independent of other tests.
Each test should test just one thing (single behavior, method, or function)
All external dependencies should be mocked.
The assumptions for each test should be clear and defined within the test method.
Name of the test method should be meaningful.
Unit tests should be fast, so that it could be run as often as required
Test Coverage: Why?
Measure used to describe how much the tests exercise the code
Offers a quantitative measurement.
Types of coverage:
Function (was a particular function called?)
Statement (was a particular line of code executed)
Branch (was an edge in the program executed
Other – increasingly expensive to calculate
100% test coverage DOES NOT guarantee 0 bugs
What is Release testing?
Release testing is:
testing a release that is intended for use outside of the
development team
usually a black-box testing process - tests are only derived from
the specification
done by a team not involved in development
The goal is to convince the supplier that the system is
good enough for use.
In contrast, in system testing the development team focus on discovering bugs in the system.
What is Release testing?
Release testing is:
Testing a release that is intended for use outside of the
development team
Usually a black-box testing process - tests are only derived from the specification
Done by a team not involved in development
What is the goal of release testing?
The goal is to convince the supplier that the system is
good enough for use.
In contrast, in system testing the development team focus on discovering bugs in the system.
What is User testing?
User or Customer testing :
Is a stage in the testing process in which users provide input and advice on system testing
Is essential, even when comprehensive system and release testing have been carried out
The influences from the user’s working environment have an effect on the reliability, performance, usability and robustness. These cannot be replicated in a testing environment
What is the 2 types of user testing?
Alpha testing-:users of the software work with the development team to test the software at the developer’s site
Beta Testing-a release of the software is made available to users to experiment at their own site
Advantage of writing unit tests?
Writing unit tests will make you a better developer; strive to write testable code
What is Code coverage?
Code coverage measures the efficiency of test implementation