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.
How to motivate co-workers to write unit-tests? [closed]
Closed 9 years ago.
Unit testing C++: What to test?
TL;DR
How should I test my TEST code?
One of the few things that most software developers agree on is that
you shouldn’t rely on code to work correctly unless you test it. If
you don’t test it, it may have hidden bugs that are only going to
cause you more work down the road.
Are unit tests really that useful? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
Do large test methods indicate a code smell?
I have a particular method called TranslateValues() (Cyclomatic-Complexity of 5) which I would like to test.
Reusing Mocks/Stubs as Test Specification
We use mock to ensure that a unit test only runs against the code that should be tested. This prevents that a bug in a module A causes tests of a dependent module B to fail. However, now we also have to test the interaction explicitly. It is not enough that A and B are green on their own, A has to work as B expects it, and B has to have the right expectations.
Do some best practices depend on skill?
Is there evidence that some software development best practices depend on programming skill level? I mean, these methods are good, but maybe the way the are used or the extent might vary?
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.
How best to enable a web service consumer to integration test a transactional web service?
I want to allow consumers of a web services layer (web services are written in Java) to create automated integration tests to validate that the version of the web services layer that the consumers will use will still work for the consumer (i.e. the web services are on a different release lifecycle than the consumers and their APIs or behavior might change– they shouldn’t change wihtout notifying the consumer, but the point of this automated test is to validate that they haven’t changed)