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....
Maintaining tests, keeping test cases current, and finding and fixing issues is very time-consuming. If you’re using Atlassian Jira for issue tracking, you can ease the burden of test maintenance by integrating Jira with Ranorex Studio for test automation.
Ranorex engineer Jason Branham recently demonstrated the integration in a live webinar, which we’ve summarized here for you. If you prefer, you can watch the entire webinar (including the extensive Q&A portion) on-demand. The webinar timings are shown below so that you can jump right to the topic that most interests you.
- Introduction to Ranorex Studio: 1:00
- Configuring the integration: 4:06
- Opening a new Jira issue for a failed test case: 14:26
- Updating a Jira issue when the linked test case succeeds: 23:30
- Live Q&A: 28:24
Introduction to Ranorex Studio
Ranorex Studio is an all-in-one tool for desktop, web, and mobile test automation, with a user interface for codeless automation of your test cases as well as a full IDE. If you’re completely new to Ranorex Studio, you can learn more about it from one of our introductory videos on desktop, web, or mobile testing.
In Ranorex Studio, the major unit of organization is a test suite, which can contain one or more test cases. In turn, a test case is made up of reusable modules that basically function as a keyword-driven test automation framework. For example, a test case to add a record to a database might include a module to launch the application, log on, insert the record, validate the record, and then log off. Using the codeless approach in Ranorex, you can easily create a new test case by combining these reusable modules, as shown in the image below.
Configuring the integration with Jira
Ranorex Studio provides a wizard for the integration. To access it, open a test solution, go to the main menu bar and choose Tools > Jira Integration > Start Jira wizard.
A dialog box appears, where you can enter the URL of your Jira instance. For purposes of the integration, there is no difference bewtween on-premise and cloud instances: they work the same.
Enter a valid email address and API token for a user account for your Jira instance. Ranorex recommends that you create a user specifically for the Ranorex integration, so you have a dedicated email address to receive test notifications.
After entering your credentials, Ranorex Studio saves them for use in future test solutions. You won’t need to enter them again, even if you use a different browser for testing. To change your Jira connection in the future, simply use the Switch account option in the wizard.
After connecting to your Jira cloud or server instance, you’ll see existing Jira projects based on the privileges of your Jira user account. Choose the project that you want to integrate with Ranorex Studio. You’ll also be prompted to pick the issue type that you want Ranorex Studio to use when creating issues. This is all that’s needed to enable manual issue handling.
The next step is to enable automatic issue handling. The values in the drop-down fields are based on your Jira project. You can specify the state of the new Jira issue when a test fails, such as “To Do,” and the state the Jira issue should have if the test succeeds in the future, such as “Done.”
After the configuration is complete, you’ll see a new file named Jira.jsd in your Ranorex solution. If your Jira instance requires additional fields, you’ll be promted to enter these in your Jira.jsd file. To update integration settings in the future, go to the Ranorex menu bar and choose Tools > Jira > Configure integration.
For example, an especially helpful feature in Ranorex is that you can create a video recording of a test run. You can change the integration to attach the video report to the Jira issue. To enable the video reporting feature, go to the Ranorex Studio menu bar and choose Test Suite > Properties, then click the Report tab. Here, you can configure the report in a number of ways, such as changing the name or choosing a JUnit-compatible copy. The video reporting feature is off by default, but you can enable it either for all test cases, or for failed cases only.
Opening a new Jira issue for a failed test case
To test whether the integration works properly, configure a test case with a validation step that you know will fail. Next, execute the test, and confirm that the Jira issue is created in the way that you expected.
After confirming the integration with a manual test, you can switch to automatic issue handling. To do so, follow these steps:
- From the Ranorex menu, choose Tools > Jira Integration > Configure.
- On the Manual Issue Handling tab, turn off Enable issue buttons in report.
- Switch to the Automatic issue handling tab and toggle on the option to Enable automatic handling, as shown below. (Note: you could have both automatic and manual on at the same time, but there isn’t really a benefit to doing this.)
It’s also recommended that you check the Upload video option to attach the Ranorex video report to the Jira issue. You can also change the summary and description, priority, labels, and more. However, be sure to leave the automatic identifier in the Summary field unchanged.
Note: if you encounter issues with uploading video based on the maximum attachment size, you can edit the bitrate of the video reporting feature of Ranorex Studio to reduce the size. But because each test case gets its own video, these files do stay relatively small.
With automatic issue creation enabled, the test report in Ranorex will contain a link to the issue in Jira. Click the link to jump into your Jira backlog and view the issue.
Updating a Jira issue when the linked test case succeeds
Ranorex Studio connects a Jira issue to a test case through a link. Even if you rename or move a tests, the relationship between the Jira issue and the Ranorex Studio test is maintained.
When the test executes successfully, the corresponding Jira issue is closed automatically, as shown in the test run report below.
The integration between Jira and Ranorex Studio delivers instant feedback on the health of your application. Ranorex also integrates very well with TestRail for test case management, or you can use any other test case management solution that integrates with Jira.
To experience the integration for yourself, start a free, trial of Ranorex Studio today.
All-in-one Test Automation
Cross-Technology | Cross-Device | Cross-Platform
The SpecFlow add-in provides file templates for feature files, step definition files and event definition files. It also translates the features from Gherkin syntax to C# code. To install the SpecFlow add-in to Ranorex Studio, follow the instructions below:
Test driven development is a type of programming that relies on testing and coding as well as design to work as one.
Test maintenance ensures the quality and accuracy of an application is not compromised. Uncover how to ensure your tests are always up to code.