Abstract: Test strategy describes the overall methods and goals of test engineering. Describe which stage of testing is currently being carried out, the types of tests (functional testing, performance testing, coverage testing, etc.) that are being carried out in each stage, and testing manpower arrangements, etc.

This article is shared from Huawei Cloud Community "A Brief Talk on Testing Strategies for Agile Development" , author: Senior Sister Mei, Taohuadao, Agile Jianghu.

Preface

With the emergence of agile and DevOps, the traditional software development model has been changed. At the same time, testing is also facing considerable challenges. In the agile development model, the short-cycle iterative delivery model means shorter time, and embrace change means change Frequently, the way user stories describe requirements means fewer documents, and a full-featured team means fewer dedicated testers. Based on this situation, how to make testing agile and do a good job of testing? Today we will talk about how to make a good test strategy for agile development.

Agile development test strategy

The test strategy describes the overall method and goal of the test project. Describe which stage of testing is currently being carried out, the types of tests (functional testing, performance testing, coverage testing, etc.) that are being carried out in each stage, and testing manpower arrangements, etc.

We can plan a reasonable test strategy according to the test purpose, scope, start and end time, personnel arrangement, and tools, namely the 5W1H method.

  • why: Why do you want to test, and what is the purpose of the test?
  • what: The content and scope of the test, what to test, and determine the test focus (RBT based on demand testing, etc.)
  • when: the start and end time of the test, considering the factors that affect the time
  • where: storage location of related documents, storage of defects, environmental geology
  • who: Arrangement of testers
  • how: Which test tool and method to use for testing

Why

According to the principles of agile testing, the purpose of testing is to prevent defects and help the team build the best system. You can set an overall test goal according to the characteristics of the business and the project.

What

According to the four quadrants of testing, the test content is divided into categories from the perspective of business and technology, as well as from the perspective of programs and products, as shown in the figure below.
image.png

Figure 1 Test four quadrants

According to the principle of agile hierarchical planning, different levels of testing are also used for testing. You can refer to Epic-Feature-Story-Task to formulate strategies. The following can be used as a reference for formulating strategies. Most of the businesses and products are different, and you can adjust them according to the characteristics of your business and products.

The agile development process is composed of iterations. Epic is completed by several iterations, usually integration testing and end-to-end testing; Feature is usually implemented in several iterations, and feature testing, functional testing, UAT, and scenario testing are usually performed; Story usually It is completed in iterations, usually with functional testing and user story testing; Task is the testing within iterations, usually with unit testing, module testing, and code quality testing. The performance test will cover the Story, Feature and Epic levels.

When

In the traditional waterfall development mode, testing is a stage. After the program is written, it enters the testing stage, as shown in the figure below.

image.png

Figure 2 Waterfall development model

In the agile development model, testing is not just a stage, but an activity. Each Sprint has a testing activity. Each iteration will conduct unit testing, code quality testing, user story testing, feature and capability acceptance testing; starting from Sprint2, a Sprint-level regression test will be conducted, which will be implemented in the form of automated testing. After accumulating several iterations, end-to-end integration testing is required before release. As shown below.
image.png

Figure 3 Sprint test activities

Where

Although the form of light documents is adopted in agile development, the management of related documents must also be done well. At the beginning of the test, it is necessary to agree on the management and storage form of related test deliverables, including but not limited to test strategies, test artifacts, defects, test data, virtual services, and automated scripts. It is usually managed in a project management tool to establish an association with the developed work item, which facilitates follow-up traceability and inspection. Take Huawei Cloud DevCloud as an example, you can upload documents to [Wiki] and [Documents], and then establish associations in work items.

image.png

Figure 4 Huawei Cloud DevCloud example

Who

In agile development, testing activities are the joint work of the team, not just the testers. Developers do TDD, unit testing, and code quality testing. At the same time, because interface testing involves internal logic issues such as data exchange, transmission, and control management between interfaces, it is also recommended to be carried out by developers. Testers include testers within iterations and technicians across iterations. Testers in the iteration are mainly responsible for the design and execution of iterative tests, including exploratory testing and the development and execution of API, UI test automation scripts, and automated regression smoke testing. Cross-iteration testers are more focused on coordinating testing and formulating automated testing strategies.

At the same time, the tester is a member of the team, not only performing the test work, but also participating in the test plan, evaluation and work arrangement, review and any other team activities.

How

In order to be able to better cooperate with the mode of agile development of small steps and fast delivery and early delivery, testing needs to have the ability of rapid testing and early feedback. Under the tight time frame of agile methods, automated testing capabilities are indispensable, which can greatly alleviate the pressure of testing. According to Mike Cohn's test pyramid , the proportion of automated testing is 7:2:1, that is, unit testing accounts for 70%, interface testing accounts for 20%, and UI testing accounts for 10%. This achieves hierarchical automation. On the basis of automation, manual exploratory testing is required.

image.png

Figure 5 Test Pyramid

Now there are many automation tools to choose from, open source tools such as appium, Cucumber, and Protractor at the UI layer, POSTMAN at the API layer, and DbFit at the database layer; commercial tools such as IBM RFT and LeanFT at the UI layer, and SmartBear at the API layer.

In the selection of automation tools, it is necessary to proceed from the actual situation and consider the cost budget, support platform, support language, measurable applications, technical requirements, and many other aspects. Open source tools save costs, and commercial tools cost high; the choice of open source tools should also be combined with the code capabilities of team members. Open source also has technical difficulties; the degree of subsequent support of the tools should also be considered, and it is not possible in the process of use. Avoided will encounter problems.

Examples of test strategies

A product usually consists of several releases, as shown in the figure below.
image.png

Figure 6 Agile development

Taking a release cycle as an example, let's take a look at the test schedule according to the timeline:
image.png

Figure 7 Example of a test strategy

When formulating a test strategy, pay attention to arranging a reasonable test rhythm and cycle. At the same time, the best test is a fully automated daily test.

postscript

The above 5W1H for formulating test strategies can be used as a reference. The most important thing is to keep in mind that the purpose of testing is to prevent defects, help the team build the best system, and deliver valuable products to customers. Therefore, the testing strategy of shifting quality to the left should be regarded as one of the most important project management core concepts throughout the delivery of the entire software life cycle, through defect prevention to move quality to the front end of the entire life cycle, and driven by the development of risk-based testing strategies , Find major defects as early as possible.

Click to follow, and learn about Huawei Cloud's fresh technology for the first time~


华为云开发者联盟
1.4k 声望1.8k 粉丝

生于云,长于云,让开发者成为决定性力量