cancel
Showing results for 
Search instead for 
Did you mean: 

RunRoutine multiple scripts with one log

SOLVED
Highlighted
Occasional Contributor

RunRoutine multiple scripts with one log

Hello, 

 

I am trying to execute multiple scripts via COM ( javascript ). My problem is: for each RunRoutine that i execute, i got 1 log for testComplete.

 

 

Javascript Code:

 

var projectSuite = "C:\\Testes\\Controle de Transportadoras\\ControleTransportadora.pjs";

var project = "ControleTransportadora";
var unitName = "Multas";
var progID = "TestComplete.TestCompleteX64Application";

try {
  var te = GetObject("", progID);
}
catch(e) {
  te = new ActiveXObject(progID);
}

var integration = te.Integration;

integration.RunRoutine(project,unitName, "clickButton9");
while (integration.IsRunning())
    WScript.sleep(100);

integration.RunRoutine(project, unitName, "clickButton5");  
while (integration.IsRunning())
    WScript.sleep(100);

TestComplete Code:

function clickButton9(){
    Sys.Process("calc").Window("CalcFrame", "Calculadora", 1).Window("CalcFrame", "", 1).Window("#32770", "", 2).Window("Button", "9", 14).Click();
}


function clickButton5(){
    Sys.Process("calc").Window("CalcFrame", "Calculadora", 1).Window("CalcFrame", "", 1).Window("#32770", "", 2).Window("Button", "5", 10).Click(); 
}

Is there a way to get ONE log for all Routines?

Running all routines together the execution time will be more faster.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: RunRoutine multiple scripts with one log

Hi @Valença,

 

If you use a custom script to run your test, perhaps, it's worth creating a custom test log. You can export the current log to the XML format and parse it to create the report in the format you need. The following article describes the exported structure:

https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/structure.ht...

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
4 REPLIES 4
Community Hero

Re: RunRoutine multiple scripts with one log

rather than running one routine at a time, you can link each routine into a test item in TestComplete and then run the whole project.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Occasional Contributor

Re: RunRoutine multiple scripts with one log

I dont wanna group the routines in TestComplete, its dont resolve my problem.

I need to run multiple routines by javascript via COM, all in sequence and get ONE log for all this sequence.

Community Hero

Re: RunRoutine multiple scripts with one log

Unfortunately, that's not how test complete works.  In order for a single log to be generated, you need to run multiple routines connected in some way in the TestComplete tool.  The easiest way to do this is by creating a Test Item for each routine on the project level and executing the project as a whole.

 

see https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/test-items.html


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Manager

Re: RunRoutine multiple scripts with one log

Hi @Valença,

 

If you use a custom script to run your test, perhaps, it's worth creating a custom test log. You can export the current log to the XML format and parse it to create the report in the format you need. The following article describes the exported structure:

https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/structure.ht...

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
New Here?
Join us and watch the welcome video:
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win