Share via


Test Plans - Create

テスト計画を作成します。

POST https://dev.azure.com/{organization}/{project}/_apis/testplan/plans?api-version=7.1-preview.1

URI パラメーター

名前 / 必須 説明
organization
path True

string

Azure DevOps 組織の名前です。

project
path True

string

プロジェクト ID またはプロジェクト名

api-version
query True

string

使う API のバージョン。 このバージョンの API を使用するには、これを '7.1-preview.1' に設定する必要があります。

要求本文

名前 説明
areaPath

string

テスト計画の領域。

buildDefinition

BuildDefinitionReference

このテスト 計画に関連付けられているビルドを生成するビルド定義。

buildId

integer

テスト対象のビルド。

description

string

テスト計画の説明。

endDate

string

テスト計画の終了日。

iteration

string

テスト計画のイテレーション パス。

name

string

テスト 計画の名前。

owner

IdentityRef

テスト計画の所有者。

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

ビルドをデプロイし、このテスト計画から自動テストを実行するために使用されるリリース環境。

startDate

string

テスト計画の開始日。

state

string

テスト計画の状態。

testOutcomeSettings

TestOutcomeSettings

テスト計画の下でテスト スイート間で同じテストを実行する必要がある方法を構成するための値

応答

名前 説明
200 OK

TestPlan

正常な操作

セキュリティ

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

名前 説明
vso.test_write テスト 計画、ケース、結果、その他のテスト管理関連の成果物を読み取り、作成、更新する機能を付与します。

Create a test plan with all details.
Create a test plan with name, area path and iteration.

Create a test plan with all details.

Sample Request

POST https://dev.azure.com/fabrikam/{project}/_apis/testplan/plans?api-version=7.1-preview.1

{
  "name": "newCreatedPlan2",
  "areaPath": "sampleProject\\Team1",
  "description": "description of the test plan",
  "startDate": "2018-08-19T20:49:15.8884886+05:30",
  "endDate": "2018-08-26T20:49:15.8884886+05:30",
  "iteration": "sampleProject\\Iteration 2",
  "owner": null,
  "state": "Inactive",
  "buildId": 3,
  "buildDefinition": {
    "id": 2,
    "name": ""
  },
  "releaseEnvironmentDefinition": {
    "definitionId": 1,
    "environmentDefinitionId": 1
  },
  "testOutcomeSettings": {
    "syncOutcomeAcrossSuites": true
  }
}

Sample Response

{
  "id": 31,
  "project": {
    "id": "afb62ab2-bd74-41c2-991e-40bbb9c8ca91",
    "name": "sampleProject",
    "state": "unchanged",
    "visibility": "unchanged"
  },
  "updatedDate": "2018-08-17T15:19:16.993Z",
  "updatedBy": {
    "displayName": "Fabrikam Fiber",
    "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
      }
    },
    "id": "0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "uniqueName": "fabrikamfiber1@microsoft.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "descriptor": "aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
  },
  "rootSuite": {
    "id": 32,
    "name": "newCreatedPlan2",
    "plan": {
      "id": 31,
      "name": "newCreatedPlan2"
    }
  },
  "_links": {
    "_self": {
      "href": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/31"
    },
    "clientUrl": {
      "href": "mtms://fabrikam.visualstudio.com:443/p:sampleProject/Testing/testplan/connect?id=31"
    },
    "rootSuite": {
      "href": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/31/Suites/32"
    },
    "build": {
      "href": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/build/Builds/3"
    },
    "buildDefinition": {
      "href": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/build/Definitions/2"
    }
  },
  "revision": 2,
  "name": "newCreatedPlan2",
  "areaPath": "sampleProject\\Team1",
  "description": "description of the test plan",
  "startDate": "2018-08-19T20:49:15.8884886+05:30",
  "endDate": "2018-08-26T20:49:15.8884886+05:30",
  "iteration": "sampleProject\\Iteration 2",
  "owner": {
    "displayName": "Fabrikam Fiber",
    "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
      }
    },
    "id": "0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "uniqueName": "fabrikamfiber1@microsoft.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "descriptor": "aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
  },
  "state": "Inactive",
  "buildId": 3,
  "buildDefinition": {
    "id": 2,
    "name": ""
  },
  "releaseEnvironmentDefinition": {
    "definitionId": 1,
    "environmentDefinitionId": 1
  },
  "testOutcomeSettings": {
    "syncOutcomeAcrossSuites": true
  }
}

Create a test plan with name, area path and iteration.

Sample Request

POST https://dev.azure.com/fabrikam/{project}/_apis/testplan/plans?api-version=7.1-preview.1

{
  "name": "newCreatedPlan1",
  "areaPath": "sampleProject\\Team1",
  "iteration": "sampleProject\\Iteration 2",
  "owner": null
}

Sample Response

{
  "id": 29,
  "project": {
    "id": "afb62ab2-bd74-41c2-991e-40bbb9c8ca91",
    "name": "sampleProject",
    "state": "unchanged",
    "visibility": "unchanged"
  },
  "updatedDate": "2018-08-17T15:19:13.967Z",
  "updatedBy": {
    "displayName": "Fabrikam Fiber",
    "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
      }
    },
    "id": "0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "uniqueName": "fabrikamfiber1@microsoft.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "descriptor": "aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
  },
  "rootSuite": {
    "id": 30,
    "name": "newCreatedPlan1",
    "plan": {
      "id": 29,
      "name": "newCreatedPlan1"
    }
  },
  "_links": {
    "_self": {
      "href": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/29"
    },
    "clientUrl": {
      "href": "mtms://fabrikam.visualstudio.com:443/p:sampleProject/Testing/testplan/connect?id=29"
    },
    "rootSuite": {
      "href": "https://dev.azure.com/fabrikam/fabrikam-fiber-tfvc/_apis/test/Plans/29/Suites/30"
    }
  },
  "revision": 1,
  "name": "newCreatedPlan1",
  "areaPath": "sampleProject\\Team1",
  "startDate": "2018-08-17T15:19:13.6734848Z",
  "endDate": "2018-08-24T15:19:13.6734848Z",
  "iteration": "sampleProject\\Iteration 2",
  "owner": {
    "displayName": "Fabrikam Fiber",
    "url": "https://vssps.dev.azure.com/fabrikam/Aea08ebc7-105f-4bb2-a36b-f92e0e9de65a/_apis/Identities/0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
      }
    },
    "id": "0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "uniqueName": "fabrikamfiber1@microsoft.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=0fdbdad8-6afb-6149-9af9-c0a216137d1d",
    "descriptor": "aad.MGZkYmRhZDgtNmFmYi03MTQ5LTlhZjktYzBhMjE2MTM3ZDFk"
  },
  "state": "Active",
  "testOutcomeSettings": {
    "syncOutcomeAcrossSuites": false
  }
}

定義

名前 説明
BuildDefinitionReference

ビルド定義参照リソース

IdentityRef
ProjectState

プロジェクトの状態。

ProjectVisibility

プロジェクトの可視性。

ReferenceLinks

REST 参照リンクのコレクションを表す クラス。

ReleaseEnvironmentDefinitionReference

リリース環境リソースへの参照。

TeamProjectReference

TeamProject への浅い参照を表します。

TestOutcomeSettings

テスト結果の設定

TestPlan

テスト計画リソース。

TestPlanCreateParams

テスト 計画では、パラメーターを作成します。

TestSuiteReference

テスト スイート参照リソース。

BuildDefinitionReference

ビルド定義参照リソース

名前 説明
id

integer

ビルド定義の ID

name

string

ビルド定義の名前

IdentityRef

名前 説明
_links

ReferenceLinks

このフィールドには、グラフの件名に関する 0 個以上の興味深いリンクが含まれています。 これらのリンクを呼び出して、このグラフの主題に関する追加のリレーションシップや詳細情報を取得できます。

descriptor

string

記述子は、システムの実行中にグラフの件名を参照する主な方法です。 このフィールドは、アカウントと組織の両方で同じグラフの件名を一意に識別します。

directoryAlias

string

非推奨 - IdentityRef "_links" ディクショナリの "self" エントリで参照されている Graph ユーザーにクエリを実行することで取得できます

displayName

string

これは、グラフの件名の一意でない表示名です。 このフィールドを変更するには、ソース プロバイダーでその値を変更する必要があります。

id

string

imageUrl

string

非推奨 - IdentityRef "_links" ディクショナリの "アバター" エントリで使用できます

inactive

boolean

非推奨 - GraphUser "_links" ディクショナリの "membershipState" エントリで参照されている Graph メンバーシップの状態を照会することで取得できます

isAadIdentity

boolean

非推奨 - 記述子のサブジェクト型 (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) から推論できます

isContainer

boolean

非推奨 - 記述子のサブジェクト型 (Descriptor.IsGroupType) から推論できます

isDeletedInOrigin

boolean

profileUrl

string

非推奨 - ToIdentityRef の既存のほとんどの実装では使用されていません

uniqueName

string

非推奨 - 代わりに Domain+PrincipalName を使用します

url

string

この URL は、このグラフの件名のソース リソースへの完全なルートです。

ProjectState

プロジェクトの状態。

名前 説明
all

string

[削除済み] を除く、状態に関係なくすべてのプロジェクト。

createPending

string

プロジェクトは作成のためにキューに登録されていますが、プロセスはまだ開始されていません。

deleted

string

プロジェクトが削除されました。

deleting

string

プロジェクトは削除中です。

new

string

プロジェクトは作成中です。

unchanged

string

プロジェクトは変更されていません。

wellFormed

string

プロジェクトが完全に作成され、使用する準備が整いました。

ProjectVisibility

プロジェクトの可視性。

名前 説明
private

string

プロジェクトは、明示的なアクセス権を持つユーザーにのみ表示されます。

public

string

プロジェクトはすべてのユーザーに表示されます。

REST 参照リンクのコレクションを表す クラス。

名前 説明
links

object

リンクの読み取り時ビュー。 参照リンクは読み取り専用であるため、参照リンクは読み取り専用として公開する必要があります。

ReleaseEnvironmentDefinitionReference

リリース環境リソースへの参照。

名前 説明
definitionId

integer

リリース環境定義を含むリリース定義の ID。

environmentDefinitionId

integer

リリース環境定義の ID。

TeamProjectReference

TeamProject への浅い参照を表します。

名前 説明
abbreviation

string

プロジェクトの省略形。

defaultTeamImageUrl

string

既定のチーム ID イメージへの URL。

description

string

プロジェクトの説明 (ある場合)。

id

string

プロジェクト識別子。

lastUpdateTime

string

プロジェクトの最終更新時刻。

name

string

プロジェクト名。

revision

integer

プロジェクトのリビジョン。

state

ProjectState

プロジェクトの状態。

url

string

オブジェクトの完全なバージョンへの URL。

visibility

ProjectVisibility

プロジェクトの可視性。

TestOutcomeSettings

テスト結果の設定

名前 説明
syncOutcomeAcrossSuites

boolean

スイート間で同じテストのテスト結果を表示する方法を構成する値

TestPlan

テスト計画リソース。

名前 説明
_links

ReferenceLinks

関連するリンク

areaPath

string

テスト計画の領域。

buildDefinition

BuildDefinitionReference

このテスト 計画に関連付けられているビルドを生成するビルド定義。

buildId

integer

テスト対象のビルド。

description

string

テスト計画の説明。

endDate

string

テスト計画の終了日。

id

integer

テスト 計画の ID。

iteration

string

テスト計画のイテレーション パス。

name

string

テスト 計画の名前。

owner

IdentityRef

テスト計画の所有者。

previousBuildId

integer

テスト 計画に関連付けられている以前のビルド ID

project

TeamProjectReference

テスト計画を含むプロジェクト。

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

ビルドをデプロイし、このテスト計画から自動テストを実行するために使用されるリリース環境。

revision

integer

テスト計画の改訂。

rootSuite

TestSuiteReference

テスト計画のルート テスト スイート。

startDate

string

テスト計画の開始日。

state

string

テスト計画の状態。

testOutcomeSettings

TestOutcomeSettings

テスト計画の下でテスト スイート間で同じテストを実行する必要がある方法を構成するための値

updatedBy

IdentityRef

テスト 計画の最後の更新に関する ID リファレンス

updatedDate

string

テスト計画の更新日

TestPlanCreateParams

テスト 計画では、パラメーターを作成します。

名前 説明
areaPath

string

テスト計画の領域。

buildDefinition

BuildDefinitionReference

このテスト 計画に関連付けられているビルドを生成するビルド定義。

buildId

integer

テスト対象のビルド。

description

string

テスト計画の説明。

endDate

string

テスト計画の終了日。

iteration

string

テスト計画のイテレーション パス。

name

string

テスト 計画の名前。

owner

IdentityRef

テスト計画の所有者。

releaseEnvironmentDefinition

ReleaseEnvironmentDefinitionReference

ビルドをデプロイし、このテスト計画から自動テストを実行するために使用されるリリース環境。

startDate

string

テスト計画の開始日。

state

string

テスト計画の状態。

testOutcomeSettings

TestOutcomeSettings

テスト計画の下でテスト スイート間で同じテストを実行する必要がある方法を構成するための値

TestSuiteReference

テスト スイート参照リソース。

名前 説明
id

integer

テスト スイートの ID。

name

string

テスト スイートの名前。