Forum Discussion

bhcommunity1's avatar
bhcommunity1
Contributor
3 years ago
Solved

Cucumber/TestComplete - Approaches for making data available across across the entire test scenario?

CucumberStudio-TestComplete Automation - Looking for approaches for making large quantities of data available across the entire test scenario?

 

Simple CucumberStudio Test Scenario Example

Given Reservation created for UserA
When Reseration is rendered
Then Reservation data is displayed correctly

 

So, the above CucumberStudio Scenario Actionwords convert into individual Step Definition functions within TestComplete.

 

The question is what kinds of approaches do people think work the best - to store large quantities of data and making them available across the individual Step Definition functions?

 

I see the concept of Project Variables. Where you can have a variable of type (String, Int, Double, Boolean, Object, Table, DB Table and Password).

 

The Reservation Data example may consist of lots of data values (dozens, if not more - data about UserA, Reservation data (when, where, etc...)).
- Are people actually create 20+ individual project variables.
- Are people creating dictionary objects and storing them in project variables.
- Are people creating class definitions to store large quantities of data and storing instances of these objects in project variables.
- Are people not using project variables, but instead generating external files to store and reference the data (JSON, XML, etc...)
- Different approach?

 

Curious to see how people have implemented their solutions. Looking for best approach ideas.

 

thanks for any ideas.

  • Hi,

    Like you pointed out there are many options for using data. It tends to be all personal preference and organizational decisions. From my personal experience I would consider an external file the most common, with individual variables as the 2nd contender. In terms of ease of use, both are easy to utilize, and allow access across projects with project suite variables too. 

    There is no right or wrong way to do this, just my opinion. 

1 Reply

  • Hi,

    Like you pointed out there are many options for using data. It tends to be all personal preference and organizational decisions. From my personal experience I would consider an external file the most common, with individual variables as the 2nd contender. In terms of ease of use, both are easy to utilize, and allow access across projects with project suite variables too. 

    There is no right or wrong way to do this, just my opinion.