NUnit vs. MbUnit vs. MSTest vs. xUnit.net [closed]

I know this is an old thread, but I thought I’d post a vote for xUnit.NET. While most of the other testing frameworks mentioned are all pretty much the same, xUnit.NET has taken a pretty unique, modern, and flexible approach to unit testing. It changes terminology, so you no longer define TestFixtures and Tests…you specify … Read more

What does “DAMP not DRY” mean when talking about unit tests?

It’s a balance, not a contradiction DAMP and DRY are not contradictory, rather they balance two different aspects of a code’s maintainability. Maintainable code (code that is easy to change) is the ultimate goal here. DAMP (Descriptive And Meaningful Phrases) promotes the readability of the code. To maintain code, you first need to understand the … Read more

What is the difference between unit tests and functional tests?

Unit tests tell a developer that the code is doing things right; functional tests tell a developer that the code is doing the right things. You can read more at Unit Testing versus Functional Testing A well explained real-life analogy of unit testing and functional testing can be described as follows, Many times the development … Read more

How to run only one unit test class using Gradle

To run a single test class Airborn’s answer is good. With using some command line options, which found here, you can simply do something like this. gradle test –tests org.gradle.SomeTest.someSpecificFeature gradle test –tests *SomeTest.someSpecificFeature gradle test –tests *SomeSpecificTest gradle test –tests all.in.specific.package* gradle test –tests *IntegTest gradle test –tests *IntegTest*ui* gradle test –tests *IntegTest.singleMethod gradle … Read more

What is Mocking?

Prologue: If you look up the noun mock in the dictionary you will find that one of the definitions of the word is something made as an imitation. Mocking is primarily used in unit testing. An object under test may have dependencies on other (complex) objects. To isolate the behavior of the object you want … Read more

What is a reasonable code coverage % for unit tests (and why)? [closed]

This prose by Alberto Savoia answers precisely that question (in a nicely entertaining manner at that!): http://www.artima.com/forums/flat.jsp?forum=106&thread=204677 Testivus On Test Coverage Early one morning, a programmer asked the great master: “I am ready to write some unit tests. What code coverage should I aim for?” The great master replied: “Don’t worry about coverage, just write … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)