-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added testresults client for TCM (#555)
* added testresults client * Updated package.json * updated package version to 12.1.0
- Loading branch information
1 parent
edb8646
commit 55908ae
Showing
9 changed files
with
5,274 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ These clients are available: | |
* TaskAgent | ||
* Task | ||
* Test | ||
* TestResults | ||
* Tfvc | ||
* Wiki | ||
* Work | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"release", | ||
"task", | ||
"test", | ||
"testResults", | ||
"wiki", | ||
"work", | ||
"workItemTracking" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as common from './common'; | ||
import * as nodeApi from 'azure-devops-node-api'; | ||
|
||
import * as BuildApi from 'azure-devops-node-api/BuildApi'; | ||
import * as CoreApi from 'azure-devops-node-api/CoreApi'; | ||
import * as TestResultsApi from 'azure-devops-node-api/TestResultsApi'; | ||
import * as BuildInterfaces from 'azure-devops-node-api/interfaces/BuildInterfaces'; | ||
import * as CoreInterfaces from 'azure-devops-node-api/interfaces/CoreInterfaces'; | ||
import * as TestInterfaces from 'azure-devops-node-api/interfaces/TestInterfaces'; | ||
|
||
export async function run(createdProjectId: string) { | ||
const projectId: string = common.getProject(); | ||
const webApi: nodeApi.WebApi = await common.getWebApi(); | ||
const testResultsApiObject: TestResultsApi.ITestResultsApi = await webApi.getTestResultsApi(); | ||
const coreApiObject: CoreApi.CoreApi = await webApi.getCoreApi(); | ||
const project: CoreInterfaces.TeamProject = await coreApiObject.getProject(projectId); | ||
|
||
common.banner('Testing Samples'); | ||
|
||
common.heading('Get test suite runs'); | ||
const runs: TestInterfaces.TestRun[] = await testResultsApiObject.getTestRuns(projectId); | ||
console.log('Current Runs:', runs); | ||
|
||
common.heading('Get code coverage'); | ||
const buildApiObject: BuildApi.IBuildApi = await webApi.getBuildApi(); | ||
const defs: BuildInterfaces.DefinitionReference[] = await buildApiObject.getDefinitions(projectId); | ||
console.log('Code coverage for build' + defs[0].id + ':', await testResultsApiObject.getCodeCoverageSummary(projectId, defs[0].id)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
"release.ts", | ||
"task.ts", | ||
"test.ts", | ||
"testResults.ts", | ||
"wiki.ts", | ||
"work.ts", | ||
"workItemTracking.ts" | ||
|