This article describes how to use the Ranorex Studio IDE and the Ranorex API for test automation in your behavior-driven development (BDD) process. BDD requires a cognitive shift: instead of thinking about testing functions, you are now thinking about behaviors....
Ranorex DesignWise Role in the Toolchain
Keeping in mind that our integration capabilities are constantly evolving, we can consider the following simplified toolchain as the status quo for this discussion:
Note: the specific tools around DesignWise in the image above are mentioned for example purposes and do not represent the exhaustive list.
Let’s look at both integration sides from DesignWise perspective in more detail.
The first part is to include traceability notes inside the DesignWise plan identifying which part of the model is affected by which story (there are largely 3 categories you can see on the image below).
Additional traceability elements include the Mind Maps (you can put the REQ ID in the value name), Forced Interactions, and in-line/per-tab comments in Scripts.
These steps reduce redundancy risk across the test suite given common one-to-many relationships between tests and requirements.
Left Side – how is “Best Practice” different?
Potential improvement #1: Write story descriptions in Gherkin. That would not only improve the clarity and communication, but would also provide the kickstart to scripting in DesignWise.
Potential improvement #2: Group parameters & values together in their own part of the story (similar to “Description” or “Acceptance Criteria”), in the mind map format (for visual analysis) and/or in the parameter table one (for direct import into DesignWise). That speeds up the process of reading through paragraphs of text to identify the key model elements.
Potential improvement #3: Include the “mini scenarios table” that covers the most important interactions from the story (which can also be imported directly into DesignWise). It can help clarify ambiguities in complex rules much sooner.
Potential improvement #4: Add “DesignWise” label and relationship link type “shares assets with”. Displaying both labels and links in the sprint board view will provide the quick view into possible connections and increase collaboration efficiency.
The primary method is exporting from DesignWise into compatible CSV and importing into test management tools (like Xray). DesignWise also supports export into the formats directly compatible with the execution tools at the last stage of the toolchain (like Ranorex Studio).
Specifically for Ranorex Studio, the primary integration paths are 1) scenarios table export as CSV to assign as the data source to the script; 2) Gherkin script export to proceed with the BDD integration outlined in this article.
How to deal with changes
Once the DesignWise model is built, the story link + traceability notes would map the requirement updates and let the user know which parts to change. The interaction coverage can be focused on the new areas via Mixed-strength and Parameter structure (e.g., more Value Expansions for less important parameters).
TCs in Jira/Xray would be updated via re-import, either for the full scope or only for the new elements using Freeze/Script features in DesignWise.
If the execution history must be preserved, the import is typically either performed into a new repository folder/Xray test plan or with overwriting the existing Issue IDs. Also, Xray Archive function or this solution (the new test execution item) can also be considered.
If it doesn’t have to be preserved, the existing tests can just be deleted and the new ones imported.