allure-framework / allure-js

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

Support playwright runtime annotations #1188

Open ZakiZoubian opened 1 day ago

ZakiZoubian commented 1 day ago

Can we add support for playwright runtime annotations? https://playwright.dev/docs/test-annotations

image

For example:

testInfo.annotations.push({ type: 'test_key', description: 'KEY-123' });

test.info().annotations.push( { type: 'browser version', description: '1.0.0', });

In the html report they show like this: image

Related to: #661 #490

ZakiZoubian commented 1 day ago

Also, would be nice if we can support other test annotations not just skip or fixme. Test annotations can be any combination of type/description:

import { test, expect } from '@playwright/test';

test('test login page', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/23180', }, }, async ({ page }) => { // ... });

ohlori commented 12 hours ago

+1 on this!