Error in counting total failed count

Ask general questions here.
kumprave5
Posts: 33
Joined: Wed Jul 18, 2018 9:55 pm

Error in counting total failed count

Post by kumprave5 » Fri Aug 10, 2018 3:43 pm

Hi,

I am getting failed count zero.
void ITestModule.Run()
{

Script sc = new Script();
try
{
Report.CurrentReportLevel = ReportLevel.Info;
TestReport.EnableTracingScreenshots =false;
sc._startBrowser("chrome.exe", "https://www.google.com/");

WebDocument wd ="/dom[3]...forcefully failing this";
LogUtility._info("dom found successfully");

}
catch(Exception e)
{
LogUtility._failure("Failed", "Test", e, "Unable to find dom");

var tm = TestReport.CurrentTestModuleActivity;

when I use CurrentTestModuleActivity;, it shows status Failed and failed count 0 but everything is failing then why it shows
failed count 0


LogUtility._info("Total Duration : " + tm.TotalDuration.ToString());
LogUtility._info("Total Failed : " +tm.TotalFailedCount.ToString()); //please see this line
LogUtility._info("Final status : "+ tm.Status.ToString()); //please see this line

var tc = TestReport.CurrentTestContainerActivity;

when I use CurrentTestContainerActivity, it shows status Success and failed count 0 but everything is failing then why it shows
Success and failed count 0


LogUtility._info("Total Duration : " + tc.TotalDuration.ToString());
LogUtility._info("Total Failed : " +tc.TotalFailedCount.ToString());
LogUtility._info("Final status : "+ tc.Status.ToString());

}
}
Please see the attached report screenshot.
Attachments
Report.PNG
Report.PNG (61.89 KiB) Viewed 139 times

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Error in counting total failed count

Post by RobinHood42 » Tue Aug 14, 2018 10:44 am

Hi,

Seems like a bug to me. Please report to the Ranorex support folks here : https://www.ranorex.com/support-query/

Cheers,
Robin