Tests Are Not Specifications
paedubucher.ch
Tests Are Not Specifications
1–6 of 6 posts
Re: Tests Are Not Specifications
#2Yes, in a technical sense they are tests. But they are bad tests precisely because they barely fulfill the purpose to clarify the behavior of the function.
I’m not convinced.
Re: Tests Are Not Specifications
#3Who would actually write tests like this in real life? Does anyone out there actually test their polynomials with a random sample of input values? Yes, in a technical sense they are tests. But they are bad tests precisely because they barely fulfill the purpose to clarify the behavior of the function. I’m not convinced.
1. The actual specification is sometimes better reflected by the implementation than by some test cases. 2. Some test cases don't help you understanding what's supposed to be computed.
Of course, counterexamples could be made. Imagine a board game with a test function testing specific moves. Those test cases will help you understand the implementation a lot.
Re: Tests Are Not Specifications
#4Who would actually write tests like this in real life? Does anyone out there actually test their polynomials with a random sample of input values? Yes, in a technical sense they are tests. But they are bad tests precisely because they barely fulfill the purpose to clarify the behavior of the function. I’m not convinced.
This (my) little rant is of course hyperbolic, but I tried to make two points: 1. The actual specification is sometimes better reflected by the implementation than by some test cases. 2. Some test cases don't help you understanding what's supposed to be computed. Of course, counterexamples could be made. Imagine a board game with a test function testing specific moves. Those test cases will help you understand the im…
Re: Tests Are Not Specifications
#5Who would actually write tests like this in real life? Does anyone out there actually test their polynomials with a random sample of input values? Yes, in a technical sense they are tests. But they are bad tests precisely because they barely fulfill the purpose to clarify the behavior of the function. I’m not convinced.
This (my) little rant is of course hyperbolic, but I tried to make two points: 1. The actual specification is sometimes better reflected by the implementation than by some test cases. 2. Some test cases don't help you understanding what's supposed to be computed. Of course, counterexamples could be made. Imagine a board game with a test function testing specific moves. Those test cases will help you understand the im…
From the fact that there are some tests out there that are barely specifying anything, it does neither follow that tests are not supposed to be specifications nor that tests are not specifications in general.
I think these are important distinctions to make.
Re: Tests Are Not Specifications
#6Earlier quoted context omitted.
This (my) little rant is of course hyperbolic, but I tried to make two points: 1. The actual specification is sometimes better reflected by the implementation than by some test cases. 2. Some test cases don't help you understanding what's supposed to be computed. Of course, counterexamples could be made. Imagine a board game with a test function testing specific moves. Those test cases will help you understand the im…
I agree with both of your statements. They are definitely important points to make about your observation. But your post seems to argue against Martin's standpoint and for the assertion that „Tests are not specifications.“ From the fact that there are some tests out there that are barely specifying anything, it does neither follow that tests are not supposed to be specifications nor that tests are not specifications…
While it might be illuminating in some cases, it might be not helpful or either misleading in other cases.
It's like arguing that the main purpose of magazines is to lit a fire with them, because some of them are very flammable.
Tests are good to ensure that some property of the system that held true before still holds true after some modifications to the system has been made.