TDD development based on Spring

Source: Internet
Author: User

I haven't written a blog for a few days, because the quality of my logs is lower every day, it's as though a woman who is getting older is as uncomfortable as her face is getting older, it's better to forget it. with this mentality, I saw my blog drop every day in the "ranking list" of csdn two days ago, without feeling anything.

However, the quality in the blog is poor.ArticleI will not delete it. After all, it is a record of my learning and work process. I will leave it as a sigh of relief later.

In the past, JUnit was not very cold. I always thought it could not help our developers. Especially for those who work on enterprise-level software systems, "JUnit will have a nightmare at night ", it's an exaggeration.

For the first time, JUnit can be used in the development process to track the development of jbpm3. jbpm3 is test-driven, and its persistence test on Hibernate is completed by JUnit, it may be because hibernate3 and jbpm3 are in the same company. It uses several advanced features of hibernate3 to completely mask the disadvantages of JUnit.

Vaguely felt that spring should provide good support for database testing. This time I had to use spring-based TDD and Google it and found the article on Jiangnan white clothing. I couldn't think of it as the hot topic in the past two days, it seems that we are not far from the trend.

This is the preparation for testing-driven development in spring. For more information, see
Jiangnan white (http://blog.csdn.net/calvinxiu/) views to see spring reference manual, then
And got the mouse on the CAT (two instrument four elephant http://memphis.blogdriver.com/memphis/index.html)
And finally succeeded.

The method is described in the document of Jiangnan Baiyi, but there are two additional experiences:
1) it is best to put applicationcontext. xml in the classpath directory. Otherwise, only absolute directories can be used in unit testing. This is of course not good.
2) If crimson reports an error, ignore the error message, but it should be because your xml file has a problem, such as the directory location is different from the directory location in the Web environment.

Alas, it took me a day for the two questions above.

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.