I’ve noticed the features for making tests in Visual Studio 2010 and Netbeans 7 and was wondering what they do exactly. Would using them be more efficient than designing my own tests?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A unit test (as opposed to an integration test) is a test (usually actually multiple tests that happen to exist in the same class and file) that test the functionality of a single unit (typically a class).
An integration test, by contrast, tests the interactions of multiple different units. An end-to-end test is a particular type of integration test that tests an entire software stack, from the UI to everything beneath.
There are two different types of tests that one can conduct: “glass box” and “black box”. A “black box” test is implementation-agnostic; it is written based only on the documented behavior of the function/class and ensures that any arbitrary implemenation adheres to the documented behaviors. It may also include tests for potential errors that various theoretical implementations might make, but is done without regard to what the actual implementation does. By contrast, a “glass box” test is one which takes advantage of knowledge of the implementation and ensures that each code path in the implementation has been tested. A good test is one which consists of both comprehensive black box and glass box testing.
There are a number of different freely available libraries that make it easy to create unit tests. I strongly recommend using googletest and gmock (both used extensively at Google) for your testing.