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

Generated reports not compatible with allure2 #46

Open
cinderblock opened this issue Feb 4, 2020 · 5 comments
Open

Generated reports not compatible with allure2 #46

cinderblock opened this issue Feb 4, 2020 · 5 comments

Comments

@cinderblock
Copy link

I'm trying to generate allure reports from the results but allure is giving me an error:
Unknown root element ns2:test-suite.

Example results:

<?xml version='1.0'?>
<ns2:test-suite xmlns:ns2='urn:model.allure.qatools.yandex.ru' start='1580811412000' stop='1580811412079'>
    <name>GitHub Actions Test</name>
    <title>GitHub Actions Test</title>
    <test-cases>
        <test-case start='1580811412001' status='passed' stop='1580811412003'>
            <name>action.yml exists</name>
            <title>action.yml exists</title>
            <labels/>
            <parameters/>
            <steps/>
            <attachments/>
        </test-case>
    </test-cases>
</ns2:test-suite>

Looking around, it looks like maybe allure2 uses json test results instead of xml. Maybe this plugin is only for allure1? But the readme references "allure2". I feel like I'm missing something obvious but I see no references to allure version problems in these issues.

Have people been successful using this with allure2?

My project is FOSS. Checkout the allure verbose output here. Expand the "Generate Allure Report" step to see the output.

@zaqqaz
Copy link
Owner

zaqqaz commented Feb 15, 2020

Nope, this plugin definitely supports allure 2 https://github.com/allure-framework/allure2 but I never tried this with the first version of the reporter.

Can you provide a bit more info and double check version of the allure?

@cinderblock
Copy link
Author

I linked to the repo that is exhibiting the problem with full build logs. I'd be happy to point you to specific things you're looking for.

I believe I'm on allure 2:

https://github.com/cinderblock/github-action-working-directory/blob/ea36ff7ed5392edbdc3a51a86fc71055220f092d/package-lock.json#L1268-L1273


I ended up fixing this by creating my own allure 2 jest result reporter following the allure docs:

https://github.com/cinderblock/github-action-working-directory/blob/master/jest.allure2.js#L1-L10

I am not actually using jest-allure anymore as this was simple enough for me.

@zaqqaz
Copy link
Owner

zaqqaz commented Feb 16, 2020

@cinderblock got it.

If you still need some additional features of jest-allure you can try clone & run tests https://github.com/zaqqaz/visual-unit-tests here and then type allure serve, I believe that everything should be ok, if not please let me know.
Thank you!

@ryparker
Copy link

ryparker commented May 3, 2020

First of all, thanks for creating this package.

Are there any plans to upgrade this module to support recent allure versions? Currently allure-js-commons is version 2.0.0-beta.6 where as this module is still using version 1.3.2. Currently allure results are created as XML and this has some drawbacks such as not supporting PDF attachments. The newest version uses JSON and also supports PDF attachments.

@ryparker
Copy link

ryparker commented May 4, 2020

I ended up forking this repository and implementing the upgraded support. https://github.com/ryparker/jest-allure2

Let me know if you guys would like me to create a PR. Fair warning that the upgrade would be a breaking change for this project.

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

No branches or pull requests

3 participants