SeeTest Client - Report
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 .
void Report(String remark, boolean status)
Or:
void Report(String pathToImage, String remark, boolean status)
Notes:
- This command is available only from a coding environment;
- In VB, Python, Perl and Ruby clients, the second variation of this command is called: reportWithImage;
- In VUGen client, the variations of this command are called ic_report and ic_report_with_image, respectively, and their extra first argument is a pointer to the client structure.
Description
This command enhances the reports generated after test runs.
A standard report contains a line for each execution step. This command allows to customize the report by presenting meaningful information for a specific step (or a set of steps). This information can consist of a custom remark and/or an image.
Parameters
- pathToImage: The path to the image to be displayed in the entry of the current step when a report is generated. The path can be either a full local path or a URL.
The supported URL protocols are the following:- file://
- http://
- https://
- remark: The custom remark; if the value of this argument can be parsed as a valid URL to an image, then this image will be integrated into the generated report.
- status: boolean
- True:The specific step will be marked as passed.
- False: The specific step will be marked as failed.
Usage
Example Script: Report with a textual remark
Scenario: In this example, we will call command Report with a textual remark in a JUnit test:
Java Example
client.report("This is a custom message inserted into the test report. It will be marked there as \"failed\"", false);
C# Example Expand source
client.Report("This is a custom message inserted into the test report. It will be marked there as \"failed\"", false);
VUGen Example Expand source
ic_report(&client, "This is a custom message inserted into the test report. It will be marked there as \"failed\"", IC_FALSE);
Python Example Expand source
self.client.report("This is a custom message inserted into the test report. It will be marked there as \"failed\"", False)
Perl Example Expand source
$client->report("This is a custom message inserted into the test report. It will be marked there as \"failed\"", 0);
As a result, the following step will appear in the report when a report of the test is generated:
Note: The step is marked as failed owing to value false passed as the second argument (status). If a device has been set as active and its screenshot is available, the screenshot will be attached to the step report.
Example Script: Report with a custom image given as URL
Scenario: In this example, we will call the ReportWithImage command with a URL to a custom image in a test written in Python:
Java Example
client.report("https://pp.vk.me/c11102/u167537414/-6/w_8fbae648.jpg", "This message will be displayed with a custom image referenced by URL", true);
C# Example Expand source
client.Report("https://pp.vk.me/c11102/u167537414/-6/w_8fbae648.jpg", "This message will be displayed with a custom image referenced by URL", true);
VUGen Example Expand source
ic_report_with_image(&client, "https://pp.vk.me/c11102/u167537414/-6/w_8fbae648.jpg", "This message will be displayed with a custom image referenced by URL", IC_TRUE);
Python Example Expand source
self.client.reportWithImage("https://pp.vk.me/c11102/u167537414/-6/w_8fbae648.jpg", "This message will be displayed with a custom image referenced by URL", True)
Perl Example Expand source
$client->reportWithImage("https://pp.vk.me/c11102/u167537414/-6/w_8fbae648.jpg", "This message will be displayed with a custom image referenced by URL", 1);
Result: The first argument can be parsed as a valid image URL. As a result, the following step will appear in the report when a report of the test is generated:
Note: T he step is marked as successfully passed owing to value True passed as the third argument (status).
Example Script: Report with a custom local image
Scenario: In this example, we will call command Report with a URL to a custom local image in a C# NUnit test:
Java Example
client.report("C:\\Day_3\\IMG_20150210_114707.jpg", "This message will be displayed with a custom local image", true);
C# Example Expand source
client.Report("C:\\Day_3\\IMG_20150210_114707.jpg", "This message will be displayed with a custom local image", true);
VUGen Example Expand source
ic_report_with_image(&client, "C:\\Day_3\\IMG_20150210_114707.jpg", "This message will be displayed with a custom local image", IC_TRUE);
Python Example Expand source
self.client.reportWithImage("C:\\Day_3\\IMG_20150210_114707.jpg", "This message will be displayed with a custom local image", True)
Perl Example Expand source
$client->reportWithImage("C:\\Day_3\\IMG_20150210_114707.jpg", "This message will be displayed with a custom local image", 1);
Result: The first argument can be parsed as a valid image URL. As a result, the following step will appear in the report when a report of the test is generated:
Note: The step is marked as successfully passed owing to value true passed as the third argument (status).