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 example shows a request to create a Test Execution record, using Test Execution Profile, and return the Run Id.

  1. Create Test Execution Record

    Request Body

    {
    "body":
    {
    "Profile Name": "My_Profile",    
    "Application Version":"1-BUILD",
    "Master Suite Name":"CORE_UIF1",
    "Description":"Acceptance test Scenarios",
    "Run Reference":"Client_Pool_A",
    "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 Web Tools",
    "Application Type":"Desktop_Chrome",
    "URL":"https://ServerName:Port/siebel/app/callcenter/enu",
    "Server OS Type":"Windows"
    },{
    "Application Alias":"CORE_UIF",
    "Application Type":"Desktop_Chrome",
    "URL":"https://ServerName:Port/siebel/app/callcenter/enu",
    "Server OS Type":"Windows"
    }]}}
    

    Response:

    
    {
      "Id": "88-3EQD7V",
      "Server Credentials": "NEW_REST;Siebel Universal Agent",
      "Users List": "SADMIN"
    }
    Note:
    • Ensure there is a record My_Profile in the Test Execution Profile Applet, and if it has valid values for Default Application URL and Default REST URI parameters, URL can be omitted in the Request body.
    • In the example, if the Profile parameter is "" (blank) or if not included in REST API call, then hard coded values for System Parameters are used.
    • Test Execution Profile marked as Default is not set automatically.
  2. Schedule the Run

    Request Body

    {
      "body": {
        "Test Run Id": "88-3EQD7V",
        "Override Validation": "Y",
        "Users List": "SADMIN:ldap"
      }
    }

    Response

    {
      "Status": "Run Request is Successfully created. 88-3EQD7V"
    }

Backward Compatibility:

The Test Execution Profile is introduced in 25.8. For compatibility with prior versions, following section retains the examples from earlier versions.

The following shows a request to create a Test Execution record without a Test Execution Profile 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":"Client_Pool_A",
"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"
}
Note: If application aliases are not available on firing the request, the response will provide the missing aliases.

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":"Client_Pool_A",
"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",
        "Parameters":
            [
                {
                    "Name":"SSOUser",
                    "Value":"usernamevalue"
                },
                { 
                    "Name":"SSOPwd",
                    "Value":"pwd"
                }
                 
            ]
    }
}