3 ms·
Assuming you're focused on writing reusable steps and building up a solid test architecture I don't see cucumber costing you time. You also really shouldn't nee
by keithnoizu 13y ago
Assuming you're focused on writing reusable steps and building up a solid test architecture I don't see cucumber costing you time. You also really shouldn't need to go to code that often to debug a test failure. Write better test frameworks, write tests for your tests, and self report issues in your test framework when they come up. E.g. unable to create test fixture -> this->skipped("reason");
In my experience the ability to just plug and play steps and quickly add additional coverage for edge cases is a huge bonus for test automation.
But again you have to actually engineer things and write reusable steps and intelligent enough test frameworks that you don't need to often dig through the test code.
I think this issue is somewhat similar to how when writing unit tests you'll want to build up a library of reusable custom asserts targeting your domain so you can quickly exercise your sut and validate things. It's definitely an upfront costs to build things up like that but in the long run it pays off very nicely when you avoid taking on too much test debt.
- keithnoizu 13y agoI am biased though since I'm working on a phpunit cucumber/jbehave like port. https://news.ycombinator.com/item?id=6410900 https://news.ycombinator.com/item?id=6410900
- hablahaha 13y agoSo what exactly does writing tests for your tests look like...? Keeping this in a Cucumber realm, of course.
- keithnoizu 13y agoProbably a tricker task for cucumber than most frameworks. At the end of the day though I expect that you'll want to have some classes that manage fixtures, perform setup functions, interact with the sut etc and the cucumber regex matches just call into those classes to manipulate the sut and validate it. So tests here are just cucumber or rspec tests that verify the underlying frameworks that cucumber drives. So for example if you have partial object equivalency methods that verify that only specified fields on two objects match you would write tests to verify they are correctly matching or failing to match two objects as expected before you use that in your cucumber tests.