Forum Discussion

TestQA1's avatar
TestQA1
Frequent Contributor
2 years ago
Solved

Test Log details into HTML page

Hi,

 

I found this link very useful to create html report. But, what if I have BDD scripts and linked functions and I want to add test log details into html report instead? Is there any sample code for that. Also, in the link below how the test log data/results is going into html report, can anyone point out that line in the code. shankar_r Could you help please?

 

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

 

thank you

  • The status of the test cases i.e. Pass/Fail/Warning is done by function ReportingFunctions.fn_createteststep(1,"Expe Result","Actual Result","Test Data",false).

     

    In order to fully understand what the code is doing, I suggest you debug it, and step through each line of code to see what is actually happening.

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    The status of the test cases i.e. Pass/Fail/Warning is done by function ReportingFunctions.fn_createteststep(1,"Expe Result","Actual Result","Test Data",false).

     

    In order to fully understand what the code is doing, I suggest you debug it, and step through each line of code to see what is actually happening.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    tempCode is used to concatenate the string (html mark up language) and data (results), which is then used to generate the output file i.e. html file.

     

    listOfModules is used to store the results of Test Case #1 (Module1) and Test Case #2 (Module2)

     

    See https://www.w3schools.com/html/html_intro.asp  for introduction to HTML

     

  • TestQA1's avatar
    TestQA1
    Frequent Contributor

    Thanks for your reply. Yeah got that line, but being new in html, I couldn't understand how the data is going into html page. Is Tempcode variable is being used to add all data in the html page? Also, what's the use of ListofModules.Add and Scripting.Dictionary. Im sorry but I am trying to understand and  now debugging as well.