Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUser' in class org.uncommons.reportng.ReportMetadata threw exception class java.net.UnknownHostException :
Running TestSuite
[TestNG] [WARN] Ignoring duplicate listener : org.uncommons.reportng.HTMLReporter
[TestNG] [WARN] Ignoring duplicate listener : org.uncommons.reportng.JUnitXMLReporter
[INFO ] 2019-04-21 18:26:24,609 method:com.chen.autocases.TestDemo.testcase1(TestDemo.java:10)
testcase1
[TestNG] Reporter org.uncommons.reportng.HTMLReporter@1e7bba3 failed
org.uncommons.reportng.ReportNGException: Failed generating HTML report.
at org.uncommons.reportng.HTMLReporter.generateReport(HTMLReporter.java:122)
at org.testng.TestNG.generateReports(TestNG.java:1097)
at org.testng.TestNG.run(TestNG.java:1022)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:170)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:156)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:82)
at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:82)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:867)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:747)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:645)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:331)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:185)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:139)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
at hudson.remoting.UserRequest.perform(UserRequest.java:181)
at hudson.remoting.UserRequest.perform(UserRequest.java:52)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUser' in class org.uncommons.reportng.ReportMetadata threw exception class java.net.UnknownHostException : bogon: bogon: Temporary failure in name resolution
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:193)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
at org.apache.velocity.Template.merge(Template.java:256)
at org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:449)
at org.uncommons.reportng.AbstractReporter.generateFile(AbstractReporter.java:108)
at org.uncommons.reportng.HTMLReporter.createOverview(HTMLReporter.java:148)
at org.uncommons.reportng.HTMLReporter.generateReport(HTMLReporter.java:111)
... 48 more
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.332 sec <<< FAILURE! - in TestSuite
testcase1(com.chen.autocases.TestDemo) Time elapsed: 0.01 sec <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
解决方法:
[root@bogon secrets]# hostname
bogon
解决方法:
1 执行hostname命令
可以看出 ping 不通我们的hostname 这就是原因所在
2 修改 /etc/sysconfig/network
改成我们的hostname命令下的名字
3 修改 /etc/hosts内容
加上我们的hostname命令下的名字
4 最后执行 /etc/rc.d/init.d/network rest
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUser' in class org.uncommons.reportng.ReportMetadata threw exception class java.net.UnknownHostException :的更多相关文章
- velecity报错:Caused by: org.apache.velocity.exception.ParseErrorException: Lexical error, Encountered: <EOF> after : "\'/order/pay?activity=\" + activityId);\r\n }*/\r\n</script>\r\n#end\r\n" at /a
Caused by: org.apache.velocity.exception.ParseErrorException: Lexical error, Encountered: <EOF> ...
- org.springframework.beans.MethodInvocationException: Property 'cacheManager' threw exception; nested exception is org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Caches cannot be
shiro cache manage配置报错: org.springframework.beans.MethodInvocationException: Property 'cacheManager' ...
- 遇到的错误之"Exception in thread “main“ java.lang.NoClassDefFoundError: org/apache/velocity/context/Context at"
问题 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/velocity/context/ ...
- ?--Porg.springframework.beans.MethodInvocationException: Property 'username' threw exception; nested exception is java.lang.NullPointerException
使用BoneCP作为连接池,在启动Tomcat报出以下异常: 一月 02, 2016 2:12:17 下午 org.apache.tomcat.util.digester.SetPropertiesR ...
- Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
异常信息 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with na ...
- 《Apache Velocity用户指南》官方文档
http://ifeve.com/apache-velocity-dev/ <Apache Velocity用户指南>官方文档 原文链接 译文连接 译者:小村长 校对:方腾飞 Qui ...
- Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'company' in 'class java.lang.String'
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ' ...
- Caused by: org.apache.ibatis.binding.BindingException: Parameter 'parameter' not found.解决
Caused by: org.apache.ibatis.binding.BindingException: Parameter 'company' not found. Available para ...
- spring和mybatis整合报错:org.springframework.beans.MethodInvocationException: Property 'dataSource' threw exception; nested exception is java.lang.NoClassDefFoundError
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyExceptio ...
随机推荐
- 【学习笔记】--- 老男孩学Python,day7 python中is 和 == 的区别 encode decode
is比较的是id(内存地址)是不是一样,==比较的是值是不是一样 Python中,万物皆对象!万物皆对象!万物皆对象!(很重要,重复3遍) 每个对象包含3个属性,id,type,value id就是对 ...
- span与a元素的键盘聚焦性以及键盘点击性研究——张鑫旭
一.众所周知的与不为所知的 我们平时涉及点击交互事件的时候,都是使用的a元素或者button元素,原因是可以相应键盘focus效果以及回车触发点击事件,这是众所周知的. 但是,可能存在一些特殊情况,我 ...
- Code Signal_练习题_Make Array Consecutive2
Description Ratiorg got statues of different sizes as a present from CodeMaster for his birthday, ea ...
- Docker for Windows(三)Docker镜像与容器的区别&常用命令
Docker镜像(Image)是一堆只读文件(read-only layer),容器(container)的定义和镜像(image)几乎一模一样,也是一堆层的统一视角,唯一区别在于容器的最上面那一层是 ...
- flutter Row里面元素居中显示
直接上代码: new Expanded( flex: , child: new Row( children: <Widget>[ Expanded( child: new Containe ...
- Eclipse 配置 maven 的两个 settings 文件
eclipse配置的settings文件名完全可以自定义,而本机maven只认识settings.xml文件. eclipse里配置maven有一个叫全局的,有一个叫用户的.这两个文件可以和本机mav ...
- mybatis resultMap 映射配置
现有数据库表: CREATE TABLE `dept_p` ( `DEPT_ID` ) NOT NULL, `DEPT_NAME` ) DEFAULT NULL, `PARENT_ID` ) DEFA ...
- LGWR和DBWn的触发条件
Rolling Forward(前滚) Oracle启动实例并加载数据库,然后通过Online Redologs中的重做日志,重现实例崩溃前对数据库的修改操作.在恢复过程中对于已经提交的事务,但尚未写 ...
- CSS 小结笔记之元素的隐藏与显示
在网站上经常会有一些需要一定操作才会显示或隐藏的元素,这时会用到元素的隐藏与显示.主要通过以下三种属性实现. 1.display :none|block |inline |inline-block d ...
- 【Java】【转】在命令行中编译和运行java
原文:http://blog.csdn.net/u010900574/article/details/50792353 同时加载编译多个jar包和java文件 在个人平常使用或者当我们把代码部署到Li ...