On Tuesday, March 7, 2017 at 12:54:50 AM UTC, Joey Eremondi wrote:
>
> Now, you could do something where you have a working version of your code, 
> and you generate a set of tests and save it, and then use it as regression 
> tests later on to make sure you don't accidentally change the behaviour of 
> your program, but that's more complicated. Is that the sort of thing you 
> meant?
>

I can see some value in that.

How would you gather the test cases?

The trouble with tests like this is that they test that the code does what 
the code does. As a consequence they are tightly bound to the 
implementation. For example, I could have another code base that offers the 
same functionality but is implemented in a different way that fails the 
test even though it is equivalent. I think for that reason, these kinds of 
tests should always exist in their own separate test system - as you may 
occasionally have to throw them all away.

Such test can have some limited value in helping you to detect unexpected 
changes when code is changing incrementally, rather than undergoing more 
extensive refactoring. If such test cases are very easy to gather and run 
then the effort-to-value ratio might be appealing.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to