The central elements of testing are the test strategy and the test model, which aim at systematic and structured testing. Let's dive into the details of these concepts together and learn how to develop an effective test strategy and model.
Test model
A test model is used in test documentation to organize and structure the whole test process. It is a plan or framework that defines the main stages and steps to be performed in the testing process. A test model is usually created by a team leader or business analyst. The test model specifies the different types of tests, their sequence, and the roles and responsibilities of the test participants. Here's how the test model is used in test documentation:
Define the test objectives and scope. The test model specifies the test objectives and the area to be covered by the tests. This helps everyone understand what exactly is being tested and what results can be expected.
Test planning. The test model defines the order in which the tests will be performed and the distribution of tasks among the team members. It also includes information about the resources required for testing and the time frame for completing the tasks.
Selection of test types. The test model specifies the different types of testing that will be used, such as functional testing, integration testing, load testing, etc. This allows participants to understand what aspects of the application will be tested during the test.
Description of test cases and test scripts. The test model includes a description of the test cases and test scripts that will be used to perform the tests. The test cases describe the steps required to perform the test and the expected results.
Documentation of Test Results. The test model provides a mechanism for documenting test results, including defects and errors found and the execution status of each test case.
Reporting and feedback. The test model provides a mechanism for reporting test progress and application quality. This allows the team and stakeholders to monitor progress and take action if problems are identified.
Using the test model in test documentation helps the test team to navigate the process, adhere to testing standards and procedures, and ensure that the application functionality is fully covered by tests. This helps to improve the quality of the software product and increase its reliability before it is released to the market.
Example of a test model
Suppose we are testing a web application for an online shop. The test model might include the following aspects:
Types of tests:
Functional testing: checking that functions such as adding items to the shopping cart, checkout, and payment work correctly.
Non-functional testing: checking performance, reliability, security, and usability.
Sequence of test execution:
Initial unit-level testing.
Component integration testing.
End-to-end testing of purchase and payment scenarios.
Tools used:
Selenium for automated functional testing.
JMeter for performance testing.
OWASP ZAP for security testing.
Test strategy
The test strategy is the most important document for any QA team, describing the approach to testing. It is essentially a relatively small static document that precedes the test plan. Before writing a long and detailed plan, it is worth formalizing some basic approaches to testing and making sure that everyone understands what will be tested and how. There is very little chance of missing any testing activity if a proper testing strategy is in place. Writing an effective strategy document is a skill that a tester develops with experience.
A strategy includes:
Roles and responsibilities in the test team – a description of who is responsible for what.
The area to be tested – a component or the whole software product.
Test tools – what tools will be used during testing.
Test environment – which environment will be used for testing (usually dev or production).
Test schedule.
Associated risks – description of what we may not have time to test, etc.
Example of a test strategy
Let's say we are developing a mobile application for financial management. The test strategy might include the following elements
General approach:
The focus is on the functional and secure use of the application.
A combined testing approach is used, including manual and automated testing.
Test methods:
Functional testing: checking the operation of all the functions of the application.
Security testing: checking for vulnerabilities, and protection of user data.
Compatibility testing: testing on different devices and operating systems.
Resources and timing:
A dedicated test server has been allocated for automated testing.
Testing is carried out over a two-week period, starting with the integration phase.
Reporting:
Daily reports on test results, bugs found and their status.
Weekly reviews of test results with developers and project management.
The difference between test model and test strategy
Test model and test strategy are two important concepts in testing, but they have different purposes. A test model is an abstract description of how a product will be tested. It defines the general approach to testing, the types of tests, the sequence of test execution, and other aspects of testing activities. A test model helps to plan and structure testing by providing an understanding of what aspects of the product will be tested, by what methods, and in what order. It is a kind of "map" for testing.
A test strategy is a high-level document that describes the overall approach to testing within a project. It includes the general principles and objectives of testing, defines how testing will be performed, what methods and tools will be used, and what resources and schedules will be allocated to testing. The test strategy may also include information about what risks and constraints may affect testing.
In short, a test model is a plan that describes the structure and organization of testing, and a test strategy is a document that defines the general approach and principles of testing for the whole project.
Conclusion
The test plan serves as a comprehensive roadmap for testing activities, outlining what, how and when to test, while the test strategy defines the overall approach and guides the testing process. Both documents, written by the test lead or team lead, play a vital role in streamlining testing efforts, clarifying responsibilities, and addressing potential risks.