Silk Mobile

Table of Contents (Homepage)

GenerateReport

String GenerateReport(boolean ReleaseClient)

In Python and Perl clients: GenerateReport2(boolean ReleaseClient)

Note: This command is available only from a code environment.

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

images/images/os-icons/os_symbian02_150x150.png

images/images/os-icons/os_windows_mobile_150x150.png

Description

Equivalent command to releaseClient.

G enerates a report of the tests which have been running by the client.

Can also release the connection between the client and the controller (connection with the device).

Parameters

  • ReleaseClient: a Boolean parameter:

    • if set to true, the command will eventually call command ReleaseClient ;

    • if set to false, a report will be generated, but the client will not be released.

    In this case, releaseClient command is mandtory to be added.

Note: The older overloaded version of this command (without parameters) is equivalent to GenerateReport(true) .

Usage

It should be part of the tearDown method of any test. Meaning Command should be executed regardless of the test results.

Provide the ability to distinguish between the requirement to release the device and the generating the report.

Return value:

  • path to the folder of the generated report.

Examples

Command will be used on the tearDown of every test so it will be executed regardless of the test results.

Here some code examples for how to use this command:

Differentiating the operations of releasing the client and generating the report

Releasing the Client and generating the report together

public void tearDown(){
// Generates a report of the test case.
client.generateReport(false);
// Releases the client and the controller
client.releaseClient();
}

Releasing the Client and generating the report together

public void tearDown(){
// Generates a report of the test case.
// Releases the client and the controller
client.generateReport(true);
}

Not generating the report. So command is drop, Note that ReleaseClient is still Mandatory

public void tearDown(){
// Not generating the report of the test case.
// Releasing the client and the controller is still mandatory
client.releaseClient();
}

Code Examples

Java Example
client.generateReport(false);
C# Example
client.generateReport(false);
Python Example
self.client.generateReport2(False);
Perl Example
$client->generateReport2(0);