cancel
Showing results for 
Search instead for 
Did you mean: 

SessionCreator (TestExecute) - PrjVar is not an option

Occasional Contributor

SessionCreator (TestExecute) - PrjVar is not an option

**EDIT** turns out i read the VERY latest information on the below, and infact PrjVar is a new functionality, as such an upgrade should solve this issue!

 

 

According to this page: https://support.smartbear.com/testexecute/docs/running/automating/sessioncreator/index.html i should be able to input a value for a variable using /PrjVar: in a command line entry (session creator).

 

I have tried this and it informs me that "Flag could not be matched: PrjVar:String"

 

The list of options also returned when running the session creator does not include the PrjVar option.

10 REPLIES 10
Staff

Re: SessionCreator (TestExecute) - PrjVar is not an option

just to make @courtenayp 's point clearer: with the release of TestComplete 14.71 we can now define project level variables through the command line for any of the runtime executables that we use (incl. TC, TE, SC).

Please upgrade to the latest version of TestComplete to use this functionality.

See release notes here 

hkim5_0-1606833204430.png

 

Best,
Justin Kim
Occasional Contributor

Re: SessionCreator (TestExecute) - PrjVar is not an option

Hi @hkim5 ,

 

I have upgraded my test complete and test execute instances to the latest 14.71, however this function doesnt seem to work still and i have the same issue as outlined above...

 

Thanks,

Courtenay

Staff

Re: SessionCreator (TestExecute) - PrjVar is not an option

can you share the syntax of the cmd line args you used?

have you created the same pv and psv w/in the projects you want to run?

Best,
Justin Kim
Occasional Contributor

Re: SessionCreator (TestExecute) - PrjVar is not an option

Hi,

 

The pv is in the project i am running and the latest copy of the project files are on the machine i am running the test on. I have also then tried it with a network suite variable (having that in both the "slave" project im running and also the "master"). I dont think the issue is to do with if  the variable exists, the response i get seems to suggest the flag is just not a valid flag at all - i have attached a screen shot of the response when running the command (note how the list of options returned also does not include these new variable flags).

 

Thanks,

Courtenay

Community Hero

Re: SessionCreator (TestExecute) - PrjVar is not an option

Hi,

 

Have you tried to execute TestComplete command from the command line but not from the PowerShell?

Does it work for command line?

Also, can you provide the command line that is used for TestComplete? (Not a screenshot, but just command line)

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Occasional Contributor

Re: SessionCreator (TestExecute) - PrjVar is not an option

Hi,

The result is the same running from cmd on the machine as it is when running via powershell, and PrjVar is not listed in the options returned.

 

Command run directly from command prompt:

 

"C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\SessionCreator.exe" RunTest /Username:"blabla" /password:"blabla" /ProjectPath:"C:\testcompleteprojects\AirlockDigitalMaster\AirlockDigitalMasterProject\AirlockDigitalMasterProject.mds" /project:"AirlockDigitalMasterProject" /test:"Airlock - Rapid - UI Quick Run" /PrjVar:TestRun_URL=123

 

Response:

 

Flag could not be matched: PrjVar
C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\SessionCreator.exe RunTest {OPTIONS}

Run the specified TestComplete test.

OPTIONS:

/UserName:[username]
The user profile that will be used to run
TestComplete/TestExecute.
Password
/Password:[password]
The password used to log in to the user account.
/PasswordFile:[password file name]
The name of the file that contains the password used to
log in to the user account.
/UseActiveSession, /UA
Specifies whether to run TestComplete/TestExecute in an
existing user session.
/ScreenResolution:[resolution]
The desired screen resolution for the created user session.
The default value is '1280x1024'.
/ProjectPath:[file_name]
The name of the TestComplete project file (.mds) or project
suite file (.pjs) to open in TestComplete/TestExecute.
/ExportLog:[file_name...], /el:[file_name...]
Export the test results to the file specified by the
file_name parameter after the test run is over.
/ExportSummary:[file_name], /es:[file_name]
Generate a JUnit report for the current test run and save it
to the specified XML file.
/Timeout:[time_in_seconds]
A timeout for the TestComplete/TestExecute session, in
seconds.
/SelfHealing:[self_healing], /SH:[self_healing]
Enables (On) or disables (Off) the self-healing mode for the
test run.
/project:[project_name], /p:[project_name]
The name of the project as it is shown in the Project
Explorer panel.
Run the tests provided by the specified project item:
/projectitem:[item_name], /pi:[item_name]
The name of a project item. Using this argument, you can
run only those project items that have the Run item in
their context menu.
Run the specified test:
/test:[test_name], /t:[test_name]
The full name of the needed test or the tag that marks
the needed test.
Run the specified script routine:
/unit:[unit_name], /u:[unit_name]
Specifies the name of the unit containing the desired
routine.
/rt:[routine_name], /routine:[routine_name]
The name of the script routine to be called. The routine
must not use parameters or return any values.
Run the tests specified by the tag expression:
/tags:[tag_expression]
The tag expression to be used to run the corresponding
tests.

Occasional Contributor

Re: SessionCreator (TestExecute) - PrjVar is not an option

Any updates able to be provided further on this issue?

@AlexKaras @hkim5 

Staff

Re: SessionCreator (TestExecute) - PrjVar is not an option

as referenced in this doc:

hkim5_0-1607711211073.png

your commandline flag for the proj variable should be either /psv or /pv NOT /pjVar or /psjVar.

 

So a sample of what I tested out worked using those flags :

TestComplete.exe "C:\Users\justin.kim\Desktop\TELITE\TEST1\parallelExecution2.pjs" /r /project:PythonDC /t:"KeywordTests|Test3" /pv:URL=https://services.smartbear.com/samples/TestComplete12/smartstore
Best,
Justin Kim
Occasional Contributor

Re: SessionCreator (TestExecute) - PrjVar is not an option

Hi,

 

I have done my own investigation and it seems that the issue is with SessionCreator not the straight commandline method. 

 

So as previously mentioned i am referring to this page https://support.smartbear.com/testexecute/docs/running/automating/sessioncreator/index.html#_ga=2.25... , and my cmd is as stated before (yes i have tried both PrjVar and pv , i get the same non valid flag message running via powershell or via command line directly).

 

Are you able to test the /pv using SessionCreator specifically?

 

Thanks,

Courtenay

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors