Current Situation and ideas of unit testing in China

Source: Internet
Author: User

The concept of TDD is already deeply rooted in the hearts of Chinese people. It seems that everyone has TDD overnight. However,
At present, I feel that in China, like the most basic unit test, there are still many questions in the practical application of everyone.
Or misunderstandings, or even irreconcilable contradictions, or the existing status quo, as listed below, I hope you can speak enthusiastically:

1ProgramThere are not many people who really like to write unit tests first.
In fact, in addition to those large and medium-sized software enterprises in China, such as good enterprises such as cmme or XP,
Developers can write unit tests first and thenCodeIn fact, there are not many companies, although they seem to be vocal
XP has been pushed for a long time, but many of them go through the unit test process. Many Programmers think
Tasks are large, time-consuming, and labor-intensive. Once a task is received, the code is used to complete the workload. This is a common phenomenon.
In addition, most programmers do not like to write unit tests. This is a fact.

2. How can we reduce stress for programmers, but perform unit tests?
programmers and project managers in small and medium-sized enterprises generally face projects with high stress and heavy tasks.
if you are a project manager, I think there are people in the test group (only one person can do it, but it doesn't matter how much it is).
let the people in the test group intervene in the unit test early, or if the test group can write at least
code, it would be better to assign the test group members to write unit tests. This is actually very good.
A first, programmers and testers can discuss the unit test strategy of this module before writing a module.
, this can reduce the burden on programmers
B. The Framework process of unit testing specified by both parties. programmers do not write unit test code. However, due to the programmer's participation in the discussion,
This makes it clearer. unit test code written by testers
after the C programmer finishes writing the code, the unit test code compiled by the tester can touch the programmer's code, obtain the relevant test report
the advantage is that the duties are separated, and the test team members can intervene in advance, which will be good for future integration testing, in addition, the
testers can write some test code so that they are not idle and have a sense of accomplishment. In addition, the programmer's burden is reduced, although
programmers do not write unit test code, however, since we started with testers, we were familiar with the test process.
it is good for coding.
the above suggestions are for reference only.

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.