Abstract: some practical experiences in testing in software projects

Source: Internet
Author: User


Abstract: some practical experiences in testing in software projects



As we all know, testing is an essential part of software development. Testing is an important means to ensure the quality of software, or even the life of software. However, how to do a good job of testing or passing tests to achieve the desired results is worth studying.






In many software development companies, testing is the easiest way for senior leaders andProgramA link ignored by members. When the progress of a project is very urgent, a practice interview should be seen as a learning experience testing is often the most time-consuming stage. The result is that "focusing on testing and fully testing" is a blank sentence.



From the perspective of software engineering, agile development that incorporates user experience practices the test activities of our project can be divided into three phases: test plan, test implementation, and test analysis. Next, we will describe how we did this in three phases of the project development activity.



[Planning stage]



First, we should determine the development method and plan at the initial stage of the project. Add a test designer role to the project plan. Test designers will participate in our project development activities from the beginning to the end, including requirement analysis, system analysis, and system design; generate Test plans and test cases based on the documents at each stage of the project, such as the analysis and design documents. The test designer reports the test plan to the Project Manager as part of the project plan. The test plan includes the time, personnel, goals, and test methods for each test.






Second, the project manager and test designer will determine the testing method of the test and the testing strategy for each stage of the application. In our project, we adopt four major testing methods, namely unit testing, integration testing, system testing, and performance testing, to implement them at different stages and set the corresponding testing objectives. practical experience requirements cima Simply put, this test aims to identify the number of bugs or improvements at a certain stage.



Third, even better plans should be implemented by people. The key to success depends on the enthusiasm and Responsibility of the project team members. Everyone knows that many programmers hate testing and think that testing is a waste of time and cannot receive any practical results, therefore, project managers and Test designers both need to spend some time to mobilize programmers to perform effective tests.



[Implementation phase]



According to the project plan and test plan, we adopt four internal testing methods, namely unit testing, integration testing, system testing, and performance testing. At the initial stage of system design, the system testability was taken as a design goal. Therefore, we purchased a popular J2EE multi-layer architecture technology, combining multiple common J2EE design patterns such as MVC, Dao, service locator, value object. Combined with the J2EE development guide and MVC, we can publish the entire system into the following layers: Model (DAO, service), controller (struts, Action), view (JSP, tiles, formbean ). let the project personnel develop at each level. After each function is developed, unit tests and use cases are completed simultaneously. After each layer of functions is completed, we perform integration and integration tests on each layer, during the integration test, all programmers are required to submit a check list for each function point according to the Requirement Description and design documentation to the test team's colleagues for testing. After all the integration tests are passed, the test designer organizes the system tests based on the written test cases. Performance testing will be conducted before it is handed over to customers. The following describes how to perform various tests:



1. Unit Test



The author of JUnit once said that software development without a unit test is like walking on a steel wire without any protection. because our project is a multi-layer architecture, practical work experience definition different test tools are used on different layers. For example, in the Service & Dao layer, JBuilder + JUnit is used, and cactus is used as the main test tool in the Controller & view layer. Through the combination of ant and ant, a unit test report is automatically generated. As we all know, unit tests do not have enough test cases to be ineffective. Therefore, we set the test case coverage rate to approximately 80% in unit tests, the project will use jcoverage to track whether the programmer's use case has reached the goal, to ensure the quality of unit testing.


2. Integration Testing



The purpose of the integration test in our project is to check whether the connections between different layers are successful and no exceptions that cannot be captured will be thrown. Integration testing is performed simultaneously when tools are integrated. Ant + JUnit + cactus is used to collect testing cases for all programmers and generate test reports.



3. System Test



System testing is a comprehensive test of the entire system. In our project, system tests will be written by the test designer based on the requirement specification and test plan. Before the system test starts, the project manager arranges the program to analyze the Function Points encoded by the program and submits a function checklist to the test designer. The function checklist includes business logic or input validity check. After receiving the function checklist, the test designer arranges testers (cross-testing between programmers or third-party personnel) to check the function according to the checklist. If a bug is found, the test designer records the Jira (issue tracking tools) to track the status of bugs.



4. Performance Testing



Performance testing is an essential step before users are released. The performance of a system may affect the success of the entire project. The performance test mainly uses Apache jmeter for stress testing. The performance test includes the page response time and the carrying capacity of concurrent users, use profiler to collect performance reports while performing stress tests to collect system bottlenecks. Through performance tests, we found many problems, such as misuse of transactions, too long USER initialization time, and the system will not be able to run when 200 people log on to the system at the same time. We have passed the performance test report and solve this problem through the following methods:



A) fromCodeRemove query transactions, write transactions to a single table



B) Reduce the data associated with users and the close relationship with users



C) Adjust the initial memory and maximum memory of the Application Server



D) add cache to the DaO layer and query



After the above scheme, the system performance has been improved by more than 40%.



[Result analysis stage]



result analysis is an important part of testing. We can use tools to collect key information such as the cause, introduction phase, modification time, severity, and type of a bug. Analyze the test efficiency and causes Based on the above information to form the company's knowledge base document and software quality database.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.