Command Line argument 'tcdr' not working

Ask general questions here.
lstauffer
Posts: 9
Joined: Fri Jan 23, 2015 2:31 pm

Command Line argument 'tcdr' not working

Post by lstauffer » Thu Feb 12, 2015 5:41 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Command Line argument 'tcdr' not working

Post by krstcs » Thu Feb 12, 2015 5:49 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Command Line argument 'tcdr' not working

Post by Support Team » Thu Feb 12, 2015 6:06 pm

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
.
Image

lstauffer
Posts: 9
Joined: Fri Jan 23, 2015 2:31 pm

Re: Command Line argument 'tcdr' not working

Post by lstauffer » Thu Feb 12, 2015 10:05 pm

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. :)

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Command Line argument 'tcdr' not working

Post by Support Team » Fri Feb 13, 2015 4:14 pm

You're very welcome :)!

Regards,
Markus
.
Image