Important decisions that affect the effectiveness of unit testing (1)

Source: Internet
Author: User

Today's quality partners to tell you about unit testing.

based on hands-on practice, tracking and observing the surrounding It team and peer sharing, quality partners find it people in the software development process a series of choices on the effectiveness of software unit testing has a significant impact. Preliminary grooming involves at least the following aspects:

    • set test target

    • Select test policy

    • Division of participant responsibilities

    • Span style= "font-family: ' Microsoft Jacob Black '; font-size:14px;" > split test application

    • Select test Framework

    • report test result

    • Build Team testing capabilities

quality partners observed , it a (b) handling user experience complaints / Quality accident; (c) should be marketed / IT b IT

The opportunity to participate in the "Set test target" activity IT Organization members include the proponents of unit testing, and the echo. The choices they may make include:

when time, money, knowledge and skill constraints are more relaxed, the goal is extended to a comprehensive system to improve quality, that is, the test target may be set to " improve development management, implementation process, reduce quality risk ." After all, bigger and stronger is a kind of organizational habit behavior;

when participating in this activity, the member QA as the main body, it is possible to focus on strengthening the quality assurance system, the goal is set to " improve the quality assurance process, reduce the quality risk ." These are the areas that members have the ability to grasp;

The quality partners believe that the goal setting should cover the following three areas.

Improve the existing quality link - improve coding rules, unit testing, integration testing, improve the early detection rate of defects, reduce defect omission;

standardize test process activities - test requirements, test design, test execution, defect tracking;

promote the use of testing facilities -- The introduction of high-efficiency testing technology and framework, strengthen the different links, improve testing efficiency;

in practice, many It people have chosen this path.

The quality partner observes that improper test target selection makes some IT People's work is in trouble. That

the test target is higher than the specific product quality requirements or long-term goals and short-term effects may not be balanced when IT organizations accumulate technology. After the goal is set, the execution stage needs to be further refined into a set of methods, processes, procedures, specifications. When the refined elements and the IT organization's existing practices, experience, infrastructure overlap the higher the performance of the better. Otherwise, it may take a long time to implement the above refinement elements, in order to reflect the increase of defect detection rate, reduce the effect of defect omission. Experience shows that if the goal is to pursue the effect of vertical pole, it is better to increase the test case, execute efficiently and test the result.

If the target of the set test is lower than the quality requirement of the product, the execution process may be smooth. As the development cycle evolves, back-end links will uncover quality issues beyond expectations. The product loses its competitiveness when it is serious;

There are times when It people lack accurate quality risk identification when formulating test targets, and then refine a set of methods, processes, procedures, specifications and corresponding assessment indexes based on the target, and the results are worth discussing. Experience has shown that there are differences in the quality attributes of different parts of the software, and that testing efforts should focus on high-risk sections. Test efforts to minimize the quality risk of the product.

Next, examine the impact of the Select test Strategy on the test results:

any software development project is limited by time, quality and resource input. IT People need to deliver quality-approved products to customers at a given time and resource input. The proponents and proponents of unit testing must determine the focus of unit test resources - selecting specific test strategies.

for unit tests, IT People may choose the following test focus ( resources and effort points ):

By improving the code standardization, eliminate the hidden trouble of bad coding habit in code implementation;

by verifying the design and implementation of the consistency of the implementation of the code to eliminate inconsistencies with the design;

Eliminate inconsistencies between code implementations and functional specifications by improving and confirming functional integrity;

Eliminate inconsistencies between code implementations and interface conventions by promoting and validating interface compatibility;

Through repeated verification, avoid the side effects of modification, and eliminate the inconsistency between the code and the expected;

Quality partners observed that the risk of improper selection of the "Test strategy" might be

Test activities cannot be effectively matched with other quality assurance attempts, positive impact;

lack of organic cooperation with the selected strategy, mature / Efficient identification, monitoring, tracking means;

lack of organic cooperation with the selected strategy, mature / efficient execution control, results generation, reporting means;

The test activity looks very clear during the planning phase and has a lot of difficulty executing. A lot of repetitive, time-consuming, high-intensity work requires a lot of human input.

Take a look at the impact of the "delineated unit" on test effectiveness:

Quality Partners observed that the so-called unit, the industry has different identification. IT People need to combine their own development activities to determine the specific connotation. Possible options include:

The development team may define the unit as a source snippet if it is expected to focus on verifying that the code logic conforms to expectations through the unit test activity;

The development team may define the unit as a function by verifying the program code and behavior developed in a structured way through the unit test activity;

The team may define the unit as a class and attribute if it is expected to validate the program code and behavior of the object-oriented development through the unit test activity;

When expected to pass the unit test activity and verify that the existing program code files are used, the team may define the cell definition source code file ( coupling function ) ;

If the Validation program module is correct through the unit test activity, the team may define the module /component of the unit ;

Quality partners note that improper selection of cell definitions may induce some column risk. Including:

in the process of unit test implementation, the lack of mature / Efficient identification, use case creation assistance, monitoring, tracking means;

in the process of unit test implementation, the lack of mature / efficient test Execution control, result summary, report creation / distribution means;

Therefore, the selection of source code logic fragments, source code files, program modules / components as test objects requires careful evaluation.


This article is from the "It person's quality partner" blog, so be sure to keep this source http://leewhoo.blog.51cto.com/5312621/1684622

Important decisions that affect the effectiveness of unit testing (1)

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.