Skip to main content
info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

SetReporter(reportType, ReportPath, testName) 

info

Notes:

  • This command can only be added in the code environment (except UFT), and not in SeeTestAutomation.

  • In Python and Perl the command is called setReporter2. In Python, for example, the command can be used this way:

    self.client.setReporter2("xml", "reports", "ReportName")

Description: 

This method will generally be called at the beginning of each test case, and it's configuration will define the report that will be generated at the end of the test. This command should be joined by the GenerateReport command to generate the report.

 Parameters:

  • Report Type: Format of the generated report. Optional formats are "xml" or "pdf".

    • "xml": Classic SeeTestAutomation HTML report (can later be customized according to specific needs)
    • "pdf": PDF format (in addition to "xml" format).
    • "dummy": Set dummy reporter when using custom reporters (not for SeeTest Reporter). If the dummy reporter was set, Report Path and Report Name should be set as empty strings (" ").
  • Report Path: Path where the report and all its content will be stored. The default path in Windows is C:\Users\<User name>\seetest-reports\ folder.

  • Report Name: Will be the name given to the report in the Report summary page.

Example A:

For Java Junit framework it will usually be a part of the @Before section as all other operation needed before the actual test starts.

@Before
public void setUp(){
client = new Client(host, port, true);
client.setProjectBaseDirectory(projectBaseDirectory);
client.setReporter("xml", "reports", "Test 2");
}

Parameters:

  • Report Type: will be set to "xml" (for web display)
  • Report Path: will be set as "reports" which means the default location
  • Report Name: Will be set to "Test 2"

Example B:

@Before
public void setUp(){
client = new Client(host, port, true);
client.setProjectBaseDirectory(projectBaseDirectory);
client.setReporter("pdf", "c://Temp//Pdf-reports", "Test 3");
}

Parameters:

  • Report Type: will be set to "pdf"
  • Report Path: will be set as "c://Temp//Pdf-reports"
info

Note: It should be an existing folder, otherwise, command will fail.

  • Report Name: Will be set to "Test 3"

Non-English characters on the pdf report

To handle non-ASCII characters in your PDF reports, you should apply  the following actions:

  • On Windows:
    1. If all the necessary true-type-font files (with extension .ttf) are located in %windir%/Fonts, you need to do no additional actions; your PDF report is to be normally rendered;
    2. If there are additional true-type-font files needed which are not located in %windir%/Fonts, do the following:
      1. In the application data directory (%appdata% on Windows), enter directory seetest, and create directory pdf there;
      2. Place the necessary true-type-font file(-s) there.
  • On OS-X:
    1. If all the necessary true-type-font files (with extension .ttf) are located in either $HOME/Library, or /System/Library, or /Library, you need to do no additional actions; your PDF report is to be normally rendered;
    2. If there are additional true-type-font files needed which are not located in any of the aforementioned directories, execute steps 2.1 and 2.2 of the Windows section.

Having done this, you can restart SeeTestAutomation, and PDF reports must be normally displayed.