Thursday, 21 July 2011

How to Change the QTP result Report Color?

Reporter.ReportEvent 0, "&lt;<Font Color=Orange>object r Orange color.</Font> &gt;","&lt;<Font color=blue> Details r blue color.</Font>&gt;"

4 comments:

  1. How to set the QTP Report that should show only pass or fail when it launched from QTP or From QC test lab(Not like setting the filter by 'done' and 'warning' after launching report.i want before launching report any setting in QTP or QC such that the report should show ony P/F).
    Please Help me..

    ReplyDelete
    Replies
    1. QTP ReporterEvent Method:

      It may helpful to modify the reports whatever user expect.

      Its syntax:

      Reporter.ReportEvent EventStatus, ReportStepName, Details of the Event Status:

      0 or micPass: If this step runs test passes which is shown in test report.

      1 or micFail: If this step runs test fails which is shown in test report.

      2 or micDone: Used to send message to the test report and does not affect status of test.

      3 or micWarning: Again, used to send warning message to the test report and does not affect status of test.
      and
      ReportStepName is name of step
      and
      Details are the user defined details for the given step.
      For Example:

      For Pass:-
      Reporter.ReportEvent micPass, "Login Gmail", "The login step passed."

      For Fail:-
      Reporter.ReportEvent micFail, "Login Gmail", "The login step Failed."

      Instead of giving micPass or micFail we can give 0 or 1.

      Hi Uma, Thanks for your comments. if above reply surly will help you if you need more info kindly post your comments . Thanks, Vel

      Delete
    2. Dear Krishna,
      Thanks for your reply.i am also automation tester with 5 years of exp.the above comments are the basic qtp concepts that a beginer also known.I think u didn't get what i posted here.let me explain more elaborately.
      A test consist of Reports(micPass,micfails,micdones and also mic warnings) and other actions we did in the scripts(like objects,and many things) will come to test report.If we expand all we will see many things along with these micpass,micfail,micdone and micwarning.But i want to see only Micpass,micfail and micwarnings only.By manually we can do by selecting the filter(Ctrl+T).But i want it to be automated from the script ifself.If u know how to do it please help me.

      Delete
  2. hi krishna and uma mahesh,

    how to get test reports through QTP Script.

    please help to me
    my mail: sandeep.g6u@gmail.com

    ReplyDelete