Another possible solution (that you may have already covered), is there a way in cucumber to express an expected "after" state like given, except perhaps something like "now", once the test has completed? That way cucumber could match the givens with the afters and just chain tests by itself, but if there was no matching given/after, just run the givens on the test. This would be pretty powerful and efficient, might impact the product owner's view a bit, but you can't have everything in life :)For example:Scenario: Valid LoginGiven the logon page is displayedWhen I log in with as a valid customerThen the landing page is displayedNow I am on the landing pageScenario: View SpecialGiven I am on the landing pageWhen I view a product that is on specialThen the full product description and price is displayedNow I am viewing a product descriptionThe cucumber framework can now chain these two independent scenarios together (as long as the first scenario passes). It could develop graphs of scenarios based on what is working and what is not. It could run quickly and re-use test data and still preserve the atomic flexibility that you implied in your reply.Has this possibility already been discussed and discarded?CheersPeter
On Friday, July 25, 2014 3:29:40 PM UTC+10, Peter Wilson wrote:Hi,New to Cucumber, please forgive my ignorance.We have been writing cucumber test cases for about 3 months now at a system test level (for manual execution wile we got the automation framework up and running) and enjoying the clarity it provides, but now that we are starting to automate these tests we are finding some inefficiencies. If we want to test an end to end flow and check lots of stuff along the way then cucumber doesn't seem really suited to the task.We are thinking we will keep our manual cuces but when we automate, we'll create one super cuce that does many steps and many checks along the wayeg:Given blahWhen I login as a such and such userThen the welcome page appearsAnd the user's name is shownWhen I open the my policies linkThen all of my current policies are shownBut none of my expired policies are shownWhen I select a policyThen the details of my policy are shownAnd the policy number matches the number on the policy list pageEach of these When and Then blocks matches an individual test case that is more story centric, but the above multi-when then case is much more efficient for automated regression execution because I don't need to restart the browser and get it into position for each individual cases, and I don't need to create new test data for each individual case, one set of data works for the whole long regression case.I hope my ponderings make sense, feedback would be appreciated.CheersPeter
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The benefit would be quicker execution time. This would be due to two reasons1. Test data doesn't need to be created for each test case. If chained then the next test can just pick up where the last left off2. No need to redo step that have already been done to get to a "given" state.For example, imagine if a test case needs to go through screen A, B C and D to get to screen E to do its test, the "Given" then has to create the necessary test data, and navigate to screen E and then the test can start. Now if we already have tests that look at screens A, B C and D, then we run those first and then run our next test. It just picks up where the test for screen D left off. Much quicker... yes?
That's the only benefit I can see.So as it currently works, Cucumber would have to Do a test for screen A, blow away the browser and test data, Create new test data for screen B, navigate screen A to B, test then blow away test data and browser, then create new test data, navigate screens A, B and to C, test screen C and so on. Seems a bit wasteful when gui automation is pretty slow on execution.