Running Text File Containing Plink Command To Reset Server From TestComplete Script
Hello,
I am currently pursuing an effort to have TestComplete run a script on our machine that calls a Plink command that communicates with our database which is on a remote Linux server and can automatically reset it. This is being pursued to see if the reset process which is necessary for testing, can be done automatically at the start of a test run from in the OnStartTest event control.
I have found the WshShell.Run("echo -e | plink -load QA4DB -l instdlsb -pw ******* -m C:\Works\reset_qa4_commands.txt") Where the file path leads to a txt file that contains commands that refreshes our testing database.
However, when I try to run the tests, Test Complete throws and error like this:
I was wondering if anyone could help point me in the right direction for the solution to this issue because I am not sure if I'm looking in the right place to begin with.
Thanks,
Jackson
So I believe I have found a solution to the issue. in my code I have "/k" in the string before the command is listed, this is what was listed in the first link I posted there, turns out if you replace that with "/c" it should close the command console window after the process executes to completion.
So it would look like this:
"WshShell.Run("%comspec% /c anycommandhere", 1, True)"
TestComplete can now call the command console, run the given command to reset the database, wait for completion, close console window and resume with the given tests successfully.