Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As an example, a test case  (i.e. "Valid_Logout") that checks the valid logout procedure can use the "Login_with_valid_credentials" module as the first macro step, before executing the module and its actions (i.e. "Logout") that perform the logout and verify its result.


Running the tests

Using Ranorex Studio

Test cases can be "run" from within the Ranorex Studio UI . 

Before running , Ranorex may decide the tests, you have to to build the current project which will produce a executable file. Tests are in fact performed by this executable file and not Ranorex Studio selfby Ranorex Studio itself.

Using Ranorex Studio

Test cases can be "run" from within the Ranorex Studio UI; a build happens in the background, if needed.


Whenever running, Ranorex Studio uses a run configuration to know which test cases to run; in the previous screenshot it is called "All_tests" and contains all test cases, since they're selected.

From the command-line

Integrating with Xray


In order to have visibility of our test automation results in Jira, we need to generate a JUnit XML that can then be submitted ot Xray.

Enabling the JUnit XML report can be done right from Ranorex Studio or from the command-line.

After running the tests, we 

Image Removed

If we run the tests from within the Ranorex Studio UI, we can go to the properties of our test suite to we can customize the report file name, the reports directory, and enable the JUnit XML report which Xray can later on process.




From the command-line

Tests can be run If we run the tests from the command-line, by calling the executable built by Ranorex , we can enable Studio.

The execute can be found inside the project folder (obtainable by looking at the project properties), either in the bin\Debug or bin\Release folder.

Image Added


To run the tests, we execute the file and pass some arguments to enable the JUnit XML report, customize the report file base file name, among other options; (use /help to find available options).

Code Block
languagebash
titleexample of a shell script to run the tests
MyTest1.exe /junit /reportfile:results

In this case, the report will be stored in the current directory and wil be named results.rxlog.junit.xml.

Integrating with Xray

In order to have visibility of our test automation results in Jira, we need to generate a JUnit XML report whenever running the tests, that can then be submitted ot Xray as shown in the previous section.


To submit the report to Xray, we can use our favourite CI/CD tool or a simple shell script for that. 

...