How to export Azure DevOps test cases and test results to PDF
Michael Thomsen
·6 min read
Short answer: Azure Test Plans exports a test plan or suite to PDF through the Export option, limited to 75 suites, 1 MB and no attachments. Test cases export to CSV or XLSX. Test runs have no export at all. A test report with steps, expected results, attachments and outcomes in one document needs the REST API or an extension that renders test cases through a template.
Microsoft Q&A threads from 2025 ask the same two things: "How do I export test runs?" and "How do I get the test cases with steps into a document?". Microsoft's answers point to the REST API, a third-party tool, or copying the export's print view into Word. QA leads in regulated industries, consultancies that hand test evidence to clients, and teams running user acceptance tests all hit this wall.
What the built-in export does
Open a test plan or suite in Azure Test Plans, choose Export, and you get an email or a print view of the plan and suite properties with the test cases and their latest outcome. According to Microsoft's Test Plans FAQ (checked November 2026):
- A maximum of 75 test suites per export.
- A maximum of 1 MB of data.
- Attachments are not exported.
- Word is not supported; the suggested workaround is to copy the print view and paste it into Word.
For test cases alone, the suite grid exports to CSV or XLSX with one row per test step, including step action and expected result. That is a good interchange format and a poor reading format.
For test runs and results, Microsoft confirmed in May 2025 that there is no export or print button on the Runs tab. The suggested workarounds are the REST API (test runs and test results endpoints), a third-party tool, or manual copying.
What a test report actually needs
Ask the person who requested the document. The usual list, whether it comes from a customer, an ISO auditor or an internal release board, is:
- A title page with the product, version, date and author.
- The scope: which requirements or user stories were tested.
- Each test case with its steps, expected results and the attachments the tester added (screenshots, log files).
- The outcome per test case and per run, with who ran it and when.
- A summary table: total, passed, failed, blocked, not run.
- Open defects linked to failed tests.
The built-in export covers items 3 and 4 partially and skips the rest.
Option 1: Export, then edit in Word
Use the Export option, open the print view, copy, paste into Word, add a cover page and a summary table by hand. It works for a one-off report with a few suites. It breaks the first time someone asks for the report again next week, and it never includes attachments.
Option 2: Script the REST API
The Test Plans REST API exposes test plans, suites, test cases (as work items with a Steps field in XML), test points and test results. A script can pull all of it and render a document. Expect to write code for parsing the steps XML, downloading attachments with a token, and matching results to cases. Teams that already own an internal reporting pipeline can bolt this on; everyone else ends up maintaining a script that only one person understands.
Option 3: Render test cases through a template
Bravo Notes is a paid Azure DevOps extension (30-day trial; Test Plans integration is included from the Business plan) that treats test cases as what they are, work items, and adds helpers for test steps, attachments and test results. You add the test cases with a query (for example all test cases under an area path or with a tag), write a template once, and export the document as PDF, HTML or Markdown.
Template: test case checklist with steps and attachments
# Test report: {{ param 'ProductName' }} {{ param 'Version' }}
Prepared {{ date 'dd mmm yyyy' }}.
{{#workItems orderBy='Id'}}
## {{ id }}: {{ field 'Title' }}
**State:** {{ field 'State' }}
**Area:** {{{ areaPath }}}
<table>
<thead>
<tr><th>#</th><th>Step</th><th>Expected result</th><th>Attachments</th></tr>
</thead>
<tbody>
{{#testSteps}}
<tr>
<td>{{ no }}</td>
<td>{{{ step }}}</td>
<td>{{{ expectedResult }}}</td>
<td>
{{#attachments}}
- [{{ title }}]({{ url }})
{{/attachments}}
</td>
</tr>
{{/testSteps}}
</tbody>
</table>
{{/workItems}}
ProductName and Version are parameters you fill in before exporting, so the same template serves every release.
Template: requirements with their tests
Auditors ask "which tests cover this requirement?". The linkSection helper follows the Tested By link from a user story to its test cases and prints a warning when a requirement has none:
{{#workItems '$UserStory'}}
## {{ field 'Title' }} ({{ id }})
{{#linkSection 'Microsoft.VSTS.Common.TestedBy-Forward'}}
### Covered by
{{#workItems}}
- {{ id }}: {{ field 'Title' }} ({{ field 'State' }})
{{/workItems}}
{{else}}
**No test case is linked to this requirement.**
{{/linkSection}}
{{/workItems}}
Run it against the sprint's user stories and you have the traceability section of the report, with the gaps highlighted instead of hidden.
Template: outcome summary for a suite
Test outcomes come from Azure Test Plans rather than from the work item, so Bravo Notes reads them with the testCaseSummary helper. It takes the plan and suite IDs from the Test Plans URL and returns the counts for the suite:
{{#testCaseSummary testPlanId=112 testSuiteId=118}}
| Total | Passed | Failed | Blocked | Not run |
|-------|--------|--------|---------|---------|
| {{ totalTests }} | {{ passedTests }} | {{ failedTests }} | {{ blockedTests }} | {{ notExecutedTests }} |
{{/testCaseSummary}}
Add configurationName='Production' to count only the points run against one test configuration, which is how teams split validated and non-validated environments. The per-test-case outcome and the step results are available through the testCaseResult and testStepResult helpers; ask support for the test report sample template that combines them with the step table above.
Export options that matter for test reports
- PDF with cover page, table of contents, page numbers and header or footer text for "Confidential" or document IDs.
- Email the PDF to the customer or post it to a Microsoft Teams channel directly from the export dialog.
- Build task to generate the report in a pipeline after a test run, and publish it to a Wiki page or a repository folder for evidence retention (build task options).
Frequently asked questions
Can Azure DevOps export test results to PDF? Not from the Runs tab. The Export option on a test plan includes the latest outcome per test case, but it is limited to 75 suites, 1 MB and no attachments. Full result reports need the REST API or an extension.
Can I export test cases with their steps to Word? Microsoft's suggested route is CSV or XLSX export, or copying the plan's print view into Word. Template-based tools render steps and expected results into HTML and PDF directly; the HTML opens in Word if a .docx is required.
Does the export include screenshots attached to test steps? The built-in export does not. Bravo Notes lists step attachments with the attachments helper and embeds images from work item fields.
How do I show which requirements have no tests? Query the user stories and follow the Tested By link in the template. A section that prints a fallback message when the link list is empty gives you the gap list without a separate query.
Can the report be generated automatically after each test run? Yes, with a pipeline. The Bravo Notes build task takes work items from a query, renders the template and publishes the PDF or Markdown to a file, Wiki, repository or Confluence page.
Summarize this article