3 ms·
Avoiding the cucumber test trap is hard. It’s easy to keep adding scenarios which give you a false confidence that your application is working correctly. It’s e
by jdmitch 13y ago
Avoiding the cucumber test trap is hard. It’s easy to keep adding scenarios which give you a false confidence that your application is working correctly. It’s easy to just add some more code to make those scenarios pass.
Instead we need to keep focusing on the conversations. Find the scenarios that matter, that are important to document, that are worth automating and push everything else down into lower level, isolated tests.
How then do you prioritise which tests are actually important to document, or better still edit out the ones that aren't? It seems like it would be difficult to be consistent.
- Dakuan 13y agoa good example would be validation one scenario for 'when the create thing form is valid' and one for 'when the create thing form is not valid' rather than a scenario for each validation rule 'when the email form is not valid'
- peteretep 13y agoAgree and write the Cucumber tests when you write your stories, in the same meeting. Agree to write the minimum test that describes the feature in a way that everyone agrees on and understands. Don't rely on Cucumber to test all your edge-cases.
- tooky 13y agoThis. BDD is about the conversations - getting people together with a business mindset, a dev mindset and a tester mindset to discuss what needs to be built. From that discussion you get a good idea of the business requirements - and hopefully some examples of how they should play out. The person with the business mindset will have some of those examples that are important for them to be automated as business facing acceptance tests. The one's you write in gherkin. The person with the testing mindset will have a bunch of ideas about how you can break this. Some of those will be important enough that they should become business facing tests, but often the group can decide that these would be better tested by unit tests. We call this meeting the 3 amigos.
- mullr 13y agoA good way to frame this: http://martinfowler.com/bliki/TestPyramid.html http://martinfowler.com/bliki/TestPyramid.html
- aslakhellesoy 13y agoHere is a simple technique you can try: https://cucumber.pro/blog/2014/03/23/story-readiness-board.html https://cucumber.pro/blog/2014/03/23/story-readiness-board.h...