Ask a Question

Command line can't find test

SOLVED
StevenJ61
Occasional Contributor

Command line can't find test

Can someone help me interpret the TestComplete command line?

 

I'm running this:

C:\Users\Steven>testcomplete.exe "C:\Users\Steven\Documents\TestComplete 14 Projects\Demo\Demo.pjs" /run /project:Demo /test:"Script\NextTry" /ExportLog:C:\Users\Steven\TestComplete\Logs\LogDemo0001.html /exit

 

I've attached a screenshot of my project and the error the command line is giving me.

 

Why doesn't testcomplete find the test script when I've go the project suite, project, folder and test named?

 

Thanks in advance,

 

Steven.

 

1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: Command line can't find test

If you DO want to use the "/test" switch, it needs to be in the form of

 

/test: "Script|<unit name>|<routine name>"

 

Notice the use of vertical pipes and not slashes.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

5 REPLIES 5
StevenJ61
Occasional Contributor

Re: Command line can't find test

Sorry, not sure what happened in the post:

 

Display seems to be interpreting colon D as a smiley.

tristaanogre
Community Hero

Re: Command line can't find test

The "/test" switch is for executing a specific Test Item in the project 

 

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/project-editor/test-i...

 

If you want to execute a piece of code from a script code unit, you need to use the "/unit" switch to specific the unit and the "/routine" switch to specify the specific function within that unit you want to execute.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
tristaanogre
Community Hero

Re: Command line can't find test

If you DO want to use the "/test" switch, it needs to be in the form of

 

/test: "Script|<unit name>|<routine name>"

 

Notice the use of vertical pipes and not slashes.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

StevenJ61
Occasional Contributor

Re: Command line can't find test

Hi Robert,

                 Apologies, looks like I didn't read the help examples correctly.

 

I saw it mentioned pipes | and tried that but got the error. Examples looked like backslashes so I thought I'd try that too.

 

My project has a Script folder and test scripts so how does that correlate to units and routines?

 

Can I assume the unit is the test script and the routine in the function within it?

 

Thanks,

 

Steven.

 

StevenJ61
Occasional Contributor

Re: Command line can't find test

I hadn't added the test unit to the View -> Organize Tests list.

 

Running quite nicely now with test:"Script|NextTry|NextR" where NextTry is the script and NextR is the function in the script.

 

cancel
Showing results for 
Search instead for 
Did you mean: