Search code examples
dspacetest-reporting

How to embed a file in Automation Desk report?


I am using Automation Desk for running an automotive network test. I am new to Automation Desk. My sequence runs a custom library Python Exec block to launch another tool to carry out the test. The tool generates its own report containing the test result in a particular path.

I want the sequence to embed the report in the Automation Desk report which the user can click and open in the report viewer. The report is in a binary format so I cannot simply insert the file contents.

I tried reportlibrary.AddDataObjects but it is only inserting the path of the file but not the entire object. Any help/expert advice is welcome

OS - Windows
Au-D version - 2023-A

Please let me know if I have missed any necessary detail


Solution

  • I found a way to insert a link to the file using AddURL method.

    report_path = "C:\Users\myname\Downloads\report.pdf"
    
    reportlibrary.AddURL(Link=report_path, AlternativeRepresentation="Test execution report", Copy=1)