Startup of application within a Docker Container
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Startup of application within a Docker Container
Hi,
Has anyone tried to start a desktop application within a Docker container? We do development on our local machines in a Docker environment.
Can I pass a powershell script name which starts my docker environment and starts my desktop app to TestComplete?
Thx
Ron
Solved! Go to Solution.
- Labels:
-
Desktop Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's how to run a Powershell script from TestComplete. It doesn't know what's in the script, so this should work for you.
Try it and let us know what happens!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm creating tests only by using the "Record" function. We're not writing any scripts (yet).
Do I have to convert the Test to a script first, then add the "getActiveXObject("WScript.Shell").Run("powershell -file C:\\MyScript.ps1");" command? Or is it something different?
Thanks,
Ron
The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities, other than the intended recipient, is prohibited. If you received this information in error, please contact the sender and the privacy officer, and properly dispose of this information.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use Run Code Snippet inside a keyword test in order to execute a script.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for all the suggestions so far. I'm not quite there, but getting close:
I created a script that runs my powershell script which starts my docker container and runs a command to start my app:
function StartNav()
{
WshShell.run("powershell -file C:\\users\rons\desktop\Start-NAV.ps1")
}
When I run the command directly in Windows
powershell -file C:\\users\rons\desktop\Start-NAV.ps1
My app starts correctly and the opening page in my app is displayed as I expect it.
When I run the above script inside TestComplete, the app does not start, but the Script Test Log is successful (but empty).
I see the Powershell window open briefly, but it disappears too quickly, so I can't see if there are any errors.
I searched the Community and saw a couple of references from several years ago to running TestComplete as Administrator, which I also tried with the same result.
Does anyone have any other suggestions?
