allure-framework / allure-js

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

Playwright cucumber allure report issue #982

Closed siva90144 closed 2 months ago

siva90144 commented 6 months ago

I am running my project with Playwright, Cucumber, and Allure Report. I have a feature file as shown below and I am running tests with specific tags, but it is printing all the examples, including those which are not executed.

To Reproduce Steps to reproduce the behavior:

  1. create a feature file like below '@Search @regression Feature: Search - Verify end to end flow I want to verify Search flow

    @actual @validate-e2e @search Scenario Outline: Search - I am able to search in the web "" Given I login the application for "" When I get the page title Then I verify details "" @google Examples: | client | pagetitle | | google | Google | @amazon Examples: | client | pagetitle | | amazon | Amazon | @facebook Examples: | client | pagetitle | | facebook | Facebok | '

    image
  2. I executed the tags with '@search and @amazon' and here is the run command: npm test run --tags="@search and @amazon"

  3. it picked the right scenario and executed only amazon scenario.

  4. but in the reprot its showing all the clinets related to google and facebook along with the amazon

Expected behavior It should display only content related to amazon in example section

Screenshots please see the attached screenshot and highlighted in red color should not be displayed

image

Desktop (please complete the following information):

Additional context please see the attached sample project

Zychkov commented 2 months ago

This issue was reported in the task https://github.com/allure-framework/allure-js/issues/625, but closed with the resolution Fixed in 3.0.0-beta.11. I have updated to version 3.0.1. The bug is still relevant.

baev commented 2 months ago

@Zychkov, are you sure? #625 was about missed parameters for Scenario Outline for cucumbers integration. It was fixed. There is a test: https://github.com/allure-framework/allure-js/blob/main/packages/allure-cucumberjs/test/spec/examples.test.ts (The feature file)

Zychkov commented 2 months ago

@baev, yeah, I'm sure. Feature

Feature: allure-test
  Feature's description

  @example @tms=ABC-222 @issue=ABC-333
  Scenario Outline: Allure Tests
    Given The sum of the numbers <a> and <b> must be equal to <c>

    Examples:
      | a | b | c |
      | 1 | 2 | 3 |
      | 2 | 2 | 4 |

    Examples:
      | a | b | c |
      | 3 | 2 | 5 |
      | 4 | 2 | 7 |

Dependencies:

   "@cucumber/cucumber": "^10.8.0",
    "@cucumber/messages": "^24.1.0",
    "allure-commandline": "^2.30.0",
    "allure-cucumberjs": "^3.0.1",
    "allure-js-commons": "^3.0.1"

How the report looks: image

What I expect it should look like (same scenario, but in Java): image

baev commented 2 months ago

@Zychkov thanks! It wasn't working correctly. I provided a pull request with the fixes https://github.com/allure-framework/allure-js/pull/1153