Another feature for my Cross Platform Release Notes Azure DevOps Extension–access to test results
Over the weekend I got another new feature for my Cross Platform Release Notes Azure DevOps Extension working. The test results associated with build artefacts or releases are now exposed to Handlebars based templates.
The new objects you can access are:
In builds
tests – all the test run as part of current build
In releases
tests – all the test run as part of any current build artefacts or previous to the running of the release notes task within a release environment
releaseTests – all the test run within a release environment
builds.test - all the test run as part of any build artefacts group by build artefact
These can be used as follows in a release template
1\# Builds with associated WI/CS/Tests ({{builds.length}})
2
3{{#forEach builds}}
4
5{{#if isFirst}}## Builds {{/if}}
6
7## Build {{this.build.buildNumber}}
8
9{{#forEach this.commits}}
10
11{{#if isFirst}}### Commits {{/if}}
12
13\- CS {{this.id}}
14
15{{/forEach}}
16
17{{#forEach this.workitems}}
18
19{{#if isFirst}}### Workitems {{/if}}
20
21\- WI {{this.id}}
22
23{{/forEach}}
24
25{{#forEach this.tests}}
26
27{{#if isFirst}}### Tests {{/if}}
28
29\- Test {{this.id}}
30
31\- Name: {{this.testCase.name}}
32
33\- Outcome: {{this.outcome}}
34
35{{/forEach}}
36
37{{/forEach}}
38
39
40
41\# Global list of tests ({{tests.length}})
42
43{{#forEach tests}}
44
45{{#if isFirst}}### Tests {{/if}}
46
47\* \*\* ID{{this.id}}\*\*
48
49\- Name: {{this.testCase.name}}
50
51\- Outcome: {{this.outcome}}
52
53{{/forEach}}
54
55
For more details see the documentation in the WIKI