Test Suite
2021.10
false
Banner background image
Test Suite User Guide
Last updated Feb 28, 2024

Getting Started With Test Manager SDK

The authorization methods described in this topic provide information on how to establish a service-to-service connection between Test Manager and your application, or other partner applications.

Prerequisites

Authorization Methods

You can choose between two methods for provisioning an external OAuth client, based on specific use cases that are dependent on the versions used in your UiPath product infrastructure:

Provisioning through Identity Management

You can register your application in Identity Management, define the Test Manager scopes and establish a connection between the applications.

To configure and authorize your application, you need to add an external application.

When you define the scopes for the integration, select Test Manager as a Resource. For more information, see Scopes.

Provisioning through Test Manager CLI

Through the Test Manager CLI authorization, you can provision the client, assign scopes, and then establish a service-to-service connection between the applications.

To integrate and start using your application with Test Manager, you need to configure authorization: Provision client and scopes and then get a client ID and client secret.

Configure Authorization

To establish a service-to-service connection between Test Manager and your application you will be using the Test Manager Provisioning Tool as the main CLI tool to get a client, provide access rights and scopes for your integration. You can find this tool packaged with each build as testmanager.exe in the default installation location, as follows:

C:\Program Files (x86)\UiPath\TestManager\Tools\TestManagerProvisioner.

Alternatively, you can find the executable in your custom installation folder. For a list of commands and options that are outside of the scope of your integration, see .

The following section lists the available command-line parameters, including options and default values so you can provision access rights and scopes, and then get a client ID and client secret for your application.

Note:

Command

Option

Description

register third-party-s2sclient

-iu, --identityUrl (Required)

The absolute URL where Identity Server is located.

 
-iit, --identityInstallationToken <identityinstallationtoken> (Required)

The authentication token for provisioning clients in Identity Server.

 
cscopes, --clientScopes <clientscopes> (Required)

Show client scopes to be used when creating the client.

 

`-cid, --clientID

<clientid>`

Show the client ID to be used when creating the client. This is automatically generated if you do not provide a client ID.

 

-cname, --clientName <clientname>

Show the client name to be used when creating the client. This is automatically generated if you do not provide a client name.

 

-csecret, --clientSecret <clientsecret>

Show the client secret to be used when creating the client. This is automatically generated if you do not provide a client secret

 

-lang, --language <language>

Specify the language of the error messages.

 

-?, -h?, --help

Show help and usage information.

Shell Script Sample

In the following example, the register third-party-s2sclient command is followed by the Orchestrator identity URL, identity installation token and Test Manager project scopes.
testmanager.exe <code>
register third-party-s2sclient</code>
-iu "https://orchestratorURL/identity" <code>
-iit "e908741iofjikasjijfapuosf09210-012opjawdfsaodgfsadgu90029183i1jiratjapo" </code>
-cscopes "TM.Projects" "TM.Requirements.Read"
Client created successfully. Please note the data below right away. You will not be able to retrieve the secret afterwards.
ClientID: TestManager.ThirdPartyClient.36512487-1rfasdf-11451-321535
ClientName: TestManager.ThirdPartyClient.36512487-1rfasdf-11451-321535
ClientSecret: 43sdgj@efg145!fgdsg53125sfdg12a*gbj9testmanager.exe <code>
register third-party-s2sclient</code>
-iu "https://orchestratorURL/identity" <code>
-iit "e908741iofjikasjijfapuosf09210-012opjawdfsaodgfsadgu90029183i1jiratjapo" </code>
-cscopes "TM.Projects" "TM.Requirements.Read"
Client created successfully. Please note the data below right away. You will not be able to retrieve the secret afterwards.
ClientID: TestManager.ThirdPartyClient.36512487-1rfasdf-11451-321535
ClientName: TestManager.ThirdPartyClient.36512487-1rfasdf-11451-321535
ClientSecret: 43sdgj@efg145!fgdsg53125sfdg12a*gbj9

API Examples

To perform an API call to Test Manager, you can take a look at the following example for fetching Test Manager projects.

API Call for Identity Management Authorization

GET https://[test-manager-URL.com]/api/projects
Headers
    Content-Type: application/json
  Authorization: "Bearer [Oauth Access Token]"Content-Type: application/json<code> </code>{
  "data": [
    {
      "projectPrefix": "INS",
      "id": "96a80aa7-5a7f-4117-c342-08d7add64671",
      "name": "Insurance Calculator",
      "description": "\)\)"The virtual insurance calculator creates sample quotes for different types of insurance.\)\)"",
      "created": "2020-02-10T07:07:33.167Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T07:07:33.167Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    },
    {
      "projectPrefix": "ELI",
      "id": "609f7c5b-c798-46b1-c343-08d7add64671",
      "name": "Eligibility",
      "description": "Eligibility for credit",
      "created": "2020-02-10T09:24:18.63Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T09:24:18.63Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    }
  ],
  "paging": {
    "total": 2,
    "page": 1,
    "pages": 1,
    "pageSize": 12,
    "returned": 2,
    "previousPage": false,
    "nextPage": false
  }
}Headers
    Content-Type: application/json
  Authorization: "Bearer [Oauth Access Token]"Content-Type: application/json<code> </code>{
  "data": [
    {
      "projectPrefix": "INS",
      "id": "96a80aa7-5a7f-4117-c342-08d7add64671",
      "name": "Insurance Calculator",
      "description": "\)\)"The virtual insurance calculator creates sample quotes for different types of insurance.\)\)"",
      "created": "2020-02-10T07:07:33.167Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T07:07:33.167Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    },
    {
      "projectPrefix": "ELI",
      "id": "609f7c5b-c798-46b1-c343-08d7add64671",
      "name": "Eligibility",
      "description": "Eligibility for credit",
      "created": "2020-02-10T09:24:18.63Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T09:24:18.63Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    }
  ],
  "paging": {
    "total": 2,
    "page": 1,
    "pages": 1,
    "pageSize": 12,
    "returned": 2,
    "previousPage": false,
    "nextPage": false
  }
}

API Call for Test Manager CLI Authorization

GET https://[test-manager-URL.com]/api/projects
Headers
    Content-Type: application/json
  Authorization: "Bearer [Oauth Access Token]"
    X-UiPath-TenantGlobalId: [Tenant ID]Content-Type: application/json
{
  "data": [
    {
      "projectPrefix": "INS",
      "id": "96a80aa7-5a7f-4117-c342-08d7add64671",
      "name": "Insurance Calculator",
      "description": "\)\)"The virtual insurance calculator creates sample quotes for different types of insurance.\)\)"",
      "created": "2020-02-10T07:07:33.167Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T07:07:33.167Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    },
    {
      "projectPrefix": "ELI",
      "id": "609f7c5b-c798-46b1-c343-08d7add64671",
      "name": "Eligibility",
      "description": "Eligibility for credit",
      "created": "2020-02-10T09:24:18.63Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T09:24:18.63Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    }
  ],
  "paging": {
    "total": 2,
    "page": 1,
    "pages": 1,
    "pageSize": 12,
    "returned": 2,
    "previousPage": false,
    "nextPage": false
  }
}Headers
    Content-Type: application/json
  Authorization: "Bearer [Oauth Access Token]"
    X-UiPath-TenantGlobalId: [Tenant ID]Content-Type: application/json
{
  "data": [
    {
      "projectPrefix": "INS",
      "id": "96a80aa7-5a7f-4117-c342-08d7add64671",
      "name": "Insurance Calculator",
      "description": "\)\)"The virtual insurance calculator creates sample quotes for different types of insurance.\)\)"",
      "created": "2020-02-10T07:07:33.167Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T07:07:33.167Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    },
    {
      "projectPrefix": "ELI",
      "id": "609f7c5b-c798-46b1-c343-08d7add64671",
      "name": "Eligibility",
      "description": "Eligibility for credit",
      "created": "2020-02-10T09:24:18.63Z",
      "createdBy": "74dde091-4a16-4225-aea9-5c3a27b2d996",
      "updated": "2020-02-10T09:24:18.63Z",
      "updatedBy": "74dde091-4a16-4225-aea9-5c3a27b2d996"
    }
  ],
  "paging": {
    "total": 2,
    "page": 1,
    "pages": 1,
    "pageSize": 12,
    "returned": 2,
    "previousPage": false,
    "nextPage": false
  }
}

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.