Ranorex and ALM integration

Ask general questions here.
User avatar
subodh4u7
Posts: 71
Joined: Tue Jan 06, 2015 8:26 am

Ranorex and ALM integration

Post by subodh4u7 » Mon Mar 27, 2017 6:04 am

Hi Experts,

I am stuck at one point , can anyone please help me.

I have used the following post for integration of Ranorex with ALM
http://www.ranorex.com/blog/running-ran ... ty-center/

However, a test case is passed in ALM even though test module is failed .

Can anyone please help me how to handle this part. i.e If a test module is failed , the test case status in ALM should be failed.
Regards,
Subodh

jma
Posts: 107
Joined: Fri Jul 03, 2015 9:18 am

Re: Ranorex and ALM integration

Post by jma » Tue Mar 28, 2017 2:08 pm

Hi subodh4u7,

I would suggest having a look at the VAPI-XP-TEST script, which processes the result of the test run and populates the result in HP quality center.

According to the script the current test status will be set to "Failed" if the result of the executable test is unequal "0".

Code: Select all

If result <> 0 Or Err.Number <> 0 Then
   CurrentRun.Status = "Failed"
   CurrentTSTest.Status = "Failed"
End If
As long as you didn't modify this script I assume that in this case the executable test returned "0". If this information doesn't help you, please upload a compressed Ranorex Report of the failed test execution.

User avatar
subodh4u7
Posts: 71
Joined: Tue Jan 06, 2015 8:26 am

Re: Ranorex and ALM integration

Post by subodh4u7 » Wed Apr 05, 2017 6:45 am

Thanks jma.

I have included the following script:
If result <> 0 Or Err.Number <> 0 or ERRORLEVEL <> 1Then
CurrentRun.Status = "Failed"
CurrentTSTest.Status = "Failed"
End If

But now even test case which are passing that's also updated as failed.

Do you have working test script which would help me.
Regards,
Subodh

jma
Posts: 107
Joined: Fri Jul 03, 2015 9:18 am

Re: Ranorex and ALM integration

Post by jma » Wed Apr 05, 2017 3:00 pm

Hi subodh4u7,

The code sample from my previous post is from the corresponding Ranorex blog post about HP quality center. Please go through the whole blog post and use the VAPI-XP-TEST script from that blog: http://www.ranorex.com/blog/running-ran ... PI-XP-TEST

User avatar
subodh4u7
Posts: 71
Joined: Tue Jan 06, 2015 8:26 am

Re: Ranorex and ALM integration

Post by subodh4u7 » Mon Apr 16, 2018 6:23 am

jma wrote:Hi subodh4u7,

The code sample from my previous post is from the corresponding Ranorex blog post about HP quality center. Please go through the whole blog post and use the VAPI-XP-TEST script from that blog: http://www.ranorex.com/blog/running-ran ... PI-XP-TEST

In my batch file:
D:
cd D:\automation\bin\Debug
Automation.exe /zr /zrf:Report.rxzlog

in my ranorex instance in ALM, I have set the following properties:
Path: D:\automation\bin\Debug
Args: /tc:test1
Executable: Automation.exe
Report File: Report.rxzlog

The parameters which are set in ALM is not being called since batch file is being run. I want to use the parameters which are set in ALM and automation should be running on the basis of these parameters only.

Can any one help me, what needs to be done.
Regards,
Subodh

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: Ranorex and ALM integration

Post by N612 » Tue Apr 17, 2018 9:09 pm

I think I see your issue. The batch file should literally be the same as the blog post. Do not change any of the %# with the value you want in the batch file. These are just placeholders which are ultimately set by the parameters configured in ALM.

Code: Select all

cd %1
%2 /zr /zrf:%3 %4 %5 %6 %7 %8 %9
I hope this helps!

User avatar
subodh4u7
Posts: 71
Joined: Tue Jan 06, 2015 8:26 am

Re: Ranorex and ALM integration

Post by subodh4u7 » Thu Apr 19, 2018 8:46 am

N612 wrote:I think I see your issue. The batch file should literally be the same as the blog post. Do not change any of the %# with the value you want in the batch file. These are just placeholders which are ultimately set by the parameters configured in ALM.

Code: Select all

cd %1
%2 /zr /zrf:%3 %4 %5 %6 %7 %8 %9
I hope this helps!

Thank a lot, it really worked.
Regards,
Subodh