SideeX WebService Client API primarily handles the transfer of test suites to a hosted SideeX WebService server and returns the test reports.
Download the SideeX WebService Client API for Node.js
const ProtocolType
Description
: ProtocolType is a self-defined object type which specifies the http protocol. HTTP
stands for http request; HTTPS_DISABLE
stands for https request without certificate; HTTPS_ENABLE
stands for https request with certificate.SideeXWebserviceClientAPI(baseURL, protocolType, caFilePath)
Description
: The constructor to create a Client API object.baseURL
: Base URL of the SideeX WebService server.protocolType
: The type of http request used. Default value is set to ProtocolType.HTTP
.caFilePath
: The file path of the http certificate. Default value is set to null
.runTestSuite(file)
Description
: Uses the API to run test cases.file
: The file that contains test cases.getState(token)
Description
: Gets the current test case execution state.token
: The token returned from the runTestSuite API.
valid
and the state is running
, the response will be
valid
and the state is complete
, the response will be
download(formData, filePath, option)
Description
: Download HTML test reports or logs.formData
: A JSON object containing
token
: The token returned from the runTestSuite API.file
: This parameter is optional. If set file
to "reports.zip"
, the API will return a zip file containing all HTML reports, otherwise, it will return an HTML index webpage.filePath
: Set your download file path. e.g.: "./reports".option
: If option is set to 0
, the API will download reports. If set to 1
, it will download logs.deleteJob(token)
Description
: Delete the test case and the test reports on SideeX WebService server.token
: The token returned from the runTestSuite API.
An example: