Linked Questions

158 votes
15 answers

When is it appropriate to not unit test?

I work in a small company as a solo developer. I'm the only developer at the company in fact. I have several (relatively) large projects I've written and maintain regularly, and none of them have ...
Ken Pespisa's user avatar
  • 1,903
35 votes
6 answers

How can I write unit tests that simplify feature implementation? [duplicate]

I'm a newbie to working in software development and I read a lot about how cool unit tests are. Now, I've made my first steps into a project where I'm working with a number of equally unexperienced ...
Gerome Bochmann's user avatar
163 votes
13 answers

Is there such a thing as having too many unit tests?

I have been tasked with writing unit tests for an existing application. After finishing my first file, I have 717 lines of test code for 419 lines of original code. Is this ratio going to become ...
user2954463's user avatar
  • 1,460
125 votes
7 answers

What is the most effective way to add functionality to unfamiliar, structurally unsound code? [duplicate]

This is probably something everyone has to face during the development sooner or later. You have an existing code written by someone else, and you have to extend it to work under new requirements. ...
Coder's user avatar
  • 6,988
69 votes
7 answers

Is it sufficient to use acceptance and integration tests instead of unit test?

Short introduction to this question. I have used now TDD and lately BDD for over one year now. I use techniques like mocking to make writing my tests more efficiently. Lately I have started a ...
twilker's user avatar
  • 908
34 votes
12 answers

How many developers before continuous integration becomes effective for us?

There is an overhead associated with continuous integration, e.g., set up, re-training, awareness activities, stoppage to fix "bugs" that turn out to be data issues, enforced separation of concerns ...
Phil Helix's user avatar
  • 1,966
36 votes
6 answers

What is a normal "functional lines of code" to "test lines of code" ratio?

I'm pretty new to TDD approach and my first experiments say that writing 1 line of functional code means writing about 2-3 lines of testing code. So, in case I'm going to write 1000 LOC, the whole ...
Andrey Agibalov's user avatar
22 votes
6 answers

what kind of functions and/or classes are impossible to unit test and why

Main excuse from the developer for not having a good unit testing is "Code is not designed in a unit testable fashion." I am trying to understand what type of design and code that can't be unit tested....
manizzzz's user avatar
  • 331
4 votes
5 answers

Should you exercise TDD on prototype applications?

I'm developing an iOS app, which is a prototype for a customer. They're expecting it to not be of production standard and are happy for a few rough edges here and there. Since this is my first ...
user155695's user avatar
18 votes
2 answers

What kind of code would Kent Beck avoid unit testing? [duplicate]

I've been watching a few of the Is TDD Dead? talks on youtube, and one of the things that surprised me is Kent Beck seems to acknowledge that there are just some kinds of programs that aren't worth ...
Daniel Kaplan's user avatar
9 votes
3 answers

How to write tests that make sense for visualization software?

I have a fairly large piece of software which takes certain file types and visualizes them / creates a host of buttons for manipulation of the image plotted. I feel like I'm finding bugs / pieces of ...
Need4Sleep's user avatar
3 votes
4 answers

When, Where, and How to Unit Test [duplicate]

I'm very familiar with xUnit frameworks and I try to implement unit tests on every project I start. Somewhere along the way, I realize that I'm writing the same tests over and over again, and then I ...
Naftuli Kay's user avatar
  • 1,631
2 votes
3 answers

Unit testing code which does not establish correlation between input and output

In most descriptions of unit testing as a methodology there's an idea of unit tests being as independent of implementation as possible. This is easy to understand and implement in cases when code does ...
Roman's user avatar
  • 139
4 votes
2 answers

How to approach the understanding, documentation and validation of legacy code [duplicate]

I've been tasked with studying a Python code, which runs on an orchestrator, which schedule the launch of the code in correspondence of some events. The code imports some modules, and it's basically ...
DeltaIV's user avatar
  • 231
4 votes
4 answers

Unit testing: about easy- and hard-first strategies

I've never written a unit test. I'm reading The art of Unit Testing by Osherove, and he explains a way to choose where to start when you're writing tests for legacy code. Basically you end up with ...
bigstones's user avatar
  • 806

15 30 50 per page