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

Before installing the extension, make sure that the Allure Report command-line tool is installed in your operating system.

  1. Launch Visual Studio Code.

  2. Open the Extensions view.

  3. In the Search Extensions in Marketplace field, enter qameta.allure-vscode.

  4. Click on the Allure Support extension, then click Install.

  5. Wait for the installation to complete.

Generating and serving test reports

The extension provides three operations.

Generate and serve a test report

  1. 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.

  2. 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.

  3. 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 browser Open the test report in the default web browser.
    Shutdown server Stop the local web server.

Generate a test report

  1. 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.

  2. 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.

  3. 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

  1. Make sure that you have a previously generated directory with the HTML test report.

  2. In the Explorer view, right-click on the report directory and select Allure Report: serve generated report.

  3. 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 browser Open the test report in the default web browser.
    Shutdown server Stop the local web server.
Powered by
logo

Join our newsletter

Join our community

We aim to make Allure Report as reliable and user-friendly as possible, and together with the community, we're here to help when problems arise.

© 2024 Qameta Software Inc. All rights reserved.