Appearance
Visual Studio Code integration
With the Allure extension for the Visual Studio Code, you can quickly generate and open test reports from its context menu.
The extension also provides a way to quickly upload test results to your Allure TestOps account, see the Allure TestOps documentation.
Installation
WARNING
Before installing the extension, make sure that the Allure Report command-line tool is installed in your operating system.
Launch Visual Studio Code.
Open the Extensions view.
In the Search Extensions in Marketplace field, enter
qameta.allure-vscode
.Click on the Allure Support extension, then click Install.
Wait for the installation to complete.
Generating and serving test reports
The extension provides three operations.
- Generate and serve a test report: given the test results, view a report in the browser.
- Just generate a test report: given the test results, generate a report directory.
- Just serve an existing test report: given the report directory, view it in the browser.
Generate and serve a test report
Run your tests as you would do normally.
Assuming an Allure adapter is configured correctly in your project, this must produce a test results directory at
allure-results
,build/allure-results
or other location, depending on the configuration.In the Explorer view, right-click on the test results directory and select Allure Report: serve test results.
The test report will be generated in a temporary directory (outside of your project). A local web server for the directory will be automatically started.
In the Allure view, find the item with the same name as the test results directory.
Hover the item to see the available actions:
Action Description Open the test report in the default web browser. Stop the local web server.
Generate a test report
Run your tests as you would do normally.
Assuming an Allure adapter is configured correctly in your project, this must produce a test results directory at
allure-results
,build/allure-results
or other location, depending on the configuration.In the Explorer view, right-click on the test results directory and select Allure Report: generate report.
The test report will be generated in a new directory named
allure-report-⟨DATE⟩_⟨TIME⟩
, for example:allure-report-2023-05-23_08-37-17
.To start a local server for viewing the report, right-click on the test report directory and select Allure Report: serve generated report.
Serve an existing test report
Make sure that you have a previously generated directory with the HTML test report.
In the Explorer view, right-click on the report directory and select Allure Report: serve generated report.
In the Allure view, find the item with the same name as the report directory.
Hover the item to see the available actions:
Action Description Open the test report in the default web browser. Stop the local web server.