Test-driven Thoughts

Source: Internet
Author: User

I have been writing WebProgramAll of them work for front-end and art artists all day long. If you want to use the test driver, you will not have a chance. During the Spring Festival, I wrote a program, basically implementing the test driver. Almost all the logic of the program is completed through unit testing. SVN has now been available in 40 versions, and all test cases can work. Satisfied. Record your thoughts:

  1. The diagram is not convenient. Test Case data and program data must be relatively independent. During unit tests, some demo data or even real data may exist in the database. It is indeed convenient to use them for testing, but this will bring uncertainty to future tests, and data may need to be changed in the development stage. Even after use, you need to modify the program, then none of these tests can be used. Therefore, all the test data used in this test is added in setup and deleted in teardown. A little effort, but relatively steadfast.
  2. I like to use testdriven.net. It works perfectly with vs2005. You can run a test with a debugger. In addition to running the overall test, nunit programs are almost useless during development.
  3. During the test, you can use the console to output some information. In particular, it is best to output a piece of information for a class. In the nunit program, it is easy to view the output.

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.