我回到本教程,完成了我在项目中必须完成的最后一项任务。 “从Jenkins运行测试并在TestLink中报告结果”
实际上,我得到了一个完美运行的jenkins工作,它正在通过maven运行,它是Junit RC Selenium测试。
但是当我尝试连接TestLink插件时,我在执行时遇到错误:
FATAL: [Ljava.lang.Object; cannot be cast to java.util.Map
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.Map
at br.eti.kinoshita.testlinkjavaapi.util.Util.castToMap(Util.java:586)
at br.eti.kinoshita.testlinkjavaapi.TestProjectService.getTestProjectByName(TestProjectService.java:115)
at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.getTestProjectByName(TestLinkAPI.java:438)
at hudson.plugins.testlink.TestLinkBuilder.getTestLinkSite(TestLinkBuilder.java:255)
at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:140)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
当我访问网址时:http://ip-address/testlink/lib/api/xmlrpc.php
我明白了:XML-RPC服务器只接受POST请求。
我通过项目的pom文件连接了test-java-api:
<dependency>
<groupId>br.eti.kinoshita</groupId>
<artifactId>testlink-java-api</artifactId>
<version>1.9.6-0</version>
</dependency>
有人有想法吗?
提前感谢您的亲切帮助!