How to create report for every test case

Best practices, code snippets for common functionality, examples, and guidelines.
ChrisN.
Posts: 28
Joined: Wed Jul 25, 2018 11:38 am

How to create report for every test case

Post by ChrisN. » Tue Apr 23, 2019 11:10 am

I have a question to the Ranorex Report.
Is it possible to create a report for every test case?
At the Time I have a test suite with many test cases and need for every case a separate report. Is there any solution which I can use? I don't want start everytime a new test suite for every test case.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4967
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Report for every test case

Post by odklizec » Tue Apr 23, 2019 11:38 am

Hi,

I'm afraid, the only way, how to create a report file per each test case is to run the test cases individually. In other words, you cannot run entire test suite. You must execute the test with command parameter, describing which test case should be executed and you must do it for every test case separately, like this:
test.exe /tc:testcase_1
test.exe /tc:testcase_2
...
test.exe /tc:testcase_n
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ChrisN.
Posts: 28
Joined: Wed Jul 25, 2018 11:38 am

Re: How to create report for every test case

Post by ChrisN. » Tue Apr 23, 2019 12:17 pm

Thank you very much for the solution, unfortunately it's not working for me. All test are failed. Maybe the security limitation is one of the problems or the binding to the excel.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4967
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to create report for every test case

Post by odklizec » Tue Apr 23, 2019 12:29 pm

Hi,

How exactly they failed? Could you please post entire report, with error message you getting?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ChrisN.
Posts: 28
Joined: Wed Jul 25, 2018 11:38 am

Re: How to create report for every test case

Post by ChrisN. » Tue Apr 23, 2019 12:41 pm

SOLVED!
The problem was really the Security Limitation and some parameter which i get from the other test.
Thank you, your solution is greate.

ChrisN.
Posts: 28
Joined: Wed Jul 25, 2018 11:38 am

Re: How to create report for every test case

Post by ChrisN. » Wed Apr 24, 2019 9:02 am

Is it possible to create a PDF report after using this method? Report PDF in the TEARDOWN dont works. By using manually method I get problems with the security limitation

User avatar
Vega
Posts: 153
Joined: Mon Jul 11, 2016 2:15 pm

Re: How to create report for every test case

Post by Vega » Thu Apr 25, 2019 10:39 pm

You could create a teardown section for your entire test suite and place the ReportToPDF module there so that a PDF is always created at the end of the test suite. When it comes to executing individual test cases / containers, I would recommend using run configurations to quickly toggle what is included in the test suite OR execute via command line and specify the test case / container you want to run:

[*]Run configurations - https://www.ranorex.com/help/latest/ran ... iterations

[*] Execute via command line - https://www.ranorex.com/help/latest/ran ... execution/

Specifically with the command line approach and your scenario, I would probably create a batch file to execute each test case one by one. Your batch script may look something like this (using run configurations via command line):

Code: Select all

<your_test>.exe /rc:TestCase1
<your_test>.exe /rc:TestCase2
<your_test>.exe /rc:TestCase3
In the above example, TestCase1, TestCase2, and TestCase3 all refer to run configurations hence the /rc flag

You could also just specify which test case / container you want to execute without using run configurations by using the /tc argument instead of /rc (both are described in the 2nd link above).

Hope this helps