Tagged Questions

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. In procedural programming a unit may be an individual function or procedure. Unit tests are created by programmers or occasionally by white box testers.

learn more… | top users | synonyms

6
votes
4answers
81 views

Unit testing - getting started

I am just getting started with unit testing but I am not sure if I really understand the point of it all. I read tutorials and books on it all, but I just have two quick questions: I thought the ...
6
votes
4answers
148 views

Are there any language agnostic unit testing frameworks?

I have always been skeptical of rewriting working code - porting code is no exception to this. However, with the advent of TDD and automated testing it is much more reasonable to rewrite and refactor ...
1
vote
1answer
62 views

How to populate a private container for unit test?

I have a class that defines a private (well, __container to be exact since it is python) container. I am using the information within said container as part of the logic of what the class does and ...
5
votes
2answers
132 views

What should be tested in Javascript?

At work, we've just started on a heavily Javascript based application (actually using Coffeescript, but still), of which I've been implementing an automated test system using JsTestDriver and fabric. ...
13
votes
4answers
275 views

Does unit testing lead to premature generalization (specifically in the context of C++)?

Preliminary notes I'll not go into the distinction of the different kinds of test there are, there are already a few questions on these sites regarding that. I'll take what's there and that says: ...
3
votes
2answers
69 views

Should service test classes connect to the database

I want to know if the service test classes should use real DAO objects and connect to the database or it should use mock objects to test only the business logic it do?
3
votes
1answer
66 views

How to deal with changes that need further testing while working on another test?

TDD means to test before you start writing production code. So I start writing a test for MyClass called MyClassTest. It fails and I start to implement the wanted functionality in MyClass. During the ...
0
votes
1answer
47 views

Unit testing external dependencies

When writing a program, should I write tests that ensure that the dependencies I use are working? Those might help to check my assumptions about them, and may also help when deciding to upgrade said ...
6
votes
3answers
154 views

What elements of my JUnits should I mock?

My classes are following this structure Service Tier (creates and maps InputDTO to DB Data) -> DAO Tier (actually executes DB calls) When I write the service tier JUnits, and when it calls DAO ...
1
vote
4answers
181 views

How can I convince my colleague to unit test his code? [closed]

Possible Duplicate: Colleague unwilling to use unit tests “as it's more to code” I've been trying in the last couple of months to convince one of my colleagues to start unit ...
5
votes
5answers
179 views

Does it make sense to license unit tests?

I am wondering if there are any benefits / risks of (not) putting a licence on test code which mostly consists of unit tests. What do you think? I am particularly interested in licensing under ...
13
votes
1answer
220 views

Are there any studies on the relationship between software testing practices and developer productivity?

Are there any studies on the relationship between software testing practices (unit and/or integration tests) and developer productivity?
7
votes
3answers
126 views

How do you structure unit tests for multiple objects that exhibit the same behavior?

In a lot of cases I might have an existing class with some behavior: class Lion { public void Eat(Herbivore herbivore) { ... } } ...and I have a unit test... [TestMethod] public void ...
3
votes
1answer
131 views

What is an inconsistent state?

I've been trying to experiment with coded user interface testing (CUITS) lately and I get the following error whenever I try to create one. The following package failed to load: C:\Users[File Path ...
17
votes
7answers
699 views

What are the disadvantages of automated testing?

There are a number of questions on this site that give plenty of information about the benefits that can be gained from automated testing. But I didn't see anything that represented the other side of ...

1 2 3 4 5 14
15 30 50 per page