Software project test practice

xiaoxiao2021-03-06  126

It is well known that testing is an indispensable part in software development. Test is an important means of ensuring software quality, and can even be called software. However, how to do a good job or reach the desired effect by testing, it is worth studying.

In many software development companies, testing is the easiest way to neglect by high-level leaders and programmers. When a project progress is very urgent, the test is often a stage of time shrinkage. The result is to make "attention test, fully tested" into a sentence of empty words.

From a software engineering point of view, our project test activities can be probably divided into three phases, namely test plan, test implementation and test analysis. Next, we will describe how we do it in the three phases in project development activities.

[Plan]

First, we determine the development mode and formulate plans in the initial stage of the project. Add a test designer role in the project plan. The test designer will participate in our project development activities, including demand analysis, system analysis, system design; and documentation in accordance with the documentation of the project such as the analysis design documentation, according to the documentation of the project such as the analysis design document. The test designer reports the test plan to the project manager as part of the project plan. The test plan contains time, personnel, objectives, and test methods for each test.

Second, project managers and test designers will determine the type of test of tests and test strategies for each stage. In our project, four main test methods such as unit testing, integrated testing, system testing, performance testing are implemented in different phases, and the corresponding test goals are set. Simply put the test goal is how many bugs should be found in a certain stage or need to improve.

Third, a good plan is still implemented by people. The key to the success of the test is to rely on the enthusiasm and responsibility of the project group members. Everyone knows that many programmers are annoying testing, thinking that testing is a waste of time and can't receive any practical effects, so project managers and test designers need to spend a certain time to mobilize programmers to perform effective testing. .

[Implementation phase]

In accordance with the project plan and test plan, we have used four test methods, namely unit test, integrated test, system test, performance test. In the early stage of system design, the system can be measured as a design goal, so our project procurement is currently popular J2EE multi-layer architecture technology, combined with multiple common J2EE design patterns such as MVC, DAO, Service Locator, Value Object. Combined with J2EE Development Guide and MVC, we probably divided into the following levels, MODEL (DAO, Service), Controller (Struts, Action), View (JSP, TILES, FORMBEAN). Let the items given separately Development is developed at all levels. After each function development is completed, unit testing and use case are completed simultaneously; when we are completed, we have integrated and integrated testing at all levels. During integrated testing, all programmers are required to submit one according to the requirements and design. Each function point Check List is given to the test group's colleague test. After all integrated tests passed, the test designer will organize system test according to the write cases of test. Performance Test We will be done before use. The following will be described below to explain how various tests are processed:

1. unit test

The author of JUnit has said that software development If there is no unit test, it is like a person walking on the wire, there is no guarantee. Due to the multi-layer architecture, different test tools are used in each different layer. For example, in the Service & DAO layer, JBuilder Junit uses CACTUS as the main test tool in the Controller & View layer, and generates a unit test report by combined with Ant. Everyone knows that there is not enough test case without the unit test. It is basically no effect, so we set the target coverage in unit tests is approximately 80%, and the project will track the use case of the programmer through JCOVERAGE to achieve the goal. To ensure the quality of the unit test. 2. Integration Testing

The goal of integrated testing in our project is to check whether there is successful connection between the layers and will not throw an unusually captured exception. The integrated test is performed simultaneously by tool integration, using Ant JUnit Cactus to collect tests for all programmers to collect tests and generate test reports.

3. System test

System testing is a comprehensive test over the entire system. System testing in our project will be prepared by test designers to prepare test cases based on demand instructions and test programs. Before the system test begins, the project manager arrangement analyzes yourself, and submits a functional checklist to the test designer. Functional checklist includes business logic or input validity checks. The test designer receives the function checklist scheduled tester (programmers cross-test or third-party personnel), according to the checklist, if the bug is discovered, the JIRA (Issue TRACKING TOOLS) is recorded to track the state of the bug.

4. Performance Testing

Performance Test is an essential step before publishing users, and a system performance is good or bad will affect the success of the entire project. Performance testing is mainly based on Apache Jmeter, and performance testing includes page response time and concurrent users, using PROFILER to collect performance reports while performing pressure testing to collect system bottlenecks. By performing performance testing, we have found more problems, such as abuse of affairs, user initialization time is too long, and 200 people will not run when logging in. In this regard, we have been deductive, and we solve the following methods:

a) Remove the query transaction from the code, write a transaction single table

b) Reduce the data associated with users, reduce the relationship with the user's temptation

c) Adjust the initial memory and maximum memory of the application server

d) Cache for DAO layers and queries

After the above programs, the system performance has increased by more than 40%.

[Result Analysis Stage]

The results analysis are one of the important links of the test. We can use tools for the cause of the tool, introduced stage, modification time, severity, type, and other critical information. According to the efficiency and cause of the above information analysis, the company's knowledge base documentation and software quality database.

转载请注明原文地址:https://www.9cbs.com/read-98089.html

New Post(0)