Ask a Question

TestComplete -crossbrowserTesting - export MHT report through script

nisgupta
Valued Contributor

TestComplete -crossbrowserTesting - export MHT report through script

How we can export the result of crossbrowsertesting log to MHT format?  I have attached the code screenshot for exporting the MHT report by script when we run our local tests.

 

Now we want to export the  MHT report when we run cbt tests . This current script will not work for CBT tests.

 

Please update 

24 REPLIES 24
tristaanogre
Esteemed Contributor

The asterisk makes it incorrect.  The path name needs to be the fully qualified name for the file.  What does the call for exporting the log use to indicate the target path?  That's what you should use in Log.File....same pathing.  You should be using something like "Project.Path" or something like that to indicate the root.  It's not going to be able to log a file using the "asterisk" as the opening path.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available

Thanks for the Update 

@tristaanogre 

 

Here is another issue- Log.File create file1.mht as attached in the screenshot and it is located in the ....\Log\5_13_2019_2_53 PM_11_468\{ABA7496F-EFAF-4CEE-9732-23D562E3E296}\File1.mht

 

 

tristaanogre
Esteemed Contributor

From the help for Log.File

Remarks

  • The method renames the file when copying it to the test results folder. The new name has the format File<index>.originalExtension. This approach helps TestComplete avoid naming conflicts when posting files. Below is a typical example of the code that might cause conflicts:

    Log.File("C:\MyFile.txt");
    ChangeFileInSomeWay("C:\MyFile.txt");
    Log.File("C:\MyFile.txt");

    If TestComplete does not rename the file when posting it to the log, the second call to the Log.File method would cause a naming conflict.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available

@tristaanogre 

Thanks for the updates .

 

But here how it is working.

 For e.g. Script 1 and Script 2 need to run on Window 10 and on Firefox 66 then Log.File will generate individual MHT report for Script  1 and Script 2.

 

Goal is to generate MHT report after Script 1 and Script 2 finished running. We have almost 150 CBT tests as the script are running on different OS/browsers .

 

We want to have Single MHT report after 150 CBT tests finished running.

 

Thanks

Nishchal

tristaanogre
Esteemed Contributor

Unfortunately, that's not going to be possible due to how the test are run against the CBT environments.  Think of each CBT environment run as being another machine running another copy of your project.  So, you'll have 150 different MHT files that you will pull back and store.



Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: