steve_hall
12 years agoContributor
QTP "reporter.reportevent micpass / micfail" in TC?
Hi All,
I'm from a QTP background, and in a QTP script I could write something like:
if (a=b) then
reporter.reportevent micpass, "a equals b, yippee"
else
reporter.reportevent micfail, "a is different to b. this is not good"
endif
However, if I'm understanding correctly, in TC (jscript) this becomes:
if (a=b)
{
log.checkpoint ("a equals b, yippee");
}
else
{
log.error ("a is different to b. this is not good");
}
endif
I appreciate this isn't a HUGE difference, but I just want to check:
a) is there something "closer" to QTPs micpass/micfail (arguably more "readable")
b) is my understanding above correct?
Thanks
Steve
I'm from a QTP background, and in a QTP script I could write something like:
if (a=b) then
reporter.reportevent micpass, "a equals b, yippee"
else
reporter.reportevent micfail, "a is different to b. this is not good"
endif
However, if I'm understanding correctly, in TC (jscript) this becomes:
if (a=b)
{
log.checkpoint ("a equals b, yippee");
}
else
{
log.error ("a is different to b. this is not good");
}
endif
I appreciate this isn't a HUGE difference, but I just want to check:
a) is there something "closer" to QTPs micpass/micfail (arguably more "readable")
b) is my understanding above correct?
Thanks
Steve