51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 1953|回复: 3

reportNG替代testNG报告

[复制链接]

该用户从未签到

发表于 2014-10-16 13:49:12 | 显示全部楼层 |阅读模式
请问这些报的是什么错啊?
   [testng] Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Module
   [testng]         at java.lang.Class.getDeclaredMethods0(Native Method)
   [testng]         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
   [testng]         at java.lang.Class.privateGetPublicMethods(Unknown Source)
   [testng]         at java.lang.Class.getMethods(Unknown Source)
   [testng]         at org.apache.velocity.util.introspection.ClassMap.getAccessibleMethods(ClassMap.java:258)
   [testng]         at org.apache.velocity.util.introspection.ClassMap.populateMethodCache(ClassMap.java:151)
   [testng]         at org.apache.velocity.util.introspection.ClassMap.<init>(ClassMap.java:64)
   [testng]         at org.apache.velocity.util.introspection.IntrospectorBase.createClassMap(IntrospectorBase.java:126)
   [testng]         at org.apache.velocity.util.introspection.IntrospectorBase.getMethod(IntrospectorBase.java:112)
   [testng]         at org.apache.velocity.util.introspection.Introspector.getMethod(Introspector.java:100)
   [testng]         at org.apache.velocity.runtime.parser.node.PropertyExecutor.discover(PropertyExecutor.java:65)
   [testng]         at org.apache.velocity.runtime.parser.node.PropertyExecutor.<init>(PropertyExecutor.java:39)
   [testng]         at org.apache.velocity.util.introspection.UberspectImpl.getPropertyGet(UberspectImpl.java:156)
   [testng]         at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:125)
   [testng]         at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
   [testng]         at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:327)
   [testng]         at org.apache.velocity.runtime.parser.node.ASTAddNode.value(ASTAddNode.java:66)
   [testng]         at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:51)
回复

使用道具 举报

该用户从未签到

 楼主| 发表于 2014-10-16 14:29:50 | 显示全部楼层
问题没有描述清楚,我想用reportNG替代testNG在ant中写了段代码,如下。关闭testNG自身的报告,使用reportNG的报告。testNG可以调用,但是报告没出来,然后报出这些错误。
请问下是什么原因。
        <target name="runtest" depends="build">
                <testng         classpathref="TmTest.classpath"
                            outputdir="${test-results.dir}"                
                                   useDefaultlisteners="false"                       
                                        listeners="org.uncommons.reportng.HTMLReporter,org.testng.reporters.FailedReporter" >                               
                          <xmlfileset dir="${testng}" includes="${testng.file}"/>       
                      <sysproperty key="org.uncommons.reportng.title" value="My Test Report"/>
                </testng>
        </target>  
回复 支持 反对

使用道具 举报

该用户从未签到

发表于 2014-10-16 16:26:00 | 显示全部楼层



看帖顶帖这是必须滴!

回复 支持 反对

使用道具 举报

该用户从未签到

 楼主| 发表于 2014-10-17 08:32:52 | 显示全部楼层
你真够调皮的!
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-3-29 19:13 , Processed in 0.062838 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表