Forum Discussion
At present, the Test Complete automation sripts are visible for any user that logs onto that machine and can access the scripts and manipulate them. I want to restrict this action.
I agree with the Test Execute approach but that would require additional licensing. If you have IIS on your Test Complete box, why not create a web page that presents the automation selections to kick of Test Complete thus your users no longer need to logon to the Test Complete environment?
- Nimith11 years agoContributor
Thank you! This looks good. However I have few doubts:
1. Is there a way we can use Test Execute without creating the Project Test Items list in Test Complete? In Test Execute Help file, it says that we need to have the Test Items list created and then execute the project from Test Execute,
2. We wont be able to create a Test Item list as the Test can be run in any random order as selected by a user from a UI we developed.
3. Is there a way where in we can have Test Execute read the tests selected in our UI grid instead of Test Items listed in Test Complete? Below is a screen shot of our UI Grid, where the tests which are needed to be run, are selected.
- jmcpeek11 years agoContributor
Let me make sure I understand your set-up...
Right now, your users open a UI Grid where they select N scripts to run from a TC project. Your code then launches TC to run the selected scripts. Is that correct?
If so, it sounds like you're already almost there. You're already calling your TC scripts via command line calls, which is the key. TE and TC use the same command line functionality, so you only need to change your program from testcomplete.exe to testexecute.exe. You don't have to change anything with your project setup to run it through TE instead of TC. Think about it like this: TestComplete is the whole she-bang - create/modify/execute. TestExecute is just the "execute" piece of TC that's been pulled out by itself for portability, scalibility and situations like yours where someone doesn't want end users to have access to manipulate the tests, or don't want to pay the higher price for TC licenses when users only need to run them.
If you're not already launching TC from the command line, let me know and I can provide more detail.
- mes607311 years agoContributor
Nimith wrote:2. We wont be able to create a Test Item list as the Test can be run in any random order as selected by a user from a UI we developed.
3. Is there a way where in we can have Test Execute read the tests selected in our UI grid instead of Test Items listed in Test Complete? Below is a screen shot of our UI Grid, where the tests which are needed to be run, are selected.
Assuming all your tests are contained in script units in one project, then one approach would be for the UI Grid to pass the selected tests to TestExecute as a series of command line parameters then create a new script unit where you could use the Runner object to iterate the script list passed in as command line parameters:
/USEUNIT Script_1 //USEUNIT Script_2 //USEUNIT Script_3 function Main() { var lResult = 1; try { var asScripts = ["Script_1.Main()","Script_2.Main()","Script_3.Main()"] for (var i = 0; i < asScripts.length; i++) { eval(asScripts[i]); // alternately use switch statements for more granularity } } catch (ex) { lResult = 0; } return lResult;