Q8 of 17 · Framework design
How do you integrate test reporting (Allure, ExtentReports) into a test framework?
Framework designMidframework-designreportingallureextentreportsci
Short answer
Short answer: Add the reporter library as a dependency, configure it as a listener/plugin, and generate a report artifact in CI. Allure is language-agnostic with a rich UI; ExtentReports is Java/C# focused with simpler setup. Both capture screenshots, logs, and step-level details.
Detail
Allure with Playwright:
npm install --save-dev allure-playwright
// playwright.config.ts
reporter: [['list'], ['allure-playwright', { outputFolder: 'allure-results' }]],
# Generate and open the report
npx allure generate allure-results --clean -o allure-report
npx allure open allure-report
Allure annotations (Playwright):
test('Valid login redirects to dashboard', async ({ page }) => {
await allure.epic('Authentication');
await allure.feature('Login');
await allure.severity(Severity.CRITICAL);
await allure.step('Navigate to login page', async () => { ... });
await allure.step('Submit credentials', async () => { ... });
});
Allure with Maven/JUnit 5:
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>2.27.0</version>
</dependency>
CI integration (GitHub Actions):
- name: Generate Allure Report
run: npx allure generate allure-results --clean -o allure-report
- name: Publish Allure Report
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: allure-report
What good reports capture:
- Pass/fail per test with timing
- Steps within each test (so failures are pinpointed to a specific action)
- Screenshots on failure (attached as report artifacts)
- Environment metadata (browser, OS, build version)
- Historical trend (Allure tracks pass rate across runs)
// WHAT INTERVIEWERS LOOK FOR
Allure setup (dependency + config). CI publishing. Step-level detail and screenshot attachment. Historical trending as a distinguishing feature.