Skip to content

Conversation

@p-perepelytsia
Copy link

Set up Allure Reporter for CoffeeCart Test Framework

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Decision: Request changes — Core checklist item 3.2 (requirement 1.3) is not met, which is a critical blocker for the task.

Critical issues to fix (blockers):

  1. Missing Allure hierarchy attributes in tests (checklist 3.2 / requirement 1.3)

    • Why: Allure report hierarchy depends on parentSuite, suite, subSuite. Without them, reports are disorganized and the requirement is unmet.
    • Where and what to change:
      • tests/adminSite/editMenu/coffeeCupAddedToTotal.spec.js
        • At the start of the test (e.g., line 8 right after test(...) begins), add:
          • allure.label('parentSuite', 'Admin Site')
          • allure.label('suite', 'Edit Menu')
          • allure.label('subSuite', 'Add Coffee')
      • tests/customerSite/cart/addToCart/coffeeCupAddedToCart.spec.js
        • At the start of each test block (e.g., lines 8, 25 if multiple tests), add appropriate labels, for example:
          • parentSuite: Customer Site
          • suite: Cart
          • subSuite: Add To Cart
      • tests/customerSite/cart/updateCart/cartUpdatedAfterClickingMinusButton.spec.js
        • At the start of the test (e.g., line 8):
          • parentSuite: Customer Site
          • suite: Cart
          • subSuite: Update Cart - Minus
      • tests/customerSite/cart/updateCart/cartUpdatedAfterClickingPlusButton.spec.js
        • At the start of the test (e.g., line 8):
          • parentSuite: Customer Site
          • suite: Cart
          • subSuite: Update Cart - Plus
      • tests/customerSite/menu/addCoffee/coffeeCupAddedToTotal.spec.js
        • At the start of the test (e.g., line 8):
          • parentSuite: Customer Site
          • suite: Menu
          • subSuite: Add Coffee
      • tests/customerSite/menu/viewCoffee/coffeeCupHasCorrectCost.spec.js
        • At the start of the test (e.g., line 8):
          • parentSuite: Customer Site
          • suite: Menu
          • subSuite: View Coffee
    • How: Use Allure API (already imported). Example:
      • import { allure } from 'allure-playwright' or import { allure } from 'allure-js-commons' depending on your current import, then inside each test body:
        • allure.label('parentSuite', '...')
        • allure.label('suite', '...')
        • allure.label('subSuite', '...')
  2. Duplicate reporter property in Playwright config

    • File: playwright.config.js
    • Why: Duplicate reporter keys can be confusing; only the last one is used.
    • What to change: Remove the earlier reporter: [['list']], at line ~12 and keep the later one that includes both list and allure-playwright.

What you did well:

  • Allure reporter is correctly configured and included.
  • Severity and Behaviours (epic, feature, story) are consistently set across tests.
  • Dependencies and .gitignore setup look solid.

Please address the hierarchy labels and the duplicate reporter entry. Once updated, this should fully meet the requirements. Great work overall—just a small but important push to complete the Allure hierarchy setup!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

import * as allure from "allure-js-commons";

test(`New coffee can be added to the Menu`, async ({}) => {
test(`New coffee can be added to the Menu`, async ({}) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not set the Allure hierarchy attributes: parentSuite, suite, and subSuite. This violates checklist item 3.2: "Allure hierarchy attributes must be set in code for each test: parentSuite, suite, subSuite." Add these attributes using the Allure API at the start of the test.

import * as allure from "allure-js-commons";
import { COFFEE_NAMES } from '../../../../src/constants';

test('Cart updated correctly after clicking minus for drinks', async ({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not set the Allure hierarchy attributes: parentSuite, suite, and subSuite. This violates checklist item 3.2: "Allure hierarchy attributes must be set in code for each test: parentSuite, suite, subSuite." Add these attributes using the Allure API at the start of the test.

}

testParameters.forEach(({ coffee, price }) => {
test(`Total cost is updated after clicking the ${coffee} cup`, async ({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not set the Allure hierarchy attributes: parentSuite, suite, and subSuite. This violates checklist item 3.2: "Allure hierarchy attributes must be set in code for each test: parentSuite, suite, subSuite." Add these attributes using the Allure API at the start of each test.

}

testParameters.forEach(({ coffee, price }) => {
test(`The ${coffee} cup has correct cost`, async ({ menuPage }) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not set the Allure hierarchy attributes: parentSuite, suite, and subSuite. This violates checklist item 3.2: "Allure hierarchy attributes must be set in code for each test: parentSuite, suite, subSuite." Add these attributes using the Allure API at the start of each test.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Decision: APPROVE

Your Playwright + Allure integration is complete and meets all core requirements. The Playwright config correctly uses the Allure reporter without duplication, and running npx playwright test will generate allure-results at the project root. Every test includes Allure hierarchy (parentSuite, suite, subSuite), behavior (epic, feature, story), and severity labels, ensuring proper population of the Suites, Behaviors, and Severity views in the Allure report. The .gitignore includes /allure-results/, and there are no hardcoded paths or blockers.

Minor (optional) improvements you could explore next:

  • Add Allure steps, attachments (screenshots, traces), and links for even richer reports.
  • Consider adding additional Playwright projects (e.g., WebKit/Firefox or mobile emulation) if cross-browser coverage is desired.

Great job tightening up the configuration and consistency across tests. This is production-ready for reporting needs!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants