baev / allure-cli-depricated

Allure Command Line Tool
Other
20 stars 7 forks source link

Can't read allure version from XML #36

Closed just-boris closed 9 years ago

just-boris commented 9 years ago

Hello, I am karma-allure-reporter developer. I want to use the latest features of allure and generate following xml:

<?xml version="1.0" encoding="UTF-8"?>
<ns2:test-suite xmlns:ns2="urn:model.allure.qatools.yandex.ru" start="1430820712959" stop="1430820712978" version="1.4.11">
    <name>A mocha suite</name>
    <title>A mocha suite</title>
    <test-cases>
        <test-case start="1430820712960" stop="1430820712964" status="broken">
            <name>broken test</name>
            <title>broken test</title>
            <description/>
            <failure>
                <message>Unknown error</message>
                <stack-trace>Error: Unknown error
    at Context.&lt;anonymous&gt; (test/fixtures/simple.spec.js:14:15)</stack-trace>
            </failure>
        </test-case>
    </test-cases>
</ns2:test-suite>

As you can see, I implicitly declare which version of Allure needed to generate this report. Then I run the following command

$ allure generate alure-results/

and I got the following

Error on line 196
  XTDE0410: An attribute node (version) cannot be created after the children of the containing element
  at xsl:call-template name="copy-all-without-namespace" (#192)
  at xsl:apply-templates (#27)
     processing /alr:allure-test-run/test-suites[1]/test-suite[1]/@version
  at xsl:apply-templates (#197)
     processing /alr:allure-test-run/test-suites[1]/test-suite[1]
  at xsl:call-template name="copy-all-without-namespace" (#192)
  at xsl:apply-templates (#14)
     processing /alr:allure-test-run/test-suites[1]
  in built-in template rule
java.lang.reflect.InvocationTargetException

What am I doing wrong? /cc @baev @eroshenkoam

baev commented 9 years ago

O dear sir could you please specify version of report you would like generate? Use

$ allure generate -v 1.4.11 alure-results/

For more details see https://github.com/allure-framework/allure-cli

baev commented 9 years ago

the issue fixed in new command line tool. See http://wiki.qatools.ru/display/AL/Allure+CLI