Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application.

learn more… | top users | synonyms

4
votes
1answer
72 views

Are there some well known nasty pitfalls to try to avoid at all costs when starting with unit testing on a partly legacy (web) application?

I am participating on the development of the web application which has several years of history behind it and there never was enough value and effort put on refactoring, so considerable part of the ...
4
votes
2answers
109 views

Is this a good simplification of fake object types?

With every unit testing text I get my hands on comes a little different terminology and more or less different definitions of various fake object types. I find that a lot of this differentiation is ...
0
votes
1answer
158 views

How to check that some string contains a substring in the unit test code?

Dear Developers and QA, I would like to ask a very simple question, but it is very important for me. Please, consider the following test: When I enter the search phrase “Hello World” into the ...
3
votes
1answer
114 views

xUnit tests patterns for testing threaded applications

Are there either any xUnit (or otherwise) design patterns or anti-patterns for testing threaded code?
1
vote
1answer
286 views

Pretty / GUI formatting for the nosetests.xml xUnit report?

Is there a simple tool that will generate pie charts or otherwise "pretty", graphical output based on the .xml file that nose outputs with the --with-xunit switch? I tried googling around for one but ...
3
votes
2answers
415 views

Creating a dummy database for automated functionality testing

I have a continuous integration build server (using Team City). When people check code in, I'd like to run a set of tests which run through a set of functional cases such as: Using an administrator ...
2
votes
3answers
138 views

Is my test a perf unit functional smoke test or something else?

Or how I learned to stop worrying and love the bomb. Each test is different. Some are big and talk to databases, others quick and self contained. We all know we'd prefer the fastest and most robust ...
2
votes
1answer
277 views

Unittesting in Borland C++Builder 2006

Which unit testing framework would you use in Borland C++Builder 2006?
2
votes
3answers
137 views

Do I Need To Create Mock Classes For Every Class?

Let's say I have a system composed of three classes: A,B,C that share certain dependencies. To test A independently, I would need to create mock objects for B and C To test B independently, I would ...
4
votes
4answers
1k views

UI and Business Logic Testing, Am I Doing it Right? Should I Unit Test Anything Else?

Alright, so this is what I have right now. buttonMultiply_Click(object sender, EventArgs e){ Calculator c = new Calculator(); textBoxLog.Text = "Calculation underway..."; int value1 = ...
18
votes
4answers
968 views

Developing Unit Tests While Refactoring Legacy Code?

I have a big code library that I need to refactor in order for it to fit more nicely together (one big problem is there aren't clear enough boundaries between each component). Since there will be ...
11
votes
4answers
202 views

If I didn't use TDD but want to transition to agile, should I go back and create those unit tests?

In an transitioning agile environment, if there was no Test Driven Development (no unit tests created), should you create unit tests to catch up on technical debt? And to what extent? Should they ...
-3
votes
3answers
327 views

Tester Versus Test cases written by the tester [closed]

I have always believed that a great tester is one whose test cases help in discovery of a lot of bugs in the product and not one who finds a lot of bugs in a product. In otherwords a team or a ...
14
votes
3answers
857 views

What's the recommended practice for separating unit tests from integration tests for automated testing?

On a project I've been working on, we've been steadily increasing the code coverage through tests. Some of these tests were done as integration tests, and some as unit tests. The integration tests can ...
12
votes
4answers
1k views

Documenting Unit Tests

We follow a BDD approach to development, we have our testers creating scenarios from a specification, and these are then given to our developers before any work is started. However, we find that some ...
5
votes
5answers
179 views

Writing tests to learn the code

My team is bringing on two new people - an intern and a full time. The intern has one semester to go, and the full time is fresh out of uni. After a two week training period, the plan management has ...
2
votes
2answers
431 views

Newbie question: How do I run a JUnit 3 test on Portable Firefox 3.6 in Selenium RC (1.0.3)?

I'm pretty new to selenium, and I'm following the Selenium Simplified book examples. I'm trying to run a simple test that was created in Selenium IDE on Portable Firefox 3.6, and saved as a JUnit 3 ...
2
votes
1answer
322 views

Using Scala to build unit tests for Java?

The idea of using Scala to build unit tests for Java code has been thrown around. People are making the claim that Unit tests would be less effort to write because there's less boilerplate. In ...
4
votes
3answers
168 views

How would you call on-device unit tests ?

In the embedded world some (unit) tests have minimal value when they run as standalone test, like unit tests should. We have many tests that run on the embedded device, as part of the embedded ...