Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Allure plugin] Add/update to allure2 #2838

Closed
patrjam opened this issue Mar 12, 2021 · 9 comments
Closed

[Allure plugin] Add/update to allure2 #2838

patrjam opened this issue Mar 12, 2021 · 9 comments

Comments

@patrjam
Copy link
Contributor

patrjam commented Mar 12, 2021

Hi,

we want to use this attachments api for screen-diff-plugin with turn on overlay diff for every step:

allure.attachment('screen diff', screenDiffJson, {
   contentType: 'application/vnd.allure.image.diff',
   fileExtension: 'json' 
})

(PR with added API here: allure-framework/allure-js#221)

In codeceptjs repository is actually used very old package version from this repo: https://github.com/allure-framework/allure-js-commons with version

"allure-js-commons": "^1.3.2",

which should be deprecated and code is moved here to another repo: https://github.com/allure-framework/allure-js (latest version 2.0.0-beta.9)

I got info from Allure site, reports actually looks like this:
imagediff.zip
(Just unzip, go to folder and run allure serve .)

@Elverslane
Copy link

+1

@Vorobeyko
Copy link
Collaborator

use enableScreenshotDiffPlugin
https://codecept.io/plugins/#allure

@Elverslane
Copy link

@Vorobeyko no way. Error for code above
Error processing suite.after event: Error: attribute value for name 'type' should be a primitive (string, number, boolean, null, or undefined)

@Vorobeyko
Copy link
Collaborator

Can you send your config file please?

@Elverslane
Copy link

Elverslane commented May 27, 2021

exports.config = {
    tests: './user-scenario/**/*.test.ts',
    output: '../../.codeceptjs-output',
    plugins: {
        screenshotOnFail: {
            enabled: true,
            fullPageScreenshots: true,
        },
        allure: {
            enableScreenshotDiffPlugin: true,
            enabled: true,
            outputDir: '.codeceptjs-output/allure-report',
        },
    },
    helpers: {
        Playwright: {
            url: 'http://localhost:9999',
            waitForTimeout: 8000,
            waitForAction: 200,
            show: !!process.env.VISUAL,
            keepCookies: false,
            restart: true,
            windowSize: '1650x1080',
            browser: 'chromium',
            chromium: {
                args: [
                    '--window-size=1650,1080',
                    '--disable-dev-shm-usage',
                ],
                defaultViewport: {
                    width: 1650,
                    height: 1080,
                },
                executablePath: process.env.CHROMIUM_PATH,
            },
        },
        FileSystem: {},
    },
    include: {
        I: './settings/steps.ts',
    },
    bootstrap: null,
    mocha: {},
    name: 'e2e-tests',
    require: ['ts-node/register', 'tsconfig-paths/register'],
};

@Trawais
Copy link

Trawais commented May 28, 2021

Hi everybody.
I'm talking behalf of patrjam.
We definitely using the flag in the config for the enableScreenshotDiffPlugin option. The problem is it simply does not work. It seems to us the codeceptjs allure plugin is still using allure v1 format for the report. But the screenshot diff plugin in allure dashboard (at least according to the code) seems to consume the allure v2 report. I guess as patrjam mentioned in the description the whole report system must be upgraded from the allure v1 to allure v2. Otherwise the screenshot diff plugin will not work as expected anymore.
If you compare the report placed in the imagediff.zip archive file, you can see the generated report for the allure framework looks completely different (because it's the v2). The codeceptjs allure plugin generates still reports in the v1.
Let me know if we should provide more clarification.

@patrjam
Copy link
Contributor Author

patrjam commented May 28, 2021

For completely information, allure1 has different approach and also different type of format than allure2. Old format for allure1 was xml and for new allure2 is json

@xyngfei
Copy link

xyngfei commented Jun 23, 2021

@patrjam, do you think based on the current codeceptjs v3.0.6 with allure-commandline v2.13.8, possible to generate the json raw test result?

@kobenguyent
Copy link
Collaborator

allure plugin is now maintained by allure team https://github.com/allure-framework/allure-js/tree/master/packages/allure-codeceptjs

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

No branches or pull requests

7 participants