Silk Mobile

Table of Contents (Homepage)

ReleaseClient

void releaseClient()

Note: This command is available only from and external testing framework.

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

Releases the connection between the client and the controller.

Parameters

No parameters.

Usage

This command (or its equivalent: Generate Report [link] is a mandatory command, which should be part of the tearDown method of any test. Meaning Command should be executed regardless of the test results .

Example:

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

Note: The only way this command will not be used is if generateReport(true) is used instead.

Here some code examples for how to use this command:

Differentiating the operations of releasing the client and generating the report

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.releaseClient();
C# Example
client.releaseClient();
Python Example
self.client.releaseClient();
Perl Example
$client->releaseClient();