Test Suite
2021.10
バナーの背景画像
Test Suite ユーザー ガイド
最終更新日 2024年2月28日

Test Manager SDK (ソフトウェア開発キット) の概要

このトピックで説明する承認方法では、Test Manager とユーザーのアプリケーションまたは他のパートナー アプリケーションとの間にサービス間接続を確立する方法についての情報を提供します。

前提条件

承認の方法

外部 OAuth クライアントをプロビジョニングする方法を、UiPath 製品インフラストラクチャで使用されている各種のバージョンに依存する特定のユース ケースに基づいて、以下の 2 種類から選択できます。

ID 管理を使用したプロビジョニング

[ID 管理] でアプリケーションを登録し、Test Manager のスコープを定義して、アプリケーション間の接続を確立できます。

アプリケーションを構成して認可するには、外部アプリケーションを追加する必要があります。

連携のスコープを定義する際は、Test Managerリソースとして選択します。詳しくは、「API スコープ」をご覧ください。

Test Manager CLI を使用したプロビジョニング

Test Manager CLI 認可を使用することで、クライアントをプロビジョニングし、スコープを割り当てて、アプリケーション間でサービス間接続を確立できます。

アプリケーションを Test Manager と連携して、使用を開始するには、認可を設定する必要があります。すなわち、クライアントをプロビジョニングし、スコープを指定して、クライアント ID とクライアント シークレットを取得します。

認可を設定する

Test Manager とアプリケーションとの間にサービス間接続を確立するには、Test Manager プロビジョニング ツールをメイン CLI ツールとして使用して、クライアントを取得し、連携に必要なアクセス権とスコープを指定します。このツールは、既定のインストール場所で、testmanager.exe として各ビルドに、次のようにパッケージされています。

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

または、この実行可能ファイルはお使いのカスタム インストール フォルダーにあります。連携のスコープ外のコマンドとオプションのリストについては、以下をご覧ください。

以下のセクションでは、使用可能なコマンドライン パラメーターをオプションおよび既定値と共にリストで示します。これらを使用して、アクセス権やスコープを指定し、アプリケーションのクライアント ID とクライアント シークレットを取得できます。

注:
  • 前提条件」セクションで要求されている、Orchestrator の [ID 管理] で生成されたインストール トークンが必要になります。
  • Test Manager のスコープを定義する必要があります。

コマンド

オプション

説明

register third-party-s2sclient

-iu, --identityUrl (必須)

Identity Server が置かれている絶対 URL。

 
-iit, --identityInstallationToken <identityinstallationtoken> (必須)

Identity Server でクライアントをプロビジョニングするための認証トークン。

 
cscopes, --clientScopes <clientscopes> (必須)

クライアントの作成時に使用されるクライアント スコープを示します。

 

'-cid,--clientID

<clientid>`

クライアントの作成時に使用されるクライアント ID を示します。クライアント ID を指定しない場合は自動的に生成されます。

 

-cname, --clientName <clientname>

クライアントの作成時に使用されるクライアント名を示します。クライアント名を指定しない場合は自動的に生成されます。

 

-csecret, --clientSecret <clientsecret>

クライアントの作成時に使用されるクライアント シークレットを示します。クライアント シークレットを指定しない場合は自動的に生成されます。

 

-lang, --language <language>

エラー メッセージの言語を指定します。

 

-?, -h?, --help

ヘルプや使用状況に関する情報を表示します。

Shell スクリプトのサンプル

以下の例では、register third-party-s2sclient コマンドにつづいて、 Orchestrator Identity URL、ID インストール トークン、Test Manager プロジェクト スコープが記述されています。
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 の例

Test Manager への API 呼び出しを実行するには、次の例を参考として、Test Manager プロジェクトを取得します。

ID 管理認可の API 呼び出し

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
  }
}

Test Manager CLI 認可の API 呼び出し

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?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.