Page 1 of 1

Command Line argument 'tcdr' not working

Posted: Thu Feb 12, 2015 5:41 pm
by lstauffer
I'm unable to get the command line argument 'tcdr' working, and I'm not sure if I'm calling it correctly. I am currently using Ranorex 5.2.2.21596.

What I want to do is run a specific test case on only specific rows from the data spreadsheet.

If I call the test case without specifying any specific rows, the specific test case runs correctly on all rows shown in the data spreadsheet.

Example:
- test suite .exe = MyTestSuite.exe
- specific test case = MyTestCaseThree
- global parameter = globalParam
- command used: > MyTestSuite.exe /pa:globalParam=MyParam /tc:MyTestCaseThree

Result: MyTestCaseThree runs on all 12 rows shown in the data spreadsheet as expected.

But when I use the 'tcdr' argument, and try to run my specific test case, the very first test case is executed. It's almost as though I've got something wrong in my command line argument, where it's not recognized, and therefore wants to run all test cases within the test suite.

Example:
- test suite .exe = MyTestSuite.exe
- specific test case = MyTestCaseThree
- global parameter = globalParam
- command used: > MyTestSuite.exe /pa:globalParam=MyParam /tcdr:MyTestCaseThree=1-2

Result: MyTestCaseOne (which is the first test case) starts to run. I'm expecting MyTestCaseThree to run on rows 1 and 2 only.

Am I making the call correctly? Otherwise, how can I run a specific test case from the command line on specific rows from the data spreadsheet?

Thank you in advance for any help you can provide.

Re: Command Line argument 'tcdr' not working

Posted: Thu Feb 12, 2015 5:49 pm
by krstcs
The call looks correct to me.

Have you tried using the full switch verbiage?

"/testcasedatarange:MyTestCase=1-2"


If that works then the short version parser is probably bugged.

Re: Command Line argument 'tcdr' not working

Posted: Thu Feb 12, 2015 6:06 pm
by Support Team
Hi lstauffer,

When you just want to run a specific test case you also need to define it in the cmd arguments, so you need the following arguments:

Code: Select all

MyTestSuite.exe /pa:globalParam=MyParam /tc:MyTestCaseThree  /tcdr:MyTestCaseThree=1-2
Regards,
Markus

Re: Command Line argument 'tcdr' not working

Posted: Thu Feb 12, 2015 10:05 pm
by lstauffer
Thank you, Markus! That worked beautifully!!

The documentation wasn't very clear, and the example that was given didn't include the /tc argument. You may want to pass that on to the documentation team. :)

Re: Command Line argument 'tcdr' not working

Posted: Fri Feb 13, 2015 4:14 pm
by Support Team
You're very welcome :)!

Regards,
Markus