advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Testing Tips for When Unit Testing Is Too Hard

Writing true unit tests is just too difficult in certain scenarios, but you don't have to dismiss testing all together. Here are some tips for making a practical compromise with (less unit-like) integration tests. 


advertisement
echnologies such as the xUnit framework, combined with Maven, BuildBot, or CruiseControl, enable unit testing under continuous integration, which gives developer productivity a huge boost. However, writing true unit tests even with these tools sometimes is just too difficult. When faced with tightly coupled code, test-averse legacy code, and buggy libraries, developers end up writing tests that aren't quite up to the unit-test standard. Instead, they compromise by running tests that cover several functionalities at once, opening a few sockets, connecting to databases, reading or writing files, and basically abandoning pure unit testing.

This article describes the frustrating scenarios that lead developers to take these shortcuts, and it provides useful tips for dealing with them.


It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement