SetReporter(reportType, ReportPath, testName)
- 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:
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.
- Report Type: Format of the generated report.
- 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.
Report Type Options
Below is a list of values that can be set as the report type
|html / screenshot||Generates the Screenshots based report (External Report)|
|video||Generates video for the report.|
|xml||Generates both the Screenshots based report (External Report) and the video report.|
|properties||Generates a report properties file|
|Generate a pdf report|
creates an empty report
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 (" ").
- In order for video to be generated, video should be enabled in <Cloud Installation folder>\Server\conf\cloudserver.conf.xml
- Video is only available for Grid
- 'pdf' report type behavior was changed in 20.4 to only generate a PDF report file. Replace with "pdf,video" to preserve old behavior.
- 'xml' will have the same behaviour as "html,video"
- The properties file is also included by the html report.
- Type string is whitespace and case sensitive
For Java Junit framework it will usually be a part of the @Before section as all other operation needed before the actual test starts.
- 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”
- Report Type: will be set to “pdf”
- Report Path: will be set as "c://Temp//Pdf-reports"
- 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:
- 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;
- If there are additional true-type-font files needed which are not located in %windir%/Fonts, do the following:
- In the application data directory (%appdata% on Windows), enter directory seetest, and create directory pdf there;
- Place the necessary true-type-font file(-s) there.
- On OS-X:
- 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;
- 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.