Scrum what?, is a community edited question and answer site for everyone working with or has heard of agile. Ask anything about Agile, Lean, XP, Kanban, or Scrum and receive answers from experts. It's 100% free!

huge app without test coverage

+1 vote
Hi, our app is huge and has zero test coverage. how to start? is it worth it? it will take months or years to come to a reasonable coverage...
asked 1 year ago by dennissquad (160 points)

3 Answers

+1 vote
 
Best answer
Depending on the complexity of your code and the coding style of its programmers, setting up a real TDD environment might be too much effort. Minimum will be to do TDD for new features and to setup tests for every bug found before you fix it. Test coverage will stay low that way but you will cover at least the hot spots. If the quality of the code is really bad and you don't even have model classes, setting up test data and fixtures might cost more time than your product manager will allow you to spend: Think about using tools like Selenium to cover that crap and be sure to develop new features in a parallel environment using single sign on to bridge old and new world.
answered 1 year ago by Jan Ulbrich (460 points)
0 votes
We had the same situation. 50 kLOC of untested Java code. In the beginning it is hard but we started to write tests for new features and thing we change (whenever possible). It is such an elating feeling to refactor something, which is test covered. Definitely worth it.

On the long run you'll reach maybe 20% or 30% test coverage. That sounds not too much but it will cover all areas you change frequently. It was good enough for us that time.
answered 1 year ago by Matthias Marschall (1,160 points)
+1 vote
If your app is huge, you have probably no chance to apply TDD principles. So I think you should write integration (end-to-end) tests for your app.

I agree with the others, you should write tests when:

- a new bug is found,
- a new feature is being implemented.

In the beginning I suggest you to write some end-to-end test cases as well, focusing on the most frequently used features of the software.

There is a book on the topic (I have not read it yet): http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052
answered 1 year ago by pityufiu (160 points)

Related questions

0 votes
2 answers