Timeline for Are integration tests meant to repeat all unit tests?
Current License: CC BY-SA 3.0
19 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 19, 2016 at 22:39 | comment | added | Filip Bartuzi | softwareengineering.stackexchange.com/a/198988/153782 | |
Jun 27, 2016 at 17:40 | vote | accept | Filip Bartuzi | ||
Jun 27, 2016 at 17:40 | comment | added | Filip Bartuzi | @JeffO But person object would be mocked anynway, right? | |
Jun 6, 2016 at 23:26 | history | tweeted | twitter.com/StackProgrammer/status/739961775152582657 | ||
Jun 6, 2016 at 21:00 | comment | added | Rob Grant | This might have an integration test if you break those values out into config. Then you have to read the config file (or mock it, but then you might need another integration test where you don't) and check your logic against its values. | |
Jun 6, 2016 at 18:59 | comment | added | Filip Bartuzi | @Amadeus9 i was trying to make up example easy enough to understand. I thought this is straightforward :p | |
S Jun 6, 2016 at 18:39 | history | suggested | Peter Mortensen | CC BY-SA 3.0 |
Copy edited (e.g. ref. <https://en.wiktionary.org/wiki/any_more#Adverb>).
|
Jun 6, 2016 at 17:20 | review | Suggested edits | |||
S Jun 6, 2016 at 18:39 | |||||
Jun 6, 2016 at 16:59 | comment | added | Tin Wizard | I'm curious - what would you be checking ages for where the age differs by gender? | |
Jun 6, 2016 at 16:23 | answer | added | Warbo | timeline score: 18 | |
Jun 6, 2016 at 15:39 | answer | added | Jon Raynor | timeline score: 12 | |
Jun 6, 2016 at 13:42 | comment | added | JeffO | This would be a lot easier to test if you passed a person object as the parameter. | |
Jun 6, 2016 at 13:36 | comment | added | RubberDuck | Not to mention the cases of 0 and -1. What does it mean for a person to be -1 years old? What should your code do if your API returns something nonsensical? | |
Jun 6, 2016 at 10:54 | comment | added | David Arno | @FilipBartuzi, I assume the method is checking whether a male is over 21 for example? As currently written, it doesn't do that, it is only true if they are 22+. "Over 21" in English though means "21+". So there is a bug in your code. Such bugs are captured by testing boundary values, ie 20, 21, 22 for a male, 17,18,19 for a female in this case. So at least six tests are needed. | |
Jun 6, 2016 at 10:50 | comment | added | Filip Bartuzi | @DavidArno Why? There 2^2 possible routes | |
Jun 6, 2016 at 10:48 | comment | added | David Arno | Only four tests? You have six boundary ages you should be testing: 17, 18, 19, 20, 21, 22... ;) | |
Jun 6, 2016 at 10:48 | answer | added | Kilian Foth | timeline score: 78 | |
Jun 6, 2016 at 10:45 | comment | added | Chris Wohlert | Well, one of the points is, that by mocking / unit-testing it, you can isolate any problems to your code. If an integration test fails, you are unaware as to whose code is broken, yours, or the API. | |
Jun 6, 2016 at 10:32 | history | asked | Filip Bartuzi | CC BY-SA 3.0 |