15REST API Reference
REST API Reference
This chapter describes the REST APIs available for testing related objects and actions. It includes the following topics:
Create a Test Execution Record
You create a Test Execution record and request automated test runs by sending an HTTP POST to the URI.
The sequence involves a POST for TestExecution first, followed by a POST for ScheduleRun. The first POST request creates a Test Execution record with the appropriate server credentials and the second POST request prepares the attachments necessary for execution, including the user credentials, and sets Status to Requested.
The following shows a request to create a Test Execution record and return the Run Id.
URL: https://ServerName:Port/siebel/v1.0/service/Automation Rest Service/TestExecution HTTP Method: POST Content type: application/json Authorization: Basic Request Body: { "body": { "Application Version":"1-BUILD", "Master Suite Name":"CORE_UIF", "Description":"Acceptance test Scenarios", "Run Reference":"Test Run", "Client OS":"Windows", "ServerCredentials": [ { "Application Alias":"Siebel Universal Agent", "Application Type":"Desktop_Chrome", "URL":"https://ServerName:Port/siebel/app/callcenter/enu", "Server OS Type":"Windows" }, { "Application Alias":"Siebel Financial Services", "Application Type":"Desktop_Chrome", "URL":"https://ServerName:Port/siebel/app/fins/enu", "Server OS Type":"Windows" } ] } } Response to a successful request: { "Id": "88-1WCI9B", "Server Credentials": "Siebel Universal Agent;Siebel Financial Services", "Users List": "SADMIN;DBROWN" }
The following shows a request to create a Schedule Run for a given Run Id, created using a Test Execution request.
URL: https://ServerName:Port/siebel/<Version>/service/Automation Rest Service/ScheduleRun HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "body": { "Test Run Id":"88-1WCI9B", "Override Validation": "Y", "Users List":"SADMIN:pwd;DBROWN:pwd" } } Response to a successful request: { "Status": "Run Request is successfully created 88-1WCI9B" } }
The following shows a sample request containing all parameters for a Test Execution.
Request Body: { "body": { "Application Version":"23086", "Master Suite Name":"COREUIF", "Description":"Test Run For monthly build", "Run Reference":"Full run", "Client OS":"Windows", "Schedule Run At":"09/26/2020 05:32:07", "Perl Path":"c:\\perl\\bin\\perl.exe", "Siebel Tools Machine":"ServerName", "Siebel Tools Path":"c:\\23082", "Siebel Tools User Name":"user1", "Siebel Tools DSN":"serverdsn", "Siebel Tools DSN User":"userid", "EAI Machine Name":"eaiserverName", "EAI Port Number":"16690", "EAI User Name":"sadmin", "BIP Outbound WS":"http://serverName:port/xmlpserver/services/publicreportservice_v11", "BIP Server Name":"serverName", "BIP Server Port":"9500", "BIP XMLP Server":"serverName", "BIP XMLP Server Port":"9502", "BIP User Name":"userName", "Client Machine":"<MAC IP address>", "MAC-Username":"userId", "Mobile Port":"9090", "ServerCredentials": [ { "Application Alias":"Siebel Universal Agent", "Application Type":"Desktop_Chrome", "Server OS Type":"Windows", "URL":"https://ServerName:Port/siebel/app/callcenter/enu", "Server Home Path":"c:\\23082", "Siebel Server Machine":"serverName", "Siebel Server User" :"user1", "Gateway Machine":"serverName", "Siebel Gateway Port":"9390", "AI Server Port":"16690" }, { "Application Alias":"Siebel Financial Services", "Application Type":"Desktop_Chrome", "Server OS Type":"Windows", "URL":"https://ServerName:Port/siebel/app/fins/enu", "Server Home Path":"c:\\23082", "Siebel Server Machine":"serverName", "Siebel Server User" :"user1", "Gateway Machine":"serverName", "Siebel Gateway Port":"9390", "AI Server Port":"16690" } ] } }
The following shows a sample request to containing all parameters for a Schedule Run.
Request Body: { "body": { "Test Run Id":"88-1WCI9B", "Override Validation": "Y", "MAC Machine Pwd": "pwd1", "Siebel Tools Machine Pwd":"toolspwd", "Siebel Tools DSN Pwd": "toolsdsnpwd", "BIP Server Pwd": "bipserverpwd", "EAI Server Pwd": "EAIpwd", "Server Credentials": "Siebel Universal Agent:pwd;Siebel Financial Services:pwd2", "Users List":"SADMIN:pwd;DBROWN:pwd" } }
Rerun a Test Execution Record
The following shows a request to submit a Rerun for an already completed Test Execution record. Preconditions are that Status is set to Completed and that the Reports zip and other attachments are available from prior run(s).
URL: https://ServerName:Port/siebel/<Version>/service/Automation Rest Service/Rerun HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "body": { "Id":"88-1WCI9B" } } Response to a successful request: { "Status": "Run Request is successfully created 88-1WCI9B" }
Create Test Passes for a Test Execution Record
The following shows a request to Create Test Passes once a run is completed. The latest XML file (indicated by the highest suffix number in the file name) in the Attachments applet will automatically be selected as input to create test pass entries. Preconditions are that Test Sets are associated with Test Plans and that Test Pass has the Completed LOV.
URL: https://ServerName:Port/siebel/<Version>/service/Automation Rest Service/CreateTestPasses HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "body": { "Id":"88-1WCI9B" } } Response to a successful request: { "Status": "Test Pass Entries Created Successfully. Query in Test Pass View Starting with 88-1WCI9B" }
Querying for a Test Execution Record
The following shows a request to query the details of a Test Execution record, and can also be used to query the Status of a Test Execution record.
URL: https://ServerName:Port/siebel/<Version>/data/Keyword Automation/Automation Exec Config/88-1WCI9B HTTP Method: GET Content type: application/json Authorization: Basic Response to a successful request: { "Id": "88-1WCI9B", "Status": "Completed", "Master Suite Name": "CORE_UIF1" }
REST API for Data Sets
The following shows a request to create a data set record.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Data Set/Automation Data Set HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "Name": "Test_DataSet", "Status": "Active", "Description": "DataSet" } Response to a successful request: { "Id": "88-1WCIA5", "Name": "Test_DataSet", "Status": "Active", "Description": "DataSet" }
The following shows a request to insert a new field into a data set.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Data Set/Automation Data Set/88-1WCIA5/Automation Data Set Field HTTP Method: PUT Content type: application/json Authorization: Basic Request body: { "Id": "123", "Name": "Name", "Applet Name": "Account List Applet", "Description": "List Applet Field" } Response to a successful request: { "Id": "88-1WCIAF" }
The following shows a request to insert a new value for a field in a data set.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Data Set/Automation Data Set/88-1WCIA5/Automation Data Set Field/88-1WCIAF/Automation Data Set Values HTTP Method: PUT Content type: application/json Authorization: Basic Request body: { "Id":"123", "Sequence":"1", "Data Set Field Value": "Value1" } Response to a successful request: { "Id": "88-1WCIAP" }
REST API for Test Script
The following shows a request to create a a test script record.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Test Script/Automation Test Script HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "Name": "Test_Script1", "Status": "Active", "Description": "Script1", "Test Env": "Test", "DataSet Name": "Test_DataSet1" } Response to a successful request: { "Id": "88-1WCIB5" }
The following shows a request to query a test step record.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Test Script/Automation Test Script/88-1WCIB5/Automation Test Step Child HTTP Method: GET Content type: application/json Authorization: Basic Response to a successful request: { "Id": "88-1WCIB8" }
REST API for Test Set
The following shows a request to create a test set record.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Test Set/Automation Test Set HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "Name": "Test_Set", "Status": "Active", "Description": "New Set", "Test Plan Name": "UIFControls_Scenarios" } Response to a successful request: { "Id": "88-1WCIBT" }
The following shows a request to insert a test script record into a test set.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Test Set/Automation Test Set/88-1WCIBT/Automation Test Script Child HTTP Method: PUT Content type: application/json Authorization: Basic Request body: { "Id": "123", "Sequence": "1", "Name": "Test_Script1" } Response to a successful request: { "Id": "88-1WCIBT" }
REST API for Master Suite
The following shows a request to create a Master Suite record, returning Row id.
URL: https://ServerName:Port/siebel/<Version>/data/Automation Master Suite/Automation Master Suite HTTP Method: POST Content type: application/json Authorization: Basic Request body: { "Name": "Test_Mastersuite", "Status": "Active", "Description": "New Msuite", "Test Env": "Test", "Release": "IP2017", "Team Name": "Falcons" } Response to a successful request: { "Id": "88-1WCICN" }
The following shows a request to insert a test set record into a Master Suite.
https://ServerName:Port/siebel/<Version>/data/Automation Master Suite/Automation Master Suite/88-1WCICN/Automation Test Set Child HTTP Method: PUT Content type: application/json Authorization: Basic Request body: { "Id":"123", "Sequence": "1", "Name": "Test_Set", "Skip": "N" } Response to a successful request: { "Id": "88-1WCICX" }