Page 1 of 1

How do I skip running a recording module please?

Posted: Thu Feb 26, 2015 10:33 pm
by Phat_Vinny
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.

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

Posted: Mon Mar 02, 2015 5:15 pm
by Support Team
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

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

Posted: Tue Mar 03, 2015 3:15 pm
by Phat_Vinny
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

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

Posted: Wed Mar 04, 2015 3:01 pm
by Support Team
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

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

Posted: Wed Mar 04, 2015 5:30 pm
by Phat_Vinny
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,