I’m struggling to understand the best place to place in scenarios.

My scenario reads like the following:

Scenario: Register member for first time
Given I have navigated to new registration page as a member who has never registered for MOS
When I complete the registration form
Then I am navigated to the registration complete page

I have my test data for the When step hard coded down in the step defs as I see it as unnecessary noise for the feature file. I posted another post about if this is the best place for this and I am now looking into creating a properties file to store such data.

The problem with this scenario is that once I have used this particular data for this test it effectively doesn’t work for this test any longer. This being because the member is now in a registered rather than unregistered which drives different UI behavior.

I know the ideal fix here is for my Given step to perhaps delve into the source system and locate some test data that works for the test but source system is not web (no selenium) and we are restricted on db access so that rules that option out.

I’m wondering if anyone has run into similar challenges and what possible ways around this situation we may have?

At the moment I will have a spreadsheet (.properties) that will feed data into the step def but once that test has been run once then someone will have to refresh that spreadsheet data with a member that works (unregistered member). Messy, brittle, horrible!

Source link https://sqa.stackexchange.com/questions/31899/where-to-state-test-data-in-cucumber


Please enter your comment!
Please enter your name here