allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

How to output "Executions" to report

Open ebisawage opened this issue 1 year ago • 2 comments

I am currently following the documentation provided at https://allurereport.org/docs/jest/ to generate test reports using allure-jest for Jest testing. However, unless I explicitly define steps like allure.step(~) within my tests, the Execution section of the report shows the message: “No information about test execution is available.”

Could you please guide me on how to automatically populate the Execution details in the Allure report without manually defining the steps?

For your reference, here is the current configuration of my jest.config.ts:

module.exports = {
    preset: "ts-jest",
    testEnvironment: "allure-jest/node",
    testMatch: ["**/*.test.ts"],
    verbose: true,
};

package.json is here

{
    "name": "api-test",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
        "test": "npx jest --config jest.config.ts",
    },
    "keywords": [],
    "author": "",
    "license": "ISC",
    "devDependencies": {
        "@types/jest": "^29.5.12",
        "@types/properties-reader": "^2.1.3",
        "@types/supertest": "^6.0.2",
        "allure-commandline": "^2.29.0",
        "allure-jest": "^3.0.5",
        "allure-js-commons": "^3.0.5",
        "eslint": "^8.57.0",
        "eslint-config-prettier": "^8.5.0",
        "eslint-plugin-playwright": "^1.6.2",
        "eslint-plugin-prettier": "^5.2.1",
        "eslint-plugin-simple-import-sort": "^12.1.0",
        "jest": "^29.7.0",
        "jest-environment-node": "^29.7.0",
        "prettier": "^3.3.2",
        "properties-reader": "^2.3.0",
        "swagger2openapi": "^7.0.8",
        "ts-jest": "^29.1.5",
        "ts-node": "^10.9.2",
        "tsconfig-paths-jest": "^0.0.1",
        "typescript": "^5.4.5"
    }
}

I would greatly appreciate any advice or suggestions you can provide on this matter.

ebisawage avatar Oct 17 '24 09:10 ebisawage

What details would you like to be added to the report automatically?

baev avatar Oct 18 '24 10:10 baev

What details would you like to be added to the report automatically?

I would like to be added expect() and implementation details, etc. For example, when I execute playwright test, report is look like this picture. image

I'm writing an API test, so it would be great to know the details of the request.

ebisawage avatar Oct 23 '24 01:10 ebisawage

Some test frameworks (e.g., Playwright or Cypress) automatically report performed actions as steps, while others do not.

To add information about executed HTTP requests, you may add custom interceptor and log requests and responses to Allure using Runtime API.

We will provide official integrations for the most popular Node HTTP clients (as we did in Allure Java), but there is no ETA yet.

baev avatar Jan 16 '25 13:01 baev