Calling testcase with nested testcase from commandline

Class library usage, coding and language questions.
Hermch
Posts: 40
Joined: Thu May 26, 2011 7:17 am
Location: Germany

Calling testcase with nested testcase from commandline

Post by Hermch » Mon May 14, 2012 2:32 pm

Hi,

I try to call a testcase from the commandline, which has got another testcase attached.

I tried it with: C:\Test.exe /testcase:IllegalIPv4Address
In this case only the setup and teardown region of the testcase is executed.
The inner test "EnterInvalidIPs" is ignored.

How can I achieve that "EnterInvalidIPs" is executed as well?

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

Re: Calling testcase with nested testcase from commandline

Post by Support Team » Mon May 14, 2012 6:47 pm

Hi,
Hermch wrote:How can I achieve that "EnterInvalidIPs" is executed as well?
The nested test case has to be checked within the run configuration to be executed, even when only executing a single test case:
tmp.png
Regards,
Tobias
Ranorex Team
You do not have the required permissions to view the files attached to this post.

Hermch
Posts: 40
Joined: Thu May 26, 2011 7:17 am
Location: Germany

Re: Calling testcase with nested testcase from commandline

Post by Hermch » Tue May 15, 2012 8:14 am

Thats no good solution for me.
If I want to execute tests with a batchfile, there must be a possibility how i can say that the complete testcase should run without opening it with ranorex.

Is there no other way?

My Batch looks as follows:

REM Editable Area for choosing test for execution
ECHO Automated Testcase is starting >>result.txt
"C:\Test.exe" /testcase:IllegalIPv4Address %~dp0 >>result.txt
"C:\Test.exe" /testcase:ChangeSettings %~dp0 >>result.txt
"C:\Test.exe" /testcase:Up/Downgrade %~dp0 >>result.txt
"C:\Test.exe" /testcase:ValidateSettings %~dp0 >>result.txt


It must be possible for me to say that batch, that the whole testcase runs, not only Setup and Teardown region...

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

Re: Calling testcase with nested testcase from commandline

Post by Support Team » Tue May 15, 2012 9:40 am

Hi,

I would recommend to generate run configurations which reflect your test cases (with enabled nested test cases).
For further details about run configuration please have a look at following chapter of our user guide:
Running a Test Suite

After doing so, you have a set of run configurations which can be executes using the command line:

Code: Select all

C:\Test.exe /runconfig:rc_IllegalIPv4Address
Regards,
Tobias
Ranorex Team