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 codebase including tests is going to be something like ~3500 LOC.
Post-hoc testing in TDD recommended?
I have a personal project that doesn’t have robust testing. I had a bit of TDD going on at the beginning, but it quickly became counterproductive as the project details changed dramatically over time. So a lot of previously written tests have become useless.
Unit testing C++: What to test?
TL;DR
Sporadic unittests or TDD?
I’ve read some basics about unit tests and TDD, but I find it hard to convince myself why TDD can have an advantage over only selected unittests.
Methods for testing a very large application
I have a PHP app which is very large. There are usually 2-3 developers working on it full time and we are getting to the point where we are making changes and creating bugs (cough features!). The software isn’t complex per say, just there is a lot going on (35~ controllers, about the same models, etc).
Does following TDD inevitably lead to DI?
I learned to do Test Driven Development (TDD), Dependency Injection (DI) and Inversion of Control (IoC) all at the same time. When I write code using TDD I always end up using DI in my class’s constructors. I am wondering if this is because of how I learned to do TDD, or if this is a natural side-effect of TDD.
Is it typical for a unit test suite to be larger than the code it tests? [duplicate]
Possible Duplicate:
What is a normal “functional lines of code” to “test lines of code” ratio?
What is a “behavior rich object” and why would it be advantageous?
I am referring to the article Mocks aren’t Stubs by Martin Fowler. When naming cases when he think “mockist” TDD will be advantageous, he said
TDD with SQL and data manipulation functions
While I’m a professional programmer, I’ve never been formally trained in software engineering. As I’m frequently visiting here and SO, I’ve noticed a trend for writing unit tests whenever possible and, as my software gets more complex and sophisticated, I see automated testing as a good idea in aiding debugging.
How would a new language look if it was designed from scratch to be easy to TDD?
With the some most common languages (Java, C#, Java, etc) it sometimes seems that you are working at odds with the language when you want to fully TDD your code.