Forum Discussion
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
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.
- Marsha_R3 years agoModerator
See if this helps
https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/index.html
- dave_user3 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_R3 years agoModerator
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_user3 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_R3 years agoModerator
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_user3 years agoContributor
Thank you Marsha,
Appreciate your help. I am trying different ways to accomplish this.
Thank you again
- dave_user3 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_R3 years agoModerator
I would check and see if the .xml actually ends up where you think it is. Also check permissions on that folder.
- dave_user3 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_R3 years agoModerator
I would check the local user account privileges and make sure that it is allowed to do everything you need.
Related Content
- 4 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 12 hours ago
- 21 hours ago
- 2 days ago