我正在对Jenkins和TestLink进行一些研究,我想知道-是否可以在TestLink中自动生成新项目/作业,还是总是必须手动完成?问题是我想在Jenkins上运行测试,然后所有失败的测试都应在TestLink中创建一个新作业。
有可能并且怎么做?
最佳答案
使用默认的TestLink Jenkins插件,您将无法在TestLink上自动创建新项目。您将最终遇到以下错误类型
FATAL: Test Project (name:TestSample1234) does not exist.
br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: Test Project (name:TestSample1234) does not exist.
at br.eti.kinoshita.testlinkjavaapi.BaseService.checkResponseError(BaseService.java:113)
at br.eti.kinoshita.testlinkjavaapi.BaseService.executeXmlRpcCall(BaseService.java:91)
at br.eti.kinoshita.testlinkjavaapi.TestProjectService.getTestProjectByName(TestProjectService.java:112)
at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.getTestProjectByName(TestLinkAPI.java:438)
at hudson.plugins.testlink.TestLinkBuilder.getTestLinkSite(TestLinkBuilder.java:309)
at hudson.plugins.testlink.TestLinkBuilder.perform(TestLinkBuilder.java:186)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:906)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:857)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
ERROR: Error communicating with TestLink. Check your TestLink configuration.
Finished: FAILURE
也许您可以通过自定义Jenkin插件来实现,请查看插件代码[1]和[2]
或从testlink论坛询问
[1] https://github.com/jenkinsci/testlink-plugin
[2] https://github.com/kinow/testlink-java-api