allure-framework / allure-js

Allure integrations for JavaScript test frameworks
https://allurereport.org/
Apache License 2.0
225 stars 122 forks source link

How to output "Executions" to report #1172

Open ebisawage opened 5 days ago

ebisawage commented 5 days ago

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.

baev commented 4 days ago

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

ebisawage commented 2 hours ago

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.