Forum Discussion

XBug's avatar
XBug
Contributor
7 years ago

How to better present the Test Results to a Non-User of Test Complete?

Hi All,

 

I was presented the question above and is currently burning all my brain cells without making any progress.

 

The objectives were as follows:

  • Present the test results to a client who has zero-idea on Test Complete other than it will run application for testing automatedly.
  • Make sure that the recipient will understand or will have an idea that the test was successful and if there are errors, the reader should be able to determine if the error was either expected/setup error or a bug that needs to be addressed.

 

Note: The reader/recipient/client has no access to the tests.

 

Any inputs will be very much appreciated.

19 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    We have been using HTML reports in our automation. I have shared the same here.

     

    You take look at below topics.

     

    https://community.smartbear.com/t5/TestComplete-General-Discussions/Automation-Execution-Report/m-p/134112#M25013

    https://community.smartbear.com/t5/TestComplete-General-Discussions/Automation-Execution-Report-Ready-to-Go/m-p/137035#M25544

     

    Our Client very much relaxed with understanding of Automation report with the above HTML report.

    • XBug's avatar
      XBug
      Contributor

      shankar_r, should I just be placing the codes/script on Automation Execution Report - Ready to Go on top of my tests? Let's say I have an existing test, I can just create a new test call the script containing the ones you coded, then run my existing ones. Is that how I am to use it? (pardon my noob questions, I don't have any coding background and is not using any codes on my tests)

      • shankar_r's avatar
        shankar_r
        Community Hero

         

        This needs some re-visit on your code. But below item will give you the some idea how to configure

         

        1) You add the ReportingFunctions.js[available in the thread] into your existing project as a script unit.

        2) You insert the below lines of code in corresponding event [more about events handlers refer here]

        In OnStartTest event
        
        ReportingFunctions.setLogsPath("C:\\AutomationLogs\\")
        ReportingFunctions.setExecutionStartTime(aqDateTime.Time())
        
        ReportingFunctions.setTestCaseExeStartTime(aqDateTime.Time())
        ReportingFunctions.fn_createtestcasedescription("Module1","YourTestCaseID","YourTestCaseDescription","YourEnvironment");
        
        In OnLogCheckpoint event
        function GeneralEvents_OnLogCheckpoint(Sender, LogParams)
        {
              ReportingFunctions.fn_createteststep(1,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);
        }
        In OnLogError event
        function GeneralEvents_OnLogError(Sender, LogParams)
        {
              ReportingFunctions.fn_createteststep(0,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);  
        }
        In OnLogEvent event
        function GeneralEvents_OnLogEvent(Sender, LogParams)
        {
              ReportingFunctions.fn_createteststep(3,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);  
        }
        In OnLogMessage event
        function GeneralEvents_OnLogMessage(Sender, LogParams)
        {
              ReportingFunctions.fn_createteststep(3,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);  
        }
        In OnLogWarning event
        function GeneralEvents_OnLogWarning(Sender, LogParams)
        {
              ReportingFunctions.fn_createteststep(2,LogParams.MessageText,LogParams.MessageText,LogParams.AdditionalText,false);  
        }
        
        In OnStopTest
        function GeneralEvents_OnStopTest(Sender)
        {
              ReportingFunctions.setTestCaseExeEndTime(aqDateTime.Time());
              ReportingFunctions.fn_createtestcaseduration();
              ReportingFunctions.fn_completetestcase();
              ReportingFunctions.setExecutionEndTime(aqDateTime.Time());
              ReportingFunctions.fn_generatehighlevelreport();
        }

         Then run your test, you will be able to see the HTML reports