This is a sanity check because I’m finding this to be true in our code. Unlike our functional code, the tests of stateful GUIs have an unfortunate amount of weight due to state setup, combinatorial case analysis, and mocking/faking neighbors/collaborators/listeners/etc. Am I missing something? Thanks for your feedback.
Notes:
- The tests are running in the JVM, everything is a POJO.
- So far we’ve gotten some simplification by increasing unit size: testing more pieces glued together.
New Notes:
- We’re using jUnit and Mockito.
Besides that, the relation between the number of production and test lines of code is irrelevant. I can easily find an example of extremely short piece of code having so many edge cases that it requires dozens of tests.
And a real-life example of SQLite (emphasis mine):
That’s right, it’s approximately 1100 lines of test code per each line of production code.