SideeX WebService Client API primarily handles the transfer of test suites to a hosted SideeX WebService server and returns the test reports.
Prerequisite:
- pip install asyncio
- pip install aiohttp
Download the SideeX WebService Client API for Python
ProtocolType
Description
: ProtocolType is a Enum Class 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 None
.runTestSuite(file)
Description
: Uses the API to run test cases.file
: The file that contains test cases.getState(token)
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(fromData, filePath, option)
fromData
: A JSON object containing
token
: The token returned from the runTestSuite APIfile
: 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)
token
: The token returned from the runTestSuite API.
A complete example: