This new "Post Process Utility" script section runs after all reports and files are processed and closed.  

 

In this script section the PDF file that contains the suite testing reports can be sent as a Summary Results document.  The timing of this script, makes it safe to attach the information to an email, or to create a copy that can be named with date and time information as necessary.  Use the sample code below as an example of how to handle the output that is available and can be added.

Example:

VARIABLES: reportPath, messagebody Type: String
 
'  Use the PDF version to attach to email as it contains all the grpahics and charts.
reportPath = ReplaceString( test.summaryReportFilePath, ".htm", ".pdf" )
 
If NOT EmailConnectSSL( "mail.tradingblox.com", _
                      + "Customer Testing<customertesting@tradingblox.com>", _
                      + "Customer Testing<customertesting@tradingblox.com>", _
                      + "customertesting+tradingblox.com", _
                      + "xxx", 587) THEN ERROR "Unable to connect"
 
'  Send a simple email with the report as an attachement.
'  IF NOT EmailSend( "tim@tradingblox.com", "Summary Report",
'  "", "", "", reportPath ) THEN ERROR "Unable to send"
 
'  Add the equity chart as an image. Only images can be
'  added for use in the message body html.
'  This first image will be referenced by cid:message-root.1
If FileExists( test.resultsReportPath _
              + "\LinearEquityDrawdownGraph_P1.png" ) THEN
  EmailAddImage( test.resultsReportPath _
                +"\LinearEquityDrawdownGraph_P1.png" )
ENDIF
 
'  This second image will be referenced by cid:message-root.2
If FileExists( test.resultsReportPath +"\MonthlyReturnsGraph_P1.png" ) THEN
  EmailAddImage( test.resultsReportPath+"\MonthlyReturnsGraph_P1.png" )
ENDIF
 
messagebody = "<HTML>Here is the <STRONG>Equity Chart:" _
            + "</STRONG><BR><BR><IMG SRC='cid:message-root.1'>" _
            + "<BR><BR>AND here is the <STRONG>Monthly Returns "_
            + "chart:</STRONG><BR><BR><IMG SRC='cid:message-root.2'>"
 
'  Send the HTML message with the message body referring to each attached image. More than one can be included, and the HTML can be as complex as necessary.
If NOT EmailSendHTML( "tim@tradingblox.com", _
                    + "Summary Report Graph", messagebody, "", "", reportPath ) THEN ERROR "Unable to send"
 
EmailDisconnect

 


Edit Time: 11/23/2020 1:30:10 PM


Topic ID#: 670

 

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software