Programatically export test run results to HTML using COM
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Programatically export test run results to HTML using COM
I am able to run a Project Test Item from a COM (C#) application. The challenge I have is getting the results from the Project Test Item. I am able to receive the status of the run(OK, Warning, Error), but I would like to get access to the logs from the run. I would like to display these results in HTML format.
I would like to programmatically export the latest test results to HTML. I know how to do it via TestComplete UI, but I would like to do this via COM interface.
- Labels:
-
Integrations
-
Test Results
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this relating to TestComplete MSTest or TCUnitTest unit tests?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is related to TestComplete
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This relates to running TestComplete Script Unit tests and Test Project Items.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get the name of the log by calling
IntegrationObject.GetLastResultDescription().LogFileName
It will always point to a xml file called RootLogData.dat
Parse this xml and look for the Prp tag with the attribute name="filename". In the attribute value you will find the name of the log file. Something like this: ="{D7603EDA-C8B8-4006-9D57-F034297D444A}"
This log file is a xml file as well. Now parse this xml and write your desired html code. Every Node tag represents a message line.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using MSTest or TCUnitTest to interact with your application?
If you see TestComplete Command Line, the parameter /ExportLog has option to export to HTML
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't believe what command line is relevant for calling TestComplete via COM from C#
https://support.smartbear.com/testcomplete/docs/working-with/automating/via-com/index.html
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If we were using the command line, the parameter /ExportLog would work perfectly. Unfortunately we are not using the command line. The command line does not give us enough control over the execution of the tests.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are running tests in the Execution Plan section , and the Script section.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How are you connecting to your COM application?
