1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Purpose of testing (3 answers)
Predictable way to develop
To find bugs and errors.
Gain understanding of the code
Black Box Testing
Examines the functionality of an application without peering into its internal structures or workings
White Box Testing (2 answers)
You have access to all the code and you test the internal workings of an application, rather than its functionality.
White box testing is used at the unit level, but also for integration and system testing.
Acceptance Testing (2 answers)
Essentially, a suit of tests required to accept the program as functional
Enables an organization to engage end users in the testing process and gather their feedback to relay to developers.
Regression Testing (2 answers)
Involves re-running tests to ensure that existing features are not broken when updates are made to the code.
Can include functional and non-functional tests
Functional Test
Used to test whether the functions and features of the application are working (i.e. unit testing, integration testing).
Non-functional Tests
Used to test the performance of the application (i.e. load and stress testing).
Integration Testing (2 answers)
This is for making sure that the multiple parts of your system can work together in some way (combine individual modules and test as a group).
Integration testing exposes faults in the interaction between modules when they are integrated.
Unit Testing (1.5 answers)
Method where individual components or modules of an application, typically functions or methods, are tested in isolation to ensure they function correctly.
Typically automated
A unit
A unit can be a module, class, or method.
Code-Based Testing Methods (5 answers)
Code path coverage
Statement coverage
Branch coverage
Condition coverage
Decision tables
Code-Based Testing
Code based testing involves testing out each line of code of a program to identify bugs or errors during the software development process.
Control Flow Testing (2 answers)
Uses the control structure of a program to develop the test cases for the program.
Select inputs that cover code paths, its not possible to cover all so instead aim for coverage.
Code Path Coverage
Test the paths that you can take through your code.
Statement Coverage
Test the statements in your code then develop tests to cover those statements. if, else, and boolean expressions.
Branch Coverage
A branch is for whenever a code splits at a particular point, so develop tests to cover those branches. e.g. if and else
Condition Coverage (2 answers)
Develop tests for the conditional statements e.g. true, false, if, and else.
Note: Each boolean expression is evaluated to both TRUE and FALSE
Decision Tables
Systematically capture different input and output combinations in a tabular form, then test the system behavior for different input combinations.
AAA Rule
Arrange your objects, creating and setting them up as necessary
Act on an object
Assert that something is as expected.
What to test ? (5 answers)
Expected cases
Edge cases
Boundary cases
Entire spectrum (if possible)
Exceptions
Expected cases
Testing for expected outputs given certain inputs (i.e. 2 + 2 will output 4). These should be the first tests made before moving onto edge and boundary cases.
Edge cases
Tests the outer limits of a method (i.e. If testing an addition function, you may create a test using very small numbers, and a test that uses very large numbers.)
Boundary cases
Should test both sides of a boundary. (i.e. If testing an addition function, you may create a test using a negative number, and a test that uses a positive number. )
Exception cases
If there are places in your code where you raise an exception, then you should test that these exceptions are raised when expected.
Programming Fault
Syntax error or logical error.
Specification Fault
Errors that occur when a program's behavior deviates from its intended requirements or specifications.
Calculation Fault
Precision error, overflow error or undefined result.
Test Oracle
Something that tells you if a test case has passed or failed