How do I skip running a recording module please?

Ranorex Studio, Spy, Recorder, and Driver.
User avatar
Phat_Vinny
Posts: 3
Joined: Tue Nov 29, 2011 9:59 pm

How do I skip running a recording module please?

Post by Phat_Vinny » Thu Feb 26, 2015 10:33 pm

Hello,

I am a novice when it comes to programming and testing. I have been running Ranorex in conjunction with Empirix for some time successfully but have only done point and click tests.

I have a Ranorex test case that tests 3 modems. It then emails me and lets me know of their status. I'd like to change it to ONLY send the email should one of the 3 modems fail.

Is there an easy way to skip a recording module or end the test case should all tests give positive results.

Thank you in advance for input.


I have done a search to try and find hints in the forum but cannot get what I have read to work.
Vince

And let us not grow weary of doing good, for in due season we will reap,
if we do not give up.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How do I skip running a recording module please?

Post by Support Team » Mon Mar 02, 2015 5:15 pm

Hi Phat_Vinny,

You wrote:
I have a Ranorex test case that tests 3 modems. It then emails me and lets me know of their status. I'd like to change it to ONLY send the email should one of the 3 modems fail.
May I ask you which Ranorex modules you use to test your modems and how your test suite looks like?
Furthermore, how do you send the emails, which approach do you use to send them?

Is there an easy way to skip a recording module or end the test case should all tests give positive results.
I am afraid I didn't get this, may I ask you to describe in more detail what you are trying to do?

Thanks in advance for the additional information!

Regards,
Markus

User avatar
Phat_Vinny
Posts: 3
Joined: Tue Nov 29, 2011 9:59 pm

Re: How do I skip running a recording module please?

Post by Phat_Vinny » Tue Mar 03, 2015 3:15 pm

Markus,

Thank you for your reply. I am trying to conditionally test each modem. I have the test completed and running well. If the test fails,

The way I test the modem is telnet to an outbound modem device. I compare image to validate the modem has connected and speed is displayed. I then login to the modem and again compare to make certain all devices connected to the inbound modem are available. If they are both successful, I'd like to exit the test suite here.

If there is a failure, I have an SMTP mailer that is used for other programs as well that I launch and send an email text to a team that will investigate the modem failure noting the failure then return to the next modem to be tested.

When all 3 tests have completed go to exit.

Vince
Vince

And let us not grow weary of doing good, for in due season we will reap,
if we do not give up.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How do I skip running a recording module please?

Post by Support Team » Wed Mar 04, 2015 3:01 pm

Hi Vince,

I would use the following structure:

TestCase1 (Continue with sibling):
---Module1
---Module2
---Module3(if there is no failure in the previous modules this one will be executed as well)
TestCase2
---SendEmailModule

In case everything works well you can "uncheck" the TestCase2 from the Module3, in case there were a failure in one of the modules the TestCase2 will be executed and the Module3 skipped.
How you can "uncheck" a TestCase can be seen here: Starting Testcase by condition and How to stop test case/ignore next iterations.

Regards,
Markus

User avatar
Phat_Vinny
Posts: 3
Joined: Tue Nov 29, 2011 9:59 pm

Re: How do I skip running a recording module please?

Post by Phat_Vinny » Wed Mar 04, 2015 5:30 pm

Thank You Markus...

I was able to get it running by calling the exe files from an external batch file.
____________________________________________________________________
call "C:\Test1.exe" #Initial test of modem.

IF %ERRORLEVEL% EQU 0 (
ECHO "Success"
EXIT
)

IF %ERRORLEVEL% NEQ 0 (
ECHO "Validation failed! Sending email alerting email."
)

call "C:\Test2.exe" #this sends an email upon failure.

EXIT
______________________________________________________________________
This works reliably. I have resigned to creating a unique test for each modem. I am told they frequently update the devices that connect to them. This will lessen my maintenance times.

Thank you for the help,
Vince

And let us not grow weary of doing good, for in due season we will reap,
if we do not give up.