Forum Discussion

sharma2prateek's avatar
sharma2prateek
Occasional Contributor
6 years ago

Customize report on testcomplete

Below is the customize html report functions I want to Genaerate one summary report which includes multiple test cases execution which is exists on different test script files,

IN GENERAL I WANT TO CREATE A REPORT ON PROJECT SUITE LEVEL NOT ON TEST SCRIPT LEVEL, BEFORE TEST/AFTER TEST EVENT IS FIRED AFTER EVERY TEST SCRIPT PLEASE SUGGEST

 

REPORT HEADER

ReportManager.setLogsPath(ProjectSuite.Path+"\\AutomationLogs\\");    
ReportManager.setExecutionStartTime(aqDateTime.Now()); 

 

TEST CASE 1----- TEST CASE 10

INITIALIZE TEST CASE REPORT

ReportManager.setTestCaseExeStartTime(aqDateTime.Now())
ReportManager.fn_createtestcasedescription("Deal","TestCase_"+(i+1),testData[i][0]["TestCaseName"],"SYS");

 

ReportManager.fn_createteststep(0,"Step Description","EXPECTED RESULT"," ACTUAL RESULT",false);      

ReportManager.fn_createteststep(1,"Step Description","EXPECTED RESULT"," ACTUAL RESULT",false);        

ReportManager.fn_createteststep(1,"Step Description","EXPECTED RESULT"," ACTUAL RESULT",false);        

ReportManager.fn_createteststep(0,"Step Description","EXPECTED RESULT"," ACTUAL RESULT",false);        

GENERATE TEST CASE REPORT

ReportManager.setTestCaseExeEndTime(aqDateTime.Now());
ReportManager.fn_createtestcaseduration();
ReportManager.fn_completetestcase();

 

FINAL SUMMARY REPORT

ReportManager.setExecutionEndTime(aqDateTime.Now());
ReportManager.fn_generatehighlevelreport();

 

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Is there a question here?  Looks like you already have code written.  What seems to be the problem you're trying to solve?

    • sharma2prateek's avatar
      sharma2prateek
      Occasional Contributor
      Let say I have 3 modules A, B, C

      A module have 10 test case which is run by X script
      B module have 12 test case which is run by Y script
      C module have 15 test case which is run by Z script

      In this case I need one test summary report which have 37 test cases, but currently it create 3 summary report with 10,12,15 test cases

      Hope now its clear

      So In general a problem is I need to execute a piece of code which will execute before and after x, y, z scripts run.
      Also it will run before and after if I run x script individually.
      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Instead of calling your code in the event handler, you should run your code as project items, one the beginning, one at the end.