Forum Discussion
Hi Seth,
Currently, TestComplete does not have a functionality to export results of an individual test item. We have a corresponding suggestion in our database, and your request has increased its rating. In the meantime, you can use the Log.SaveResultsAs method to save the entire test log. Please read the "Log.SaveResultsAs" article for more information.
- dhanapal1ContributorHi
If testitem ran successful means log result can export to specfied location. but in case any intrupts happens means how to export those error results. I tried to do create some event handlers GendralEvent_OnStopTest in this I call export testlogresult function. Is it corret or not? Hi Dhanapal,
According to the OnStopTest Event help topic, the OnStopTest event occurs when TestComplete is stopping a test. In the topic, you can find the list of actions and behavior due to which TestComplete stops running a test. So, you can use this event handler to export the test results in it.
- dhanapal1Contributor
Hi,
I am trying to get the below Information once the Test Suite Execution is completed.Is their any built in function available? I am exporting test log against each test case. one unit may contain 3 test case. such a way i scripted to export the test log in HTML format. Test Log result folder consist of test.xml and root.xml thru this i can get status of the test log result and test script name after XML parsing but I couldn't get error, pass and warning counts. How do i get those informations?
function AppExportResultsHTML(scriptName)
{
var FileName;
var FilePath;
var CompleteFileName;
FileName = scriptName + Utilities.FormatDateTime("mm_dd_yyyy_hh_mm_ss_zz_z_", Utilities.Now());
FilePath = "C:\\TestResults\\";
CompleteFileName = FilePath + FileName ;
if (!(Log["SaveResultsAs"](CompleteFileName, 1)))
{
Log["Message"]("CompleteFileName: " + CompleteFileName);
Log["Error"]("Could not generate unique log file.");
}}
Test logs are getting displayed in accumalated fasion.
Unit-name
Testcase-Name
no.of.steps
no.of.steps in Test-Log Results
Driver Script
login
3
3
Transaction
5
3+5
log-off
7
3+5+7
Once test logs are exported as HTML under Test result -> Testcase-Name+TimeStamp folder which contains Testlog.xml (having step wise execution information) and root.xml (having unit name and status of test log).
2. Lack of test summary information.
Hi Dhanapal,
You can use the Log.ErrCount method and the Log.WrnCount method to get the number of errors and warnings posted to the log.
Related Content
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago