TestComplete 14: Execution by command line: Passing in /PrjVar:NwkENV=QA01 stopped working
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TestComplete 14: Execution by command line: Passing in /PrjVar:NwkENV=QA01 stopped working
TestComplete 14: Execution by command line: Passing in /PrjVar:NwkENV=QA01 stopped working
and is not being recognized as it should be.
I have an ADO pipeline setup to pass in a command line to kick off TestComplete or TestExecute
on a HyperV session.
"C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\TestComplete.exe" "C:\Git.ClaimsManagement\ClaimsManagement\TestComplete\TC14_Version\XClaimProjSuite\XClaimProjSuite.pjs" /r /e /SilentMode /DoNotShowLog /p:XClaim /test:"Script|Group_QA01_Reg1|GroupQA01Reg1" /PrjVar:NwkENV=QA01
This has been working fine for the past many months until lately.
This is used by a config script to know what env I am running against to change
up and use the respective and correct variables/values.
Actions performed to see if I could get the things working again:
I have restarted the HyperV.
I have copied\pasted the command line to a cmd window on the HyperV to run
I upgraded TC 14.81 to 14.93 (not using TC15 yet)
I added a log statement within my script to show me the value of NwkENV
but from all the above tries and debugging from executing, /PrjVar:NwkENV=QA01
seems to be ignored ?
Posting for help.
Any suggestions ?
Thanks
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since this happened right after an upgrade, I suggest contacting Support directly. Here's the link:
https://support.smartbear.com/testcomplete/message
Marsha_R
[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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This did not happen after an upgrade.
I updated original post to reflect that.
I did the upgrade just to see if this would fix it.
I could have re-installed TC14.81 but just decided to go to 14.93
14.81 / 14.93 - same behavior
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the test still run if you do it directly inside TestComplete?
Marsha_R
[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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My automation relies on the ability to pass in a value to set the Project Variable NwkENV so the test script
runs on the correct environment - how script code is designed.
Below, this script is specifically for the QA01 env.
Project.Variables.NwkENV = 'QA01';
(If manually added in the script, this would allow the script to run - mimicking if the command line had worked and set the Project Variable NwkENV=QA01)
I have even modified the command line to use NwkENV2 (which does not exists) to see how TestComplete would respond when parsing the command line. (it was ignored)
Because the command line is not being recognized completely, my script execution is hitting the below blue lines
Project Variable 'NwkENV' saved in project code is set 'PROD'
======= code sample below ======
Project.Variables.NwkENV = 'QA01';
function GroupQA01Reg1()
{
Log.Message(Project.Variables.NwkENV);
if(Project.Variables.NwkENV == 'QA01')
{
Project.Variables.ADOJobRun = true;
ConfigEnvironVarsQA01();
Delay(4000);
Project.Variables.nThriveLogin = false;
Project.Variables.supportLogin = true;
Delay(4000);
SetTestedAppsPaths();
Delay(8000);
// Start up QA01 Reg. Dr. Seuss
QA01RegDrSeussStartUp();
Delay(8000);
// Login
XClaimQA01400Login();
SetXAppsWrapperFunction();
SetClaimsWrapperFunction();
}
else
{
throw new Error(999, "Network Environment NOT handled. Please investigate.");
}
Delay(8000);
=============
Running script currently produces the following:
==> Obtaining and Setting Network Env value
PROD (should show QA01 is command line recognized correctly)
Network Environment NOT handled. Please investigate.
The script execution was interrupted.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any way to capture or know what is sent into TestComplete from command line
and what TestComplete actually received to process.
Any logs created somewhere or something to turn on to capture this information to debug from ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My automation relies on the ability to pass in a value to set the Project Variable NwkENV so the test script
runs on the correct environment - how script code is designed.
Yes, I understand that, but in troubleshooting a problem, one wants to go to the basics first. If the test doesn't run inside TestComplete, then troubleshooting at the higher level does no good.
Project.Variables.NwkENV = 'QA01';
(If manually added in the script, this would allow the script to run - mimicking if the command line had worked and set the Project Variable NwkENV=QA01)
Thank you for checking that the test does still run inside TestComplete.
Since nothing changed in your system, I think you'll still need to contact Support directly at the link I posted. They may have already encountered this issue with someone else and have a ready answer.
Marsha_R
[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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Marsha
