G-Feature File can be used to quickly create or import Feature Files into a selected Project Version of a given Project. Once imported or created, users can add G-Data Tables to Feature Files and use synthetically generated test data for Cucumber tests.
What are the Benefits of using G-Feature File?
- Quickly import or create and modify Feature Files
- Use Synthetic Data for Cucumber Tests
When should G-Feature File be used?
- Any time synthetically generated data needs to be included in a Cucumber Feature File.
In This Article
- What is Behavior Driven Development or BDD?
- What is a Feature File?
- What is G-Feature File?
- What are G-Data Tables?
- Supported Step Definition Languages
- Prerequisites for Using G-Feature File
- How does G-Feature File work?
- Using G-Data Tables in Cucumber Tests
- Additional Information
What is Behavior Driven Development or BDD?
- Behavior-Driven Development or BDD is an agile software development process that encourages collaboration among developers, quality assurance testers, and customer representatives in a software project.
- Reference for Definition: Behavior-Driven Development (n.d) Wikipedia. https://en.wikipedia.org/wiki/Behavior-driven_development
What is a Feature File?
- Feature Files are used to write acceptance steps during automated testing. A Feature File is a common file containing the feature description, scenarios, and steps for testing a feature.
- A Feature File functions as an entry point for writing tests and is used as a live document when performing testing. These files have a ".feature" file extension, and users should create a separate Feature File for each software functionality.
What is G-Feature File?
- G-Feature File is a Self Service Platform component that can be used to create/modify Cucumber Feature Files for a selected Project Version of a given Project.
Supported Step Definition Languages
Prerequisites for Using G-Feature File
Users will need, at minimum, to create a Project with a default Project Version.
To use G-Data Tables, users will also need to set up any required Domains, Attributes, Scenarios, and Self Service Components for the selected Project Version.
How does G-Feature File work?
- Step 1: Access the G-Feature File Management Dashboard
- Step 2: Create a G-Feature File Suite
- Step 3: Import or Manually Add a Feature File to the Suite
- Step 4: Add Keywords/Steps and Modify the Feature File
- Step 5: Download the G-Feature File Suite or Individual Feature File
- Step 6: Next Steps and Method for G-Data Tables in Feature File
Step 1: Access the G-Feature File Management Dashboard
- Select a Project within the Project Dashboard.
- Expand the Self Serve Options Menu for the appropriate Project Version.
- Select G-Feature File within the drop-down menu.
Step 2: Create a G-Feature File Suite
Feature Files are managed within a G-Feature File Suite. One must be created to import or create a Feature File.
Step 3: Import or Manually Add a Feature File to the Suite
Use the Import Feature button to import a Feature File or the Add Feature button to create a Feature File.
Step 4: Add Keywords/Steps and Modify the Feature File
Use the colored buttons to add Comments, Keywords, Steps, Document Strings, Data Tables, and G-Data Tables to a Feature File.
Users can preview the Feature File in Gherkin or Step Definition format within the Feature File Preview Pane.
Step 5: Download the G-Feature File Suite or Individual Feature File
Users will need to download the entire G-Feature File Suite or individual Feature Files to their local machine. The downloaded Feature Files can then be used to perform automated testing.
- Click on the Download (Cloud) icon for an entire Suite or a Feature File.
- The checkboxes can be used to select what files will be downloaded.
- Click the Download button to download the Feature File and the Step Definition File.
Using G-Data Tables in Cucumber Tests
An additional step must be performed if you have used a G-Data Table in a Feature File to retrieve data from a GenRocket Component (e.g., Scenario or Scenario Chain).
To get the data while executing the G-Feature File test, you will need to make a call to the following GenRocket API function to generate the data in real-time.
GRFeatureFile.execute(List<Map<String, String>> inputs, Boolean inMemory = false)
Note: For more information, please see this article: How to add a G-Data Table to a Feature File.
|G-Feature File Management Dashboard||Learn more about the G-Feature File Management Dashboard UI.|
|How to create a G-Feature File Suite||Learn how to add a G-Feature File Suite to a Project Version.|
|How to import a Feature File into a Suite||Learn how to import Feature Files into a G-Feature File Suite.|
|How to manually add a Feature File||Learn how to add a Feature File to a G-Feature File Suite.|
|How to add Keywords and Steps to Feature Files||Learn how to add Keywords and Steps to a Feature File.|
|How to add a Data Table to a Feature File||Learn how to add a Data Table to a Feature File.|
|How to add a G-Data Table to a Feature File||Learn how to add a G-Data Table to a Feature File.|
|G-Feature File Example using a G-Data Table||See a full example from start to finish.|