Forum Discussion
I see a Run argument in your script but not in the command line attempt. Can you try that please?
https://support.smartbear.com/testexecute/docs/running/automating/command-line/command-line.html
Do you mean this way?
TestExecute.exe "C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR-IestAutomation\INR_AutomationProjectSuite.pjs",'/run'
When i run this it gives me an error saying -:
Invalid command line. The Project Suite
"C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR-IestAutomation\INR_AutomationProjectSuite.pjs",'/run'" was not found
- Marsha_R4 years ago
Champion Level 3
See if this helps
https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/index.html
- Marsha_R4 years ago
Champion Level 3
try this
TestExecute.exe "C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR-IestAutomation\INR_AutomationProjectSuite.pjs" /r
- dave_user4 years agoContributor
Hi Marsha,
So, it does work and invokes TestExecute and also it shows that scenarios are running. However, it still does not invoke our application
- Marsha_R4 years ago
Champion Level 3
Okay, do you invoke the application inside the TC project? Let's see the code for that please.
- dave_user4 years agoContributor
Hi Marsha,
Sorry for the delay in my reply.
Below is the code that invokes the application -:
$testexecute= "C:\Program Files (x86)\SmartBear\TestExecute 15\Bin\TestExecute.exe"
$project = "C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR-TestAutomation\INR_AutomationProjectSuite.pjs"
$arguments=$project, '/run', '/PrjVar:InrExeLocation="C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR\INR Binaries\tnr.exe"', '/exit', '/DoNotShowLog', '/ns', '/ErrorLog: .\TCErrors.txt /ExportSummary:C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\results.xml'
Start-Process -FilePath $testexecute -ArgumentList $argumentsHowever, when i use SessionCreator, the code does invoke the application. Below is the code that does NOT invoke the application -:
SessionCreator.exe RunTest /UserName:TC_User /password:********* /ProjectPath:"C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR-TestAutomation\INR_AutomationProjectSuite.pjs" /arg:InrExeLocation="C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR\INR Binaries\Inr.exe" /es:C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\results.xml /el:C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\logs.txt
Thank you
- Marsha_R4 years ago
Champion Level 3
in the top code, you are calling tnr.exe and in the bottom code you are calling Inr.exe - could that be the difference?
- dave_user4 years agoContributor
Sorry that was my mistake. its inr.exe in both the places.
- dave_user4 years agoContributor
Hi Marsha,
Not sure if I was clear. I meant its inr.exe in both the places so that's not an issue, its something else going on.
- Marsha_R4 years ago
Champion Level 3
Where in your INR_AutomationProjectSuite.pjs does the application get started? Screenshots would be helpful.
- dave_user4 years agoContributor
I think I figured something out Marsha.
SessionCreator.exe RunTest /UserName:******\***** /password:********* /UA /ProjectPath:"C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_INR-TestAutomation\inr_AutomationProjectSuite.pjs" /arg:inrExeLocation="C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_inr\inr Binaries\inr.exe" /es:C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\results.xml /el:C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\logs.txt
When i run this command, it starts the TestExecute and starts running the test but it does not invoke my applcation inr.exe which is in C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_inr\inr Binaries\inr.exe location.
I believe it has something to do with the /arg command it is not able to find my Test Complete project. this is what i read in the below link -:
What do you think?
Also, I am unsure of how can i work with the /arg
Thank you
- Marsha_R4 years ago
Champion Level 3
The /arg syntax looks okay as far as I can tell.
What the arg is meant to do is pass in that value (your .exe location) to a TestComplete argument (your inrExeLocation). The arg itself is not going to invoke anything. You have to use the InrExeLocation somehow inside your test to do the invoking.
- dave_user4 years agoContributor
Thanks Marsha,
Sorry, I am still little confused.
I am trying to dissect what you wrote -:
What the arg is meant to do is pass in that value (your .exe location) - C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r1\a\_inr\inr Binaries\inr.exe
to a TestComplete argument (your inrExeLocation). - inrExeLocation
The arg itself is not going to invoke anything. You have to use the InrExeLocation somehow inside your test to do the invoking.
by "test" do you mean inside the TestComplete project?
- Marsha_R4 years ago
Champion Level 3
Yes, inside your TestComplete project.
Note that this says "test parameters". The /arg in the Session Creator call is not an argument for Session Creator to use. It is an argument that you are passing into your TestComplete project (which is your actual test code) for TestComplete to use.
You need something inside the TestComplete project that invokes your application. The Run method is one way to do that. https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/tested-apps/testedapp/run.html
- dave_user4 years agoContributor
Thanks Marsha,
I am just confused how will i use BuiltIn.ParamCount and BuiltIn.ParamsStr methods in TestComplete because when i specifiy inrexelocation in the script.
Currently i have a variable in testcomplete which is called "inrexelocation" and it points to the path i have specified in the script but it does not invoke the applications...so somehow i have to use Buildin.Paramcount and bBuiltin.Paramstr to invoke it. Not sure how i will handle that 😞
Please let me know if you can help in that.
Thank you
- Marsha_R4 years ago
Champion Level 3
If I was doing it, I would pass that URL as a variable instead of an argument
Then you can use the variable in code to start your app. Look at the script examples on this page:
https://support.smartbear.com/testcomplete/docs/testing-with/tested-apps/adding.html#from-tests
- dave_user4 years agoContributor
Thank you Marsha,
Appreciate your help. I am trying different ways to accomplish this.
Thank you again
- dave_user4 years agoContributor
Hi Marsha,
Hope you are doing good.
I was able to get the SessionCreator working but there seems to be another issue which cropped up.
I am using SessionCreator with Azure DevOps pipeline using Powershell task and to publish the results in the "Test" tab i am using another task called "Publish Test Results" which should publish the .XML file but it does not seem to publish the results in the "Test" Tab. It gives me a message saying
"No Result Found to Publish 'C:\ADOAgent\vsts-agent-win-x64-2.181.2_1\_work\r5\a\_INR-TestAutomation\Test-logs.xml"
do you know what could be causing this issue?
Thank you
- Marsha_R4 years ago
Champion Level 3
I would check and see if the .xml actually ends up where you think it is. Also check permissions on that folder.
- dave_user4 years agoContributor
Hi Marsha,
Seems like I have fixed the issue with Test Results not being published. Now it shows the results in the "Test" tab.
However, now I want to run SessionCreator.exe using local user account and not the domain account.
so, when I try to run using the local user account from the pipeline, I am getting the below error -:
SessionCreator.exe : The term 'SessionCreator.exe' is not recognized as the name of a cmdlet
do you know how can I get around this problem?
I am also getting the same error when I login to the VM using local user account and run it directly through PowerShell as administrator. However, when I run the TestExecute first and then run SessionCreator.exe it runs fine which is wierd.
Not sure how can i make it run through the Azure DevOps Pipeline.
Thank you
- Marsha_R4 years ago
Champion Level 3
I would check the local user account privileges and make sure that it is allowed to do everything you need.
- dave_user4 years agoContributor
local user account is already an administrator.
I dont understand why it would show "SessionCreator.exe is not recognized as the cmdlet"
Can you think of any other way to troubleshoot this issue?
Thank you
- Marsha_R4 years ago
Champion Level 3
I would ask Support that question directly. Here's the link:
- dave_user4 years agoContributor
Thanks.
I have been trying to get in touch with the Tech support team since quite a few days but their support is extremely slow which is very frustrating.
have you encountered the same issue?
- Marsha_R4 years ago
Champion Level 3
I usually hear back within 24 hours unless they are working on a solution for me. Do you have an open ticket?
- dave_user4 years agoContributor
Yes, i have the ticket open since Jan 18th