Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
5 years ago

How to send report mail so that report details will be display in mail body ?

How can I send report mail, so client no need to open mht or html file.
All result will be displayed on that mail body.

 

 

  • if you look the Smartbear example, ALogData is furnished, by analysing each row of the log (Log is a tree-table  object).

    You can find its call on the ExportRow() function.

     

    Add all of the code of the example into a project and call ExportLog() before exiting, beware that the export can take a loooong time if the log is big. It creates one jpg for each screencapture and a text file.

     

  • BenoitB's avatar
    BenoitB
    Community Hero

    Three ways:

    1. -Do yourself the body by building a global result string containing all logs strings you want and only them; very easy to implement, put your own content; but this is not the Log itself only your own logging system..
    2. - Convert MHT using external tools and command line call, example of tool :  https://www.coolutils.com/Convert-MHT-Text  ;  dont touch your code, having any kind of type content; but need external tools and could slowdown the test process by adding extra time
    3. - Use the log items propety, https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/from-tests.html ; the best but need a little extra code

     

     

     

    • kaiiii's avatar
      kaiiii
      Regular Contributor

      Hi BenoitB ,

      Thanks for reply.

      I am trying to fix this by 3rd option.

      There are several methods have parameter like ALogData---> you can check in below function

      what is that parameter exactly. Can you please help

       

      Sub ExportPicture(ALogData)
      ' Generating the image file name
      ImgCount = ImgCount + 1
      s = aqFileSystem.GetFileFolder(ExportFileName) + "\" + CStr(ImgCount) + ".jpg"
      ' Saving image to file
      ALogData.Picture.SaveToFile s
      ' Saving image file name to the log data file
      ExportFile.WriteLine "Picture: " + s
      End Sub

      • BenoitB's avatar
        BenoitB
        Community Hero

        if you look the Smartbear example, ALogData is furnished, by analysing each row of the log (Log is a tree-table  object).

        You can find its call on the ExportRow() function.

         

        Add all of the code of the example into a project and call ExportLog() before exiting, beware that the export can take a loooong time if the log is big. It creates one jpg for each screencapture and a text file.