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.
There is no attachment.
CBT tests run on a cloud machine that is basically spun up and discarded after execution. This means that any exports that are done are done ON that machine... and therefore not available for download.
I believe the CBT feature of TestComplete has it's own logs associated with it. See https://support.smartbear.com/testcomplete/docs/working-with/integration/cbt/viewing-results.html
Thanks for the updates .
I followed this link. We can export the MHT report manually. IS there a way we can make this process automatic ?
As far as I know, not directly via the CBT integration.
I contacted the support team few days and here is the replay we get.
There is another way you can bring the mht file path. you can include a Log.File command to which will save an instance of the file you want to keep in the local test directory. Link on how to use the method is below:
I am not sure how Log.File will work in this case.
Hrm.... OK, I THINK I know what they are saying...
so, in your code, you call the Log.ExportToFile method to export the MHT. They are suggesting adding the Log.File method after that to pull that MHT file into the log. That log is then copied back to your local machine as part of the CBT log. Your MHT file is then there and present, just need to save the attachment.
I would add to the end of exportMHTReport a call to Log.File to attached the indicated file. It really is that simple. Just a call to make sure that the MHT file is included in the log so that, when the CBT execution is complete, it's returned back in the generated log.
Again, what you need to remember is that MHT export that you're doing is exporting the MHT to a local hard drive on the virtual machine that CBT spins up. And when the execution is done, that file is gone. To persist that file back to your main machine, you need to do something to bring it back. Log.File does that.