qunit-reporter-junit是否生成与junit兼容的xml? [英] Does qunit-reporter-junit generate junit compatible xml?

查看:79
本文介绍了qunit-reporter-junit是否生成与junit兼容的xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是使用qunit-reporter-junit生成以下XML:

I just used qunit-reporter-junit to generate the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="http://w188823.example.com:9001/test/workflow.cloning?out=xml" hostname="localhost" tests="19" failures="2" errors="0" time="0.357" timestamp="2013-07-16T19:52:00Z">
<testsuite id="0" name="workflow.cloning.test" hostname="localhost" tests="4" failures="0" errors="0" time="0.002" timestamp="2013-07-16T19:52:00Z">
<testcase name="has schedule departure date predicate" tests="4" failures="0" errors="0" time="0.002" timestamp="2013-07-16T19:52:00Z">
</testcase>
</testsuite>
<testsuite id="1" name="workflow.cloning.test" hostname="localhost" tests="8" failures="0" errors="0" time="0.001" timestamp="2013-07-16T19:52:00Z">
<testcase name="has effective date predicate" tests="4" failures="0" errors="0" time="0.001" timestamp="2013-07-16T19:52:00Z">
</testcase>
</testsuite>
<testsuite id="2" name="workflow.cloning.test" hostname="localhost" tests="12" failures="0" errors="0" time="0.001" timestamp="2013-07-16T19:52:00Z">
<testcase name="has origin and destination predicate" tests="4" failures="0" errors="0" time="0.001" timestamp="2013-07-16T19:52:00Z">
</testcase>
</testsuite>
<testsuite id="3" name="workflow.cloning.test" hostname="localhost" tests="13" failures="1" errors="0" time="0" timestamp="2013-07-16T19:52:00Z">
<testcase name="has AFE detour number predicate" tests="1" failures="1" errors="0" time="0" timestamp="2013-07-16T19:52:00Z">
<failure type="AssertionFailedError" message="Died on test #1: &apos;undefined&apos; is not an object (evaluating &apos;data.cloneParams.fromCategory&apos;)" />
</testcase>
<system-out>
<![CDATA[
[workflow.cloning.test, has AFE detour number predicate, 1] Died on test #1: 'undefined' is not an object (evaluating 'data.cloneParams.fromCategory')
]]>
</system-out>
</testsuite>
<testsuite id="4" name="workflow.cloning.test" hostname="localhost" tests="14" failures="2" errors="0" time="0" timestamp="2013-07-16T19:52:00Z">
<testcase name="has scenarios predicate" tests="1" failures="1" errors="0" time="0" timestamp="2013-07-16T19:52:00Z">
<failure type="AssertionFailedError" message="Died on test #1: &apos;undefined&apos; is not an object (evaluating &apos;data.cloneParams.fromCategory&apos;)" />
</testcase>
<system-out>
<![CDATA[
[workflow.cloning.test, has scenarios predicate, 1] Died on test #1: 'undefined' is not an object (evaluating 'data.cloneParams.fromCategory')
]]>
</system-out>
</testsuite>
<testsuite id="5" name="workflow.cloning.test" hostname="localhost" tests="19" failures="2" errors="0" time="0.001" timestamp="2013-07-16T19:52:00Z">
<testcase name="clone warning in comments predicate" tests="5" failures="0" errors="0" time="0.001" timestamp="2013-07-16T19:52:00Z">
</testcase>
</testsuite>
</testsuites>

但是当我运行它和xsd时,我在以下位置找到了它: http://www.freeformatter.com/xml-validator-xsd.html

But when I run it, and the xsd I found at: https://svn.jenkins-ci.org/trunk/hudson/dtkit/dtkit-format/dtkit-junit-model/src/main/resources/com/thalesgroup/dtkit/junit/model/xsd/junit-4.xsd (which is appropriate as we are using Jenkins), through the validator at this site: http://www.freeformatter.com/xml-validator-xsd.html

它报告以下错误.那么qunit-reporter-junit是否真的生成兼容的xml?还有其他方法可以验证这一点吗?

It reports the errors below. So is qunit-reporter-junit really generating compliant xml? Are there other ways I could be validating this?

Cvc-complex-type.3.2.2: Attribute 'hostname' Is Not Allowed To Appear In Element 'testsuites'.. Line '2', Column '181'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testsuites'.. Line '2', Column '181'.
Cvc-complex-type.3.2.2: Attribute 'tests' Is Not Allowed To Appear In Element 'testcase'.. Line '4', Column '136'.
Cvc-complex-type.3.2.2: Attribute 'failures' Is Not Allowed To Appear In Element 'testcase'.. Line '4', Column '136'.
Cvc-complex-type.3.2.2: Attribute 'errors' Is Not Allowed To Appear In Element 'testcase'.. Line '4', Column '136'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testcase'.. Line '4', Column '136'.
Cvc-complex-type.3.2.2: Attribute 'tests' Is Not Allowed To Appear In Element 'testcase'.. Line '8', Column '127'.
Cvc-complex-type.3.2.2: Attribute 'failures' Is Not Allowed To Appear In Element 'testcase'.. Line '8', Column '127'.
Cvc-complex-type.3.2.2: Attribute 'errors' Is Not Allowed To Appear In Element 'testcase'.. Line '8', Column '127'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testcase'.. Line '8', Column '127'.
Cvc-complex-type.3.2.2: Attribute 'tests' Is Not Allowed To Appear In Element 'testcase'.. Line '12', Column '135'.
Cvc-complex-type.3.2.2: Attribute 'failures' Is Not Allowed To Appear In Element 'testcase'.. Line '12', Column '135'.
Cvc-complex-type.3.2.2: Attribute 'errors' Is Not Allowed To Appear In Element 'testcase'.. Line '12', Column '135'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testcase'.. Line '12', Column '135'.
Cvc-complex-type.3.2.2: Attribute 'tests' Is Not Allowed To Appear In Element 'testcase'.. Line '16', Column '126'.
Cvc-complex-type.3.2.2: Attribute 'failures' Is Not Allowed To Appear In Element 'testcase'.. Line '16', Column '126'.
Cvc-complex-type.3.2.2: Attribute 'errors' Is Not Allowed To Appear In Element 'testcase'.. Line '16', Column '126'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testcase'.. Line '16', Column '126'.
Cvc-complex-type.3.2.2: Attribute 'tests' Is Not Allowed To Appear In Element 'testcase'.. Line '26', Column '118'.
Cvc-complex-type.3.2.2: Attribute 'failures' Is Not Allowed To Appear In Element 'testcase'.. Line '26', Column '118'.
Cvc-complex-type.3.2.2: Attribute 'errors' Is Not Allowed To Appear In Element 'testcase'.. Line '26', Column '118'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testcase'.. Line '26', Column '118'.
Cvc-complex-type.3.2.2: Attribute 'tests' Is Not Allowed To Appear In Element 'testcase'.. Line '36', Column '134'.
Cvc-complex-type.3.2.2: Attribute 'failures' Is Not Allowed To Appear In Element 'testcase'.. Line '36', Column '134'.
Cvc-complex-type.3.2.2: Attribute 'errors' Is Not Allowed To Appear In Element 'testcase'.. Line '36', Column '134'.
Cvc-complex-type.3.2.2: Attribute 'timestamp' Is Not Allowed To Appear In Element 'testcase'.. Line '36', Column '134'.

推荐答案

看看此讨论,请访问GitHub.该问题已经解决-可能取决于产品版本.

Take a look at this discussion at GitHub please. The issue is already closed - maybe it depends on the product version.

这篇关于qunit-reporter-junit是否生成与junit兼容的xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆