Page 1 of 1

How to create report for every test case

Posted: Tue Apr 23, 2019 11:10 am
by ChrisN.
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.

Re: Report for every test case

Posted: Tue Apr 23, 2019 11:38 am
by odklizec
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

Re: How to create report for every test case

Posted: Tue Apr 23, 2019 12:17 pm
by ChrisN.
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.

Re: How to create report for every test case

Posted: Tue Apr 23, 2019 12:29 pm
by odklizec
Hi,

How exactly they failed? Could you please post entire report, with error message you getting?

Re: How to create report for every test case

Posted: Tue Apr 23, 2019 12:41 pm
by ChrisN.
SOLVED!
The problem was really the Security Limitation and some parameter which i get from the other test.
Thank you, your solution is greate.

Re: How to create report for every test case

Posted: Wed Apr 24, 2019 9:02 am
by ChrisN.
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

Re: How to create report for every test case

Posted: Thu Apr 25, 2019 10:39 pm
by Vega
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