Command line arguments from Visual Studio to TestComplete
Hello everyone,
I used to run my TC tests from command line/batch skripts, passing command line parameters and accessing them with "BuiltIn.ParamStr(X)", which worked just fine.
Now I want to change my approach and run them from Visual Studio 2013. I've found a way to pass command line arguments using "Debug|[project] properties", using the field "command line arguments". Unfortunately, I can't find out how to access them now - the above doesn't seem to work any more.
Most of my tests where VBScript scripts, so I thought "Wscript.Arguments" might achieve about the same, but it also doesn't.
Where did I go wrong? Did I miss something in my approach? Or is it bad practice in the first place, and I should find a better way of passing arguments?
Thanks in advance,
Florian
Rather than running via command-line, since you're using Visual Studio anyways, have you considered using the TestComplete objects directly in visual studio, what's called a "Connected" application? You build your tests and such directly in visual studio, calling TestComplete objects internally.
I think the problem you're running into, though, has to do with that, previously, you were running TestComplete.exe from a command prompt and then passing parameters. Now, TestComplete.exe is not being run the same way and so, perhaps, may even have security blocks, etc. Something you can try is to create a WScript.Shell object in your visual studio project and then call the "Run" method from there. That should do, basically, what you had been doing before.