Package org.azd.test
Class TestApi
java.lang.Object
org.azd.test.TestApi
- All Implemented Interfaces:
TestDetails
-
Constructor Summary
ConstructorDescriptionTestApi
(Connection connection) Pass the connection object to work with Service hooks Api -
Method Summary
Modifier and TypeMethodDescriptioncreateTestRun
(RunCreateModel runCreateModel) Create new test run.deleteTestRun
(int runId) Delete a test run by its ID.getTestRunById
(int runId) Get a test run by its ID.Get a list of test runs.getTestRuns
(int top) Get a list of test runs.getTestRuns
(int skip, int top, boolean automated, String buildUri, boolean includeRunDetails, String owner, int planId, String tmiRunId) Get a list of test runs.getTestRuns
(String buildUri) Get a list of test runs.getTestRunStatistics
(int runId) Get test run statistics , used when we want to get summary of a run by outcome.queryTestRuns
(String maxLastUpdatedDate, String minLastUpdatedDate) Query Test Runs based on filters.queryTestRuns
(String maxLastUpdatedDate, String minLastUpdatedDate, int top) Query Test Runs based on filters.queryTestRuns
(String maxLastUpdatedDate, String minLastUpdatedDate, String[] buildIds) Query Test Runs based on filters.queryTestRuns
(String maxLastUpdatedDate, String minLastUpdatedDate, String branchName, String[] buildDefIds, String continuationToken, boolean isAutomated, String[] planIds, TestRunPublishContext publishContext, String[] releaseDefIds, String[] releaseEnvDefIds, String[] releaseEnvIds, String[] releaseIds, String runTitle) Query Test Runs based on filters.queryTestRuns
(String maxLastUpdatedDate, String minLastUpdatedDate, TestRunState testRunState) Query Test Runs based on filters.updateTestRun
(int runId, TestRun testRun) Update test run by its ID.
-
Constructor Details
-
TestApi
Pass the connection object to work with Service hooks Api- Parameters:
connection
- Connection object
-
-
Method Details
-
createTestRun
Create new test run.- Specified by:
createTestRun
in interfaceTestDetails
- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api Exception handler.
-
getTestRunById
Get a test run by its ID.- Specified by:
getTestRunById
in interfaceTestDetails
- Parameters:
runId
- ID of the run to get.- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api Exception handler.
-
getTestRuns
Get a list of test runs.- Specified by:
getTestRuns
in interfaceTestDetails
- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api Exception handler.
-
getTestRuns
Get a list of test runs.- Specified by:
getTestRuns
in interfaceTestDetails
- Parameters:
top
- Number of test runs to return.- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api Exception handler.
-
getTestRuns
Get a list of test runs.- Specified by:
getTestRuns
in interfaceTestDetails
- Parameters:
buildUri
- URI of the build that the runs used.- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api Exception handler.
-
getTestRuns
public TestRuns getTestRuns(int skip, int top, boolean automated, String buildUri, boolean includeRunDetails, String owner, int planId, String tmiRunId) throws AzDException Get a list of test runs.- Specified by:
getTestRuns
in interfaceTestDetails
- Parameters:
skip
- Number of test runs to skip.top
- Number of test runs to return.automated
- If true, only returns automated runs.buildUri
- URI of the build that the runs used.includeRunDetails
- If true, include all the properties of the runs.owner
- Team foundation ID of the owner of the runs.planId
- ID of the test plan that the runs are a part of.tmiRunId
- None- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api Exception handler.
-
getTestRunStatistics
Get test run statistics , used when we want to get summary of a run by outcome.- Specified by:
getTestRunStatistics
in interfaceTestDetails
- Parameters:
runId
- ID of the run to get.- Returns:
- TestRunStatistic Object
TestRunStatistic
- Throws:
AzDException
- Default Api Exception handler.
-
deleteTestRun
Delete a test run by its ID.- Specified by:
deleteTestRun
in interfaceTestDetails
- Parameters:
runId
- ID of the run to delete.- Throws:
AzDException
- Default Api Exception handler.
-
queryTestRuns
public TestRuns queryTestRuns(String maxLastUpdatedDate, String minLastUpdatedDate) throws AzDException Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.- Specified by:
queryTestRuns
in interfaceTestDetails
- Parameters:
maxLastUpdatedDate
- Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).minLastUpdatedDate
- Minimum Last Modified Date of run to be queried (Mandatory).- Returns:
- TestRuns Object
TestRuns
- Throws:
AzDException
- Default Api Exception handler.
-
queryTestRuns
public TestRuns queryTestRuns(String maxLastUpdatedDate, String minLastUpdatedDate, int top) throws AzDException Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.- Specified by:
queryTestRuns
in interfaceTestDetails
- Parameters:
maxLastUpdatedDate
- Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).minLastUpdatedDate
- Minimum Last Modified Date of run to be queried (Mandatory).top
- Number of runs to be queried. Limit is 100.- Returns:
- TestRuns Object
TestRuns
- Throws:
AzDException
- Default Api Exception handler.
-
queryTestRuns
public TestRuns queryTestRuns(String maxLastUpdatedDate, String minLastUpdatedDate, String[] buildIds) throws AzDException Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.- Specified by:
queryTestRuns
in interfaceTestDetails
- Parameters:
maxLastUpdatedDate
- Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).minLastUpdatedDate
- Minimum Last Modified Date of run to be queried (Mandatory).buildIds
- Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).- Returns:
- TestRuns Object
TestRuns
- Throws:
AzDException
- Default Api Exception handler.
-
queryTestRuns
public TestRuns queryTestRuns(String maxLastUpdatedDate, String minLastUpdatedDate, TestRunState testRunState) throws AzDException Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.- Specified by:
queryTestRuns
in interfaceTestDetails
- Parameters:
maxLastUpdatedDate
- Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).minLastUpdatedDate
- Minimum Last Modified Date of run to be queried (Mandatory).testRunState
- Current state of the Runs to be queried.- Returns:
- TestRuns Object
TestRuns
- Throws:
AzDException
- Default Api Exception handler.
-
queryTestRuns
public TestRuns queryTestRuns(String maxLastUpdatedDate, String minLastUpdatedDate, String branchName, String[] buildDefIds, String continuationToken, boolean isAutomated, String[] planIds, TestRunPublishContext publishContext, String[] releaseDefIds, String[] releaseEnvDefIds, String[] releaseEnvIds, String[] releaseIds, String runTitle) throws AzDException Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.- Specified by:
queryTestRuns
in interfaceTestDetails
- Parameters:
maxLastUpdatedDate
- Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).minLastUpdatedDate
- Minimum Last Modified Date of run to be queried (Mandatory).branchName
- Source Branch name of the Runs to be queried.buildDefIds
- Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).continuationToken
- continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user.isAutomated
- Automation type of the Runs to be queried.planIds
- Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).publishContext
- PublishContext of the Runs to be queried.releaseDefIds
- Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).releaseEnvDefIds
- Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).releaseEnvIds
- Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).releaseIds
- Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).runTitle
- Run Title of the Runs to be queried.- Returns:
- TestRuns Object
TestRuns
- Throws:
AzDException
- Default Api Exception handler.
-
updateTestRun
Update test run by its ID.- Specified by:
updateTestRun
in interfaceTestDetails
- Parameters:
runId
- ID of the run to update.testRun
-TestRun
object.- Returns:
- TestRun Object
TestRun
- Throws:
AzDException
- Default Api exception handler.
-