我只是使用qunit-reporter-junit生成以下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: 'undefined' is not an object (evaluating 'data.cloneParams.fromCategory')" />
</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: 'undefined' is not an object (evaluating 'data.cloneParams.fromCategory')" />
</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时,我在以下位置找到了它: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
(这在我们使用Jenkins时是适当的),通过此站点上的验证器进行:http : //www.freeformatter.com/xml-validator-
xsd.html
它报告以下错误。那么qunit-reporter-junit是否真的生成兼容的xml?我还有其他方法可以验证这一点吗?
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
请。该问题已经解决-
可能取决于产品版本。
junit-vintage engine是否意味着与JUnit4.12.x之前的版本兼容? 我将异常的来源缩小到VintageTestDescriptor.java中的几行(盯着第86行看) Category在JUnit4.12的实验包中,但似乎在JUnit4.7中没有。我找不到doc上的junit版本的复古引擎是兼容的。
JUnit是基于Java的开发的常用单元测试框架。 它易于使用且易于扩展。 有许多JUnit扩展可用。 如果您不熟悉JUnit,请从www.junit.org下载并阅读其手册。 本章介绍如何使用Ant执行JUnit测试。 Ant通过JUnit任务直接进行。 JUnit任务的属性如下所示 - Sr.No. 属性和描述 1 dir 从哪里调用VM。 禁用fork时会忽略此项。 2 jvm 用于调用JV
在本章中,我们将学习如何将JUnit和EasyMock集成在一起。 这里我们将创建一个Math Application,它使用CalculatorService来执行基本的数学运算,例如加法,减法,乘法和除法。 我们将使用EasyMock来模拟CalculatorService的虚拟实现。 此外,我们广泛使用注释来展示它们与JUnit和EasyMock的兼容性。 下面以逐步的方式讨论该过程。 St
GWT使用JUnit测试框架为客户端代码的自动测试提供了极好的支持。 在本文中,我们将演示GWT和JUNIT集成。 下载Junit存档 JUnit官方网站 - http://www.junit.org 下载Junit-4.10.jar OS 存档名称 Windows junit4.10.jar Linux junit4.10.jar Mac junit4.10.jar 将下载的jar文件存储到计算
我的样本代码在这里 尝试运行junit测试时,收到以下错误消息。 JAVAlang.IllegalStateException:未能加载ApplicationContext 原因:org。springframework。豆。工厂BeanCreationException:创建名为“nameDao”的bean时出错:调用init方法失败;嵌套的异常是java。lang.IllegalArgument
我在google和stack overflow中几乎到处都搜索到了这个。 我们所在的项目使用的是 JBoss EAP 6.3 和 IBM MQ 8.0。现在,我们正在迁移到 JBoss EAP 7.1,在此过程中,我们在服务器中部署战争时遇到了一些问题。错误是这样的... 我可以在以下位置搜索并找到一些IBM MQ限制(JBoss EAP 7.1) 红帽JBoss企业应用平台 但该限制是关于IBM