1/14
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
How would we test unit?
To test a unit in isolation, we create mock objects to represent components that are external to the unit.
Test driver
simulates a part of a system that invokes operations on the unit
Test stub
simulates a part of a system that is called by the unit
Unit testing cycle
Create the unit, test driver and test stub(s)
Have the test driver invoke an operation on the unit
Ensure that the unit behaves as expected
Test Case Method Naming
<method_name>_<Startingstate>_<expected_result>
Integration Testing
Tests how components of a system interact with each other
Tyoes of intergration tests
Horizontal integration Testing: Focuses on testing layers of a system, with new layers incrementally added to a test
Vertical Integration Testing: Focuses on testing scenarios or user stories
Types of Horizontal Intergration Tests
Top-down testing: highest level subsystems are tested first.
Bottom-up testing: lowest level subsystems are tested first.
Sandwich testing: combines top-down and bottom-up approaches. Testing converges on a target layer.
Big bang intergration
all units are linked at once and the entire system is tested
Front-end component testing encomposes
Snapshot Testing
Accessibility Testing
Visual Regression Testing
End-to-End Testing
SAVE
Continuous Integration (CI)
a software development practice where code changes are frequently integrated into a shared repository, typically multiple times a day
Each integration triggers automated build and testing processes to detect and address integration errors as early as possible in the development lifecycle
What happens everytime a new build is generated?
Run unit tests on changed components
Run regression tests on unchanged components to ensure they still work as intended
Run integration tests on the system
Continuous integration tools
GitHub Actions
Azure DevOps Pipelines
Travis CI
Quality Tests
Timing testing – test response times
Recovery testing – test how system responds to errors or lack of data etc.
Volume testing – test with large volumes of data
Stress testing – test beyond the normal limits of a system
Degrees of acceptance testing
Alpha Tests – client uses software in development environment Developers on hand to fix issues
Beta Tests – conducted in production environment. Small subset of user base chosen to use system