Description

This article provides a step-by-step walkthrough for creating a G-Questionnaire, creating cases, and generating test data with those cases. 

Use Case Example

A large company would like to test a variety of user data for an application. The Project contains complex rules and queries that must be built into the test data cases. A team of testers needs to quickly generate specific volumes/varieties of data based on their particular test cases. This team does not have extensive knowledge of GenRocket and must obtain their test data quickly through the web platform.


For example, a Test Data Engineer (TDE) can model and design a base test data case (i.e., G-Questionnaire Template) to assist with this. Testers can then copy this default case to create their test data cases, change loop counts, and make other modifications without changing the default case or having a vast knowledge of GenRocket. 



Step 1 - TDE Creates and Sets up a Project

A Test Data Engineer (TDE) creates a Project with the default Project Version for this example. This Project contains four Domains with the following Attributes: 

  • Organization - id, name, address, city, state, zip, phoneNumber
  • Department - id, name, phoneNumber
  • User - id, firstName, lastName, middleInitial, username, password
  • Address - id, address, city, state, zipCode


The TDE sets up Parent/Child/Sibling Relationships between Domains, adds a DelimitedFileReceiver to each Domain, and creates a Scenario for each Domain. A Scenario Chain is also created so each tester can download one Scenario file to generate their data.



Step 2 - TDE Creates a G-Questionnaire Suite

Next, the TDE will create a G-Questionnaire Suite for the default Project Version created in the previous step. Users can create a new, blank G-Questionnaire Suite or one from an existing G-Case. Click here for more information on creating G-Questionnaire Suites.


For this example, the TDE will create a new G-Questionnaire Suite from within the G-Questionnaire Management Dashboard:



Step 3 - TDE "Authors" the G-Questionnaire Template

The system automatically creates a template that cannot be deleted, only modified. The TDE will "author" the template to create the default G-Questionnaire Case.


 

The TDE "authors" the template by adding Domains, Attributes, Receivers, G-Rules, and G-Queries. They may also replace Generators or modify Generator parameters for added Attributes. To see a complete example, click here


Note: An Author can continue to modify a Template even if the Testers are using the template. Any modifications to the template will be immediately reflected in the Cases referencing the template.


Step 4 - Users Create Cases from the G-Questionnaire (or other Cases)

Any user can create one or more G-Questionnaire Cases from the default template. They can also copy other cases that have been added to the suite. 



For this example, two separate testers have created their own G-Questionnaire Cases titled:

  • tester1case
  • tester2case



Step 5 - Users Make Changes to their G-Questionnaire Case

By default, the user will see the "above the hood" view and can perform the following actions when in "Tester" mode. 

  • Alter the Loop Count for each Domain
  • Enter a Constant Value for an Attribute
  • Select from Generated Preview Values
  • Revert to the Original Generator
  • Go "Under the Hood" to make further modifications



Step 5a - Tester 1 Configures their G-Questionnaire Case

For this example, Tester 1 has modified their case to generate the following data: 

  • 1 Organization
  • 3 Departments
  • 10 Users per Department
  • 1 Address per User


They want to use a constant value of "ABC Organization" for the Organization Name.




Step 5b - Tester 2 Configures their G-Questionnaire Case

For this example, Tester 2 has modified their case to generate the following data: 

  • 2 Organizations
  • 5 Departments
  • 100 Users per Department
  • 1 to 3 Addresses per User


No other changes will be made to the Attributes/Generators by Tester 2. 




Note: Click here for a complete example of modifying G-Questionnaire cases in "Tester" mode.

Step 6 - Users Generate Their Test Data

Users will need to complete four steps to generate test data with a G-Questionnaire Case: 

  1. Install GenRocket Runtime on their Local Machine
  2. Download the G-Questionnaire Suite or an Individual Case 
  3. Download the Scenario, Scenario Chain, or Scenario Chain Set
  4. Run the command in a Command Prompt or Terminal Window


Step 6a - Install GenRocket Runtime on Local Machine

Users need to install GenRocket Runtime and download their Profile before they can generate test data. These steps vary depending on what operating system they are using. 


Step 6b - Download G-Questionnaire Suite or Case

Tester 1 wants to generate data for their G-Questionnaire Case. They can download the entire suite or an individual case by clicking the Download (Cloud) icon. 


Entire Suite (Generate Data for any Case)


Individual Case (Generate Data Only for that Case)


Step 6c - Download the Scenario, Scenario Chain, or Scenario Chain Set

Tester 1 then downloads the Scenario Chain created by the TDE for the Project used in this example. This can be done from the Project Dashboard by clicking the Download (Cloud) icon within the appropriate pane.



Step 6d - Generate Test Data using the G-Questionnaire Command

Within the G-Questionnaire Management Dashboard, Tester 1 selects their G-Questionnaire Case and copies the command line displayed at the bottom of the dashboard. 



They then open a Command Prompt or Terminal window and navigate to the directory where the Scenario, Scenario Chain, or Scenario Chain Set is located. 


For this example, it is the Downloads folder; however, this path may differ depending on how a user's Organization Resources have been set up for their local computer. 


Mac OS/Linux Path Example


Windows Path Example


Paste the command into the command line and replace <ScenarioName.grs> with the name of the Scenario, Scenario Chain, or Scenario Chain Set. For this example, it is a Scenario Chain titled "AllScenarioChain.grs". 



Finally, Tester 1 presses the "Enter" key to run the G-Questionnaire command for their case at the command line.



Sample Output

This example generates four delimited files (one for each Domain): Organization, Department, User, and Address. 



Tester Expected Output

Tester 1 set up the G-Questionnaire Case to generate the following output for each Domain: 

  • 1 Organization
  • 3 Departments
  • 10 Users per Department
  • 1 Address per User


They wanted to use a constant value of "ABC Organization" for the Organization Name.


Organization File

One organization has been generated with "ABC Organization" as the name. 



Department File

Three departments have been generated, and they all belong to the generated organization, as shown by the organization column.


User File

Thirty users have been generated. This is ten users per department, as shown by the department column.


Address File

As shown by the user column, one address has been generated per user (30).