Skip to content

allure-cypress@3.7.2 incorrectly generates "skipped" results with "This is a pending test" for passing tests #1464

@raymond-julie

Description

@raymond-julie

Describe the bug
When running Cypress tests with allure-cypress@3.7.2, the Allure report shows a discrepancy between Cypress results and Allure results.

Cypress reports 0 skipped tests (all tests pass), but Allure Report shows 14+ "skipped" tests with the status detail message:
"This is a pending test"

Investigation reveals that allure-cypress creates multiple result files for a single test execution. While the final test status is correctly reported as passed, intermediate or incorrectly handled lifecycle events generate extra JSON files with:

  • "status": "skipped"
  • "message": "This is a pending test"

This string is hardcoded in packages/allure-cypress/src/browser/utils.ts in the getTestSkipData() function.


To Reproduce
Steps to reproduce the behavior:

  1. Setup a Cypress project with allure-cypress@3.7.2 (or 3.4.3)
  2. Configure cypress.config.js to run against a target (no explicit retries needed in config)
  3. Run tests:
    cypress run --reporter allure-cypress/reporter
  4. Generate Allure report:
    allure generate cypress/allure/results -o cypress/allure/reports
  5. Open the report and check the "Suites" or "Categories" section

Expected behavior
The Allure report should reflect the exact Cypress output.

If Cypress reports:
52 passing and 0 pending/skipped

Then Allure should also show:
52 passing and 0 skipped

No extra "pending test" artifacts should be created.


Screenshots
N/A (Log evidence below)


Desktop

  • OS: Linux (Ubuntu / Alpine in Kubernetes / GitLab Runner)
  • Browser: Chrome 143 (Headless)
  • Version: allure-cypress@3.7.2, Cypress@15.11.0, Node@24.12.0

Additional context

Root Cause Analysis:

  • The message originates from getTestSkipData() in packages/allure-cypress/src/browser/utils.ts
  • In lifecycle.js (reportTestSkip function), the logic seems to emit "skipped" events even when the test eventually passes or when handling the retry lifecycle
  • retriesCount in the final JSON is present, but intermediate attempts are written as separate files with:
    "status": "skipped" + "message": "This is a pending test"

Pipeline Output (Cypress):
Spec Ran: forms.cy.js
Tests: 10 | Passing: 10 | Failing: 0 | Pending: 0 | Skipped: 0

Allure Statistics (Generated):
{ total: 52, retries: 15, skipped: 14, passed: 38 }

Corrupted Result File Sample:
{
name: "should load Rent Universe (/location-appartement)",
status: "skipped",
statusDetails: { message: "This is a pending test" }
}

Impact:
This breaks CI pipelines using Allure Report quality gates (e.g., "No skipped tests allowed") even though the test suite is fully green in Cypress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions