Before jumping into topic, a quick definition of what is Testing (google "definition of testing", I'm just saving you some time here):
A procedure for critical evaluation; a means of determining the presence, quality, or truth of something. According to the The Free Dictionary
So now that you know what testing is... there are different levels of testing:
- Unit testing. The most basic of them, is a test to verify the functionality of individual components before they are integrated with the other components.
- Build verification testing (BVT). Is a test to validate that the product build is installable and performs basic functions required by the product.
- Functional verification testing (FVT). Is used to verify that each function operates in accordance with the written requirements
- System verification testing (SVT). Is the test of the entire product or a set of products in predefined system environments. During this step you can also perform some Performance Testing (how fast does the program executes) and Usability Testing (how usable is my program).
- Integration testing. Is a test to evaluate how the products interact together for a whole solution.
- Acceptance testing. Is used to identify whether or not the system satisfies a set of acceptance criteria.
Unit testing is the lowest level of dynamic testing that occurs during software development. Developers test their individual units of software in isolation from the overall product, ensuring that each component or module that is separately testable is functionally correct
There are five activities essential for successful unit testing:
- All inputs validated
- All code paths and branches executed at least once
- All exception handling cases triggered
- All data and variables are initialized before use
- Simple regression tests created
- White-box testing. it requires explicit knowledge of the code been tested. Developers use this knowledge to determine what test cases and test data to use and execute.
- Test coverage: When designing white-box test cases, one critical factor determines test validity: are all possible paths, decision points, and loops in the code tested? You can measure this coverage in a number of ways:
- Statement coverage measures the number of lines of code invoked.
- Branch coverage measures the number of decisions or yes/no expressions invoked.
- Path coverage measures the number of paths executed.
- Basis path testing: The basis path testing technique provides a way to guarantee that all independent paths are tested. This technique consists of four steps:
- Create a control flow graph.
- Determine the cyclomatic complexity of the graph.
- Determine the basis path set.
- Create the test cases by determining which inputs will exercise each basis path.
- Condition coverage: Another white-box testing technique is the condition coverage method. This technique produces enough test cases that each condition in a decision generates each possible outcome at least once, and each point of entry to a program or subroutine invokes at least once.
No comments:
Post a Comment