How to use BDD
In the BDD tab, users can Add New Section which is located in the left-hand corner of the application. In the middle of the application, there is code/view and on the right, a model is shown.
BDD has 4 major features.
Let's deep dive into the 4 features.
Code - This feature allows users to write testcase scenarios using the Gherkin language.
Link that helps to know more about Gherkins https://cucumber.io/docs/gherkin/reference/
To start writing scenarios user should click on Add New Section.
View - This feature provides a graphical building block approach. The building blocks could be rearranged and moved around to modify testcase scenarios. Upon submission, the changes made in the view feature would also be reflected in the code and diagram features.
Example: User can write scenario by using Add New Scenario or Add New Scenario Outline by clicking below options as shown
Scenario
Scenario outline
Both Scenario and Scenario Outline can be written in same feature
How to write scenario in View feature
Users can change the scenario by shuffling steps, deleting them, and updating them by clicking the Submit button.
· My data is a collection of data where users can either drag and drop the output. The following is an example of how a user can create a data collection in BDD
How to create and how to drag and drop into view feature is shown below:
Step by Step:
· Click on My data from bottom of the page.
· Click on view all data set icon.
· Click on the Data set icon from left hand corner of the page to create new data set as shown below.
· User can add how many columns and rows are required and name of the data set.
· Click on back to Project.
· User can view created Data set as below in My Data option.
How to create and Drag Drop data set in view feature as shown below
How to delete row or column in data set
To select columns or rows, the user can simply click on the column or row icon located at the page's righthand corner.
To delete the desired column or row, the user can manually select it, one row or column at a time.
Centralized Data Storage
Understanding Data Sharing in Gherkin Files
Imagine your application as a library. In this library, there's a main desk (your centralized data storage) where all the important information is kept. This could be user details, settings, or any other critical data your application needs to function.
Gherkin Files: The Bookshelves
In our library, there are several bookshelves (these are your Gherkin files). Each bookshelf contains books (scenarios) that tell different stories (describe different behaviors of your application). However, all these stories are based on the information available at the main desk.
How It Works
Data Centralization: First, you store all the necessary data in one place in your application. This is like keeping all the key information at the main desk in our library analogy.
Data Utilization in Gherkin Files: Each Gherkin file contains various scenarios written in a simple, human-readable format. These scenarios describe how your application should behave in different situations. However, to make these scenarios realistic and relevant, they need details from your centralized data.
Example Scenario: Let's say one of your Gherkin files is about user login behavior. The scenarios in this file will describe what should happen when a user tries to log in, like:
Scenario: Valid user login Given a user exists with a <username> and <password> When the user tries to log in with the correct credentials Then the user should be successfully logged in
In this scenario, the "username" and "password" would come from your centralized data storage.
Benefits: This approach ensures consistency and ease of maintenance. If you need to change a piece of data, you only update it in one place, and all your Gherkin files will use the updated data. It's like changing a piece of information at the main desk, and all stories in the library automatically update with this new information.
When a user imports a file containing a dataset or example into Conformiq Visualizer, if multiple data entries share the same column name, they will be considered as one data entry (The latest is the truth). To maintain distinct data entries, ensure that each has a unique column title or includes additional columns to differentiate them
Conclusion
By having a single source of truth for your data and spreading it across various Gherkin files, you make your application's behavior-driven development more efficient and manageable. It's a smart way to ensure that all parts of your application are singing the same tune, using the same, up-to-date information.
Model - Using this feature, users can access test scenarios in diagrammatic format and drag and drop test scenarios from the toolbox, as shown below:
Generating Testcase Scenarios in BDD tab:
How to Upload the File in BDD Tab
Begin by navigating to the BDD tab in the user interface.
Click on Add new section.
Locate the file you want to upload and select it.
Click on the upload button to initiate the file upload process.
Once the file is successfully uploaded, proceed to the next step.
Accessing Testcase Scenarios:
In the BDD tab, you will find the uploaded file displayed.
How to Export Files in BDD Tab
The BDD tab in the application provides users with the ability to export files in various formats. Users can select and export files in the following formats: PDF, Excel, PHP, BPMN, Cucumber JS, and SVG.
To export a file in any of the supported formats, follow these steps:
Navigate to the BDD tab in the application.
Click on the section you wish to export.
In the export options, choose the format you want to export the file to. The available options include Cucumber JS, PHP, Excel, PDF, BPMN, and SVG.
Once you have selected the desired format, click on the "Export" button to initiate the export process.
The application will then generate the exported file in the selected format. You can save the file to your local system or open it directly, depending on your browser settings.
How to Import File in BDD Tab
Import a file in BDD (Behavior-Driven Development) tab and execute testcase scenarios, follow these steps:
Open the BDD tab in your application.
Click on "Import".
Locate and select the file you want to import, then click "Open."
The file will be imported into the BDD tab.
Once the file is imported, you can navigate through its sections and scenarios and submit.