
How should I test my TEST code? - Software Engineering Stack …
I understand how to test my normal code, but how should I test my test code to make sure it can effectively find and report errors when they are present? I personally have been stupid enough to write erroneous test cases that would pass when they should not have, thus defeating the purpose of my writing tests in the first place.
How to get better at testing your own code
Aug 29, 2011 · Finding hard to test code and making it easier to test will, well, make it easier for you to write test cases. Also, catching defects early will add value to your entire quality assurance practices (which include testing).
How to test the tests? - Software Engineering Stack Exchange
We test our code to make it more correct (actually, less likely to be incorrect). However, the tests are also code -- they can also contain errors. And if your tests are buggy, they hardly make you...
How do you quickly test C++ code? - Software Engineering Stack …
Jun 13, 2016 · If the write-build-test cycle is already down to five seconds, I'd call that a win personally. I've never seen split-second build times except in personal hobby projects where one guy has total control over all dependencies and no real-world business requirements to …
Is it typical for a unit test suite to be larger than the code it tests ...
Bundle your function calls to the code if they are looking similar in a central function, bundle the test data creation if the test data is reused for more than one test, write supporting functions to allow the comparison of complex objects with the expected values in less lines of code, and so on.
testing - Is having some logic in source code in order to perform …
There are cases where we could include some logic in the source code in order to help us performing some functional tests or end-to-end tests. Generally speaking, these code interact with main logic directly and if the test code is defective, the business logic is affected.
testing - What is a normal "functional lines of code" to "test lines …
Assume for a moment you can set up a test, call the method to be tested and check the result in three lines of code. If the method you are testing is one line long (as happens in Scala) then your test to production code ration is 3:1.
Is there such a thing as having too many unit tests?
May 4, 2017 · If you have worked on large code bases created using Test Driven Development, you would already know there can be such a thing as too many unit tests.
Methodology: Writing unit tests for another developer
Jun 17, 2019 · The general approach of using pairs to split the effort of writing production code and writing its associated unit tests is not uncommon. I've even personally paired in this way before with decent success. However, a strict line between the person writing production code and the person writing test code may not necessarily yield results. When I used a similar approach, the pair starts by ...
Git: how to test local code before commit
May 11, 2016 · What is the standard procedure for testing in such situations (is it to use 'git stash'?). Or if this situation [needing to test commit in your local area when you also have unstaged edits] is not very common, how do developers avoid the same?