Software testing-environment building ideas / testing process

1. Software test environment

Thinking:
under what conditions to do software testing?
How to do software testing?

1.1 Before setting up the test environment

Determine the purpose of the test:
functional test (verify whether the software meets the user's needs), stability test, or performance test (the efficiency of the software). For different test purposes, different points should be noted when setting up the test environment.

For example:
1. Functional test: No large amount of data is required, high coverage is required, and test data should be as real as possible;
Performance test: Large amount of stock data or a hardware configuration that is as similar as possible to the actual hardware environment; Can it be handled when tens of millions of users visit at the same time)

2.测试的软件环境要尽可能模拟真实的环境,选用合适的操作系统和软件。(比如有的用户用ios系统,有的用安卓系统)

3. Understand the test 软件运行的最低要求and hardware configuration used by users

4. 了解用户常使用的软件,避免我们做的软件配置与其相冲突(In case of conflict, flashback or other errors may occur, so avoid conflicts with the user's common software configuration.)

5. 产品化的测试需要考虑兼容性测试(Examples are external apps or web pages, that is, my software can be used no matter what software is installed on any mobile phone)

6. Construction 独立的测试环境, different people and projects should not affect the current test (I hope our test will not change because of other people, projects. For example, the test I am doing now, in case the development can also see him change, test on me Will have an impact.)

7. Build 可复用的测试环境
through backup or data isolation.
Repeatedly use a set of test environment to test multiple versions and multiple time periods.

1.2 Environment construction mode

Offline construction: build locally in the company

申请独立测试服务器或者虚拟机

测试环境配置

测试项目导入

For example:
For building a java environment:
configure the java environment (download jdk and configure environment variables)
download and install the middleware (tomcat, jetty or other),
install the database and import, enter the initialization script

Build online:
Docker mode (I seal my environment and the things I want in a big box, and then throw the box out when I want to use it, and the box directly builds the environment.)
Build my own image mirror, and then Execute deploy

Rely on third-party platforms: for
example, a cloud environment with available virtual machines, databases, etc., you can combine as needed
. Eg Ant Financial Cloud
Insert picture description here

1.3 Ideas for construction of test environment

Considerations:
use, cost of use, maintenance cost

Basic architecture:
R & D environment: used for R & D self-test and integrated testing (based on the environment used by R & D, he can self-adjust)
Test environment: used for daily single system or between two or two microservices, can also integrate automated testing return

Joint testing environment:
complete environment, used for large-scale joint testing.
(The overall joint test involves all business flows, interfaces, etc., so a very complete environment is required)

External environment (if required):
stable version environment, used for external merchants and other joint debugging

Grayscale / sandbox environment:
used for production data test and simulation test.
It is possible to omit your own data during the test, so production data is introduced
(grayscale production verification, etc .; sandbox data query production data, production file verification, etc.)

2. Test process

Insert picture description hereLogically. The testing activities are carried out in sequence,
but in the actual testing process, these activities can be overlapped or performed at the same time (such as adding friends of Alipay, login, transfer, etc. For the test of adding friends module, you still need to log in to the operation of this module )
Insert picture description here

2.1 Test planning process

Test planning is divided into the following three parts:
Insert picture description hereTest planning steps:

get on 测试需求的分析

Identify the content or quality characteristics to be tested

Clear test sufficiency requirements

put forward 测试的基本方法

Test planning needs to be carried out:

determine 测试的资源和技术需求

Conduct 风险analysis and evaluation

According to the above analysis results 定测试计划

According to the test plan to carry out the corresponding 测试控制活动

2.1.1 Demand analysis

In the past software life cycle, there was no tester involved in the requirements analysis stage. But with the optimization of the software process,测试人员的加入对需求分析阶段有了更大的作用。

Reasons why the test was added during the requirements analysis phase

1. Test engineers participate in requirements analysis, 对需求了解很深刻,reduce interaction with developers, and save time (for some functions, testing needs to be communicated with developers in the
early stage ) 2. Determine the idea of ​​writing test cases early, 为测试打好了基础
3. Yes 获取一些测试数据,为测试用例设计提供帮助(products may Learn more about user needs and master more data, so you can get some test data earlier)
4. Yes 发现需求不合理的地方, reduce test costs (violation of normal operating guidelines, etc. can be discovered early to avoid more reprocessing.)

The role of requirements testing:
1. The analysis of test requirements is used to determine the entire test work, clarify the test object and the scope and role of the test work, and serve as the basis for test coverage.
2. The determined test requirements must be verifiable, and the test requirements must have an observable and measurable result.
3. If the requirements that cannot be verified are not test requirements.
4. Test requirements analysis also includes communication with customers to clarify certain confusions
5. Clarify which requirements are more important
6. Ensure that stakeholders take a consensus on the project as early as possible
7. Have a clear understanding of future products
8. Test requirements are formulated The basic basis of the test plan
9. The test requirements are the guidance for designing test cases
10. Determine what to test and what aspects to test to effectively design the use cases

Requirements verification:
◆ Review requirements documents
◆ Carefully review requirements documents and related models
◆ In addition, informal reviews made during requirements development are also beneficial

It should do this:
以需求为依据编写测试用例:
Writing a user manual
An easy-to-understand user manual can be drafted early in requirements development to describe all the functions that are visible to the user and use it as a reference for requirements specifications and assist in requirements analysis

Determining the eligibility criteria:
Let users describe what products meet their requirements and suit their use
. The test that confirms eligibility is based on the use scenario description or use case.

Yu'ebao demand test combat

Insert picture description hereTake Alipay's Yu'ebao business as an example

1. Original demand:
As early as around 2012, Alipay was quickly accepted by the public, but it faced a relatively common phenomenon: there is always an idle fund in the balance of Alipay account, although the amount of funds in different accounts is small or large , But in general, the amount of idle funds that ca n’t be done in the account is still relatively large, which is very unfavorable for the development of Alipay

2. Demand:
So, there is such a demand, in cooperation with fund companies to launch monetary fund products, at the same time, after users purchase monetary funds, they can directly pay for the purchase of goods or services through the monetary fund amount.
Monetary funds can be used as payment instruments for consumption as if they were balances and divestments.

3. Review the requirements document:
Let's take a brief look at the requirements document, which can be roughly divided into the following:
requirements analysis
flow chart
text flow
constraints constraints
deduction priority
exception handling
security control
page

In the process of demand analysis, we will divide the above process into:
currency fund purchase, cash withdrawal, consumption, asset management, and transaction query.It
can be checked through the demand specification checklist.

2.1.2 Test strategy

Questions to consider before testing:

Do you know what the system to be tested does?
Do you know what are the characteristics of the
system ? What are the functions of the
system ? Which parts of the system need to be tested? Which ones do not need to be tested? What are the
system requirements for performance
?

The requirements of the
test strategy can be derived from the above questions: The test strategy is to describe the relationship between the test project and the test task.
It is used to explain what to measure, how to measure, how to coordinate test resources and test time, etc.

Test strategy elements:
Insert picture description here 1. Test schedule and release plan
List the important milestones of the test project itself.
Each milestone needs to have a clear end time, which can guide our subsequent testing

2. Test time
If the test time schedule is insufficient, we can select the features with higher priority in the subsequent test range to perform the test,
which can maximize the quality of the product.

3. The test range (in priority order)
into In Scope and Out Of Scope (into and out of range of the range)
in which the module is to be noted in the test range, which is not considered at this stage of the test
for the test For the modules in the scope, the priority needs to be given, so that the corresponding test time is insufficient.
For the modules that are not in the scope of the test, the reason needs to be given.

4. Test resources

Test resources are also a very important part of the test strategy. It is divided into two parts:
human resources and tools. Human resources mainly describe the people involved in the test. Of course, they can include many roles, such as professional testers, customers, product managers and other
tools. Other software used

5. Test environment The
test environment mainly includes recommended environmental solutions, operating system requirements, hardware and software requirements.
For the recommended solutions, it is necessary to state that the test project depends on other software. For
example, the test project depends on JAVA, and the recommended version may be 1.7

6. Test methods
The list of test methods is mainly to illustrate what types of tests we want to carry out for the test project.
Functional testing is necessary, non-functional testing is optional

7. Document management
For a complete product, the document is an important part. It generally includes installation, upgrade documents, user guides and other
documents. It is not just a file, it is already a part of the software, so you need to complete the test to send it. To users, so as not to incorrectly mislead users and make them lose confidence in the test project.

8. Risk management The
risk management module needs to list the currently known factors that may appear uncertain (such as our company ’s technology cannot meet user requirements, such as 300 million people accessing an app at the same time)
These factors It may come from technology, resources or other aspects (for the required software, it may be very expensive, the company can not afford it, or need to connect with the bank to test successfully, but it may not be able to connect with the bank)

2.1.3 Test plan design

Test strategy:,
侧重需求分析,评估风险 define the test scope,
determine the test method, formulate test start, stop, completion standards and conditions

Test plan:
develop project 测试过程中的测试重点
task assignments and schedule various stages of the arrangement
and to provide an assessment of various tasks, risk analysis, test strategy may include

Test plan:
侧重测试的方法, test environment planning,
test tool design and selection, test case design method, test code design plan

Test strategy VS test plan VS test plan
◆ In the actual implementation process, there are often similar ways:

测试方案=测试计划+用例设计方案+工具选择+自动化/性能测试具体方案

测试计划=测试策略+测试任务分配+时间进度安排
Insert picture description hereAnalysis process of monetary fund consumption test plan
1. Analysis 需求: The
current test includes requirements (requirement documents or wiki links, etc.)
2. 测试计划(Milestones) and person in charge:
organize the test leaders, task assignments and test schedules of each module of the current project
3. Test 范围and test focus:
those points Need to test, where to focus, priority arrangement
4. Strategies and tools : 是否需要进行自动化、性能、安全测试?使用哪些工具.
5. Test case design method:
what kind of black box test method to use for design (equivalence class? Boundary value? Cause and effect diagram? Etc.)
6. Test environment:
What is the test environment? Which servers, databases, and configuration are required
7. Joint debugging test
是否需要与第三方或其他部门进行联调:? When will it be launched? What functions does the joint debugging include? For example, fund company
8. Test limitation:
in the test environment 哪些内容无法测试?
9. Test 风险:
Test risk considerations due to timing, test restrictions, and priority distribution during the test or planned test process

2.1.4 Test plan review

If the test plan is not reviewed, it will cause serious consequences:
only obtaining information from documents and communication may cause information asymmetry, one-sided understanding, wrong understanding or in-depth understanding. The
lack of peer cross-review and development review mechanisms cannot be fully utilized. Collective wisdom, personal thinking is difficult to break through, there may be cases where the test is missed

The purpose of the test review: to
present the work of the test
与开发达成共识.(such as the operation of sending red envelopes, for development: when the money is on the account, even if the operation is completed; for the test: whether the user has the need to not want the red envelope)
不同的思维方式, sparks and learn from Way of thinking
Cultivate such a behavior pattern: willing to make suggestions for the team or others
to 团队协作,maximize the use of personal experience, expertise, and complementary skills.

Key points of the review:
采用的测试方法 (For example, I do n’t think this project needs performance testing, but it may be necessary)
等价类划分的依据
测试数据的选取和准备方法(For example, to make an addition calculator to verify whether it is selected, it is impossible to enter all the data, so why is it necessary to select those data? Review)
流程测试的路径组合(How to carry out the process of buying goods
数据比对选取的对象和检查点in Taobao ) (such as buying a new mobile phone on Taobao, evaluating whether the database interface, data, etc. are normal after placing an order)
是否需要模拟数据and methods for simulating data (such as the activity of predicting the Double Eleven , Then you need to simulate how much data and how many orders to make a plan)
based on 风险的测试取舍(when the risk cannot be overcome, it needs to be leaked out in batches)

Published 82 original articles · praised 7 · visits 4180

Guess you like

Origin blog.csdn.net/sunshine612/article/details/105257395