How does one automate a sequence of provisioning steps across forms with dependent data?

24 views
Skip to first unread message

douglas....@granicus.com

unread,
Sep 20, 2016, 1:48:29 PM9/20/16
to Cukes
Hello,
Theory says dependent scripts make it harder to maintain and follow.  Yes, I understand this but I have the following feature to automate...

My feature has a set of manual provisioning steps (although not required) which is the recommended steps that Admin use to provision data in the system,
They typically go to form 1, enter some data
Then they go to form 2, create some more data, using data created from form 1
Continue to form 3 and use some data from form 1 and 2,
etc,

I have created separate stand-alone feature files to create the individual forms.
But I would like to create a "Smoke" test which calls all the feature files in a prescribed order.

We have had issues with data being populated then not showing up on another form manually and I'd like to catch these bugs automatically.

So right now the only way I see if to cut and paste my individual feature file gherkins into one BIG smoke test which prescribes the order.

Is there a better way to do this?  If I put the same tag on all the individual feature files, does the user have a say in the order of the tests that are executed?   If not, how does cucumber decide which scripts to run when multiple files match the tag, alphabetically?  some internal key? randomly?

I was wondering if a feature file could contain a scenario with individual "cucumber -t @my_feature" lines invoking each script.   I guess I could do this with a shell script but I am looking for advice how people automate a system with a prescribed order of provisioning of forms and where known buggy area is data provisioned on one form not showing on another.

Thanks
Doug

Thomas Sundberg

unread,
Sep 20, 2016, 4:39:49 PM9/20/16
to cu...@googlegroups.com
I would say that is is not necessary so that you want to call all
features in a specific order. What you want is to have a test run
through your system in a specific order.

Given this, I would consider writing a smoke test scenario that uses
the same helpers as your regular scenarios but calls them in the order
you want them executed to gain confidence that silly mistakes are
caught early.

Notice that I don't suggest that you call steps from steps, that's a
well known rabbit hole you would like to avoid.
I assume that your steps are tiny and only delegates to helper
methods. Good steps are often one liners that translates from Gherkin,
and adds parameter values, to code. These helpers can be accessed from
other steps and you can therefore execute the same things from a smoke
test that you execute from your regular steps.

Another option is to use the helper methods you use for your steps and
combine them using a regular unit test tool. This would not involve
Cucumber at all. That may or may not be a good option for you. But if
you see Cucumber as a communication tool used to facilitate discussing
interesting behaviour with business representatives, then I think that
hiding a smoke test like this in code can be a good idea.

HTH
Thomas


>
> I was wondering if a feature file could contain a scenario with individual
> "cucumber -t @my_feature" lines invoking each script. I guess I could do
> this with a shell script but I am looking for advice how people automate a
> system with a prescribed order of provisioning of forms and where known
> buggy area is data provisioned on one form not showing on another.
>
> Thanks
> Doug
>
> --
> 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.



--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback
Reply all
Reply to author
Forward
0 new messages