Discussion:
[Cucumber] General question on approach to building a framework
(too old to reply)
m_finn
2017-11-10 13:50:28 UTC
Permalink
Raw Message
Hi All,

I've just started with Cucumber and Gherkins and I'm using Specflow and
Selenium to write them in Visual Studio. I test on one web based .Net
system.

I'm wondering if anyone can give me a brief guideline of how approach the
building of the feature files and the step definitions so they are concise
and easy to use.

e.g. I'm thinking of using the Page Object Model PageFactory to develop the
framework of the system (any better way?)

My solution will comprise of :-

- Pages directory containing all my classes for each page e.g.
LoginPage.cs, HomePage.cs, HelperClass.cs
- Utilities directory containing browser class and some other excel readers
etc

The system to test has features which consist of multiple user stories
(usual 1-6) so:

1) My .feature files - I assume you have one feature file for every system
"feature" or do you break it down further so each feature file is a
separate user story? i.e how many scenarios per feature file?

2) StepDefinitions.cs files - how do you break them down? I've only wrote
several gherkins but its already getting quite a size. Whats the best way
to break down the files e.g. GivenStepDefs.cs, WhenStepDefs.cs etc?

3) Finally, are Gherkins suitable for long tests with many steps? whats the
recommended max. length for a scenario? e.g. some of the user processes are
quite long and can take 15-30 steps of a manual test in Test Manager, how
do you translate that into a few lines of Given,When, And Then?

If anyone could suggest any recommended reading that would be great, theres
plenty resources online but i cant see anything on the approach to scale it
up for a large business system.

Any views appreciated!
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...