Skip to main content
8 events
when toggle format what by license comment
Jul 22, 2020 at 10:03 vote accept Jossy
Jul 22, 2020 at 10:03 comment added Jossy Perfect - you've been a superstar. The key thing around the integration tests I do build is that though they will have the same input as the 'unit' test that comprises the first 'step' I will only be testing the integration test output against the output of the final 'unit' test in the sequence. Doing it this way will help me keep the number of fixtures down...
Jul 22, 2020 at 9:58 comment added Flater @Jossy: Glad to see I could help :) As to your second comment, notice that in such a case (where I do agree it's mostly "real" unit tests), you would be wholly unable to spot the "undeleteable updated Foo" bug as you would never chain the two operations together; thereby losing out on the benefit of actual integration tests. As to your third comment, that solves the issue I just pointed out in your second comment :)
Jul 22, 2020 at 9:58 comment added Jossy I think in summary I'll build the 'unit' tests with the fixtures in this way but then still build a suite of integration tests over the top. Sound like a plan?
Jul 22, 2020 at 9:56 comment added Jossy The only, but key, follow-up I have is that I won't be storing a state with any unit test. Each one will be initiated with a discrete pre-defined input fixture and checked against a discrete pre-defined output fixture. They won't rely on any previous test. What I was trying to get at was that the input fixture for one test will be the output fixture for the previous test - I may even call the same file but there will be no 'between-test' dependency.
Jul 22, 2020 at 9:55 comment added Jossy This is an awesome response - thank you! A big side benefit is that you've demonstrated the importance to me of integration tests not simply running end to end - they should also overlap different portions of the process to isolate issues.
Jul 22, 2020 at 9:34 history edited Flater CC BY-SA 4.0
added 241 characters in body
Jul 22, 2020 at 9:18 history answered Flater CC BY-SA 4.0