如何使用PHPunit配置CI hudson,如何使用hudson运行PHPunit?

如何使用PHPunit配置CI hudson,如何使用hudson运行PHPunit?,hudson,phpunit,Hudson,Phpunit,我得到下面提到的错误。这方面非常需要帮助。。。 请仔细检查错误 由SCM更改启动 Updating https://suppliesguys.unfuddle.com/svn/suppliesguys_frontend2/Frontend-Texity/src U sites\all\modules\print\print_pdf\print_pdf.pages.inc At revision 1134 [workspace] $ sh -xe C:\WINDOWS\TEMP\h

我得到下面提到的错误。这方面非常需要帮助。。。 请仔细检查错误

由SCM更改启动

Updating https://suppliesguys.unfuddle.com/svn/suppliesguys_frontend2/Frontend-Texity/src
U         sites\all\modules\print\print_pdf\print_pdf.pages.inc
At revision 1134
[workspace] $ sh -xe C:\WINDOWS\TEMP\hudson6292587174545072503.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson\.hudson\jobs\TSG\workspace"): CreateProcess error=2, The system cannot find the file specified
 at java.lang.ProcessBuilder.start(Unknown Source)
 at hudson.Proc$LocalProc.<init>(Proc.java:149)
 at hudson.Proc$LocalProc.<init>(Proc.java:121)
 at hudson.Launcher$LocalLauncher.launch(Launcher.java:636)
 at hudson.Launcher$ProcStarter.start(Launcher.java:271)
 at hudson.Launcher$ProcStarter.join(Launcher.java:278)
 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83)
 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:584)
 at hudson.model.Build$RunnerImpl.build(Build.java:174)
 at hudson.model.Build$RunnerImpl.doRun(Build.java:138)
 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
 at hudson.model.Run.run(Run.java:1244)
 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
 at hudson.model.ResourceController.execute(ResourceController.java:88)
 at hudson.model.Executor.run(Executor.java:122)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
 at java.lang.ProcessImpl.create(Native Method)
 at java.lang.ProcessImpl.<init>(Unknown Source)
 at java.lang.ProcessImpl.start(Unknown Source)
 ... 17 more
Publishing Javadoc
Publishing Clover coverage report...
No Clover report will be published due to a Build Failure
[xUnit] Starting to record.
[xUnit] [PHPUnit] - Use the embedded style sheet.
[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson\.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'.  Did you enter a pattern relative to the correct directory?  Did you generate the result report(s) for 'PHPUnit'?
[xUnit] Stopping recording.
Finished: FAILURE
更新https://suppliesguys.unfuddle.com/svn/suppliesguys_frontend2/Frontend-Texity/src
U站点\all\modules\print\print\U pdf\print\U pdf.pages.inc
第1134次修订
[workspace]$sh-xe C:\WINDOWS\TEMP\hudson6292587174545072503.sh
系统找不到指定的文件
致命:命令执行失败
java.io.IOException:无法运行程序“sh”(在目录“E:\Projects\Hudson\.Hudson\jobs\TSG\workspace”中):CreateProcess error=2,系统找不到指定的文件
位于java.lang.ProcessBuilder.start(未知源)
在hudson.Proc$LocalProc.(Proc.java:149)
在hudson.Proc$LocalProc.(Proc.java:121)
位于hudson.Launcher$LocalLauncher.launch(Launcher.java:636)
位于hudson.Launcher$ProcStarter.start(Launcher.java:271)
在hudson.Launcher$ProcStarter.join(Launcher.java:278)
位于hudson.tasks.commandexplorer.perform(commandexplorer.java:83)
在hudson.tasks.commandexplorer.perform(commandexplorer.java:58)
在hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
位于hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:584)
位于hudson.model.Build$RunnerImpl.Build(Build.java:174)
位于hudson.model.Build$RunnerImpl.doRun(Build.java:138)
位于hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
位于hudson.model.Run.Run(Run.java:1244)
在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
在hudson.model.ResourceController.execute(ResourceController.java:88)
运行(Executor.java:122)
原因:java.io.IOException:CreateProcess error=2,系统找不到指定的文件
在java.lang.ProcessImpl.create(本机方法)
位于java.lang.ProcessImpl。(未知源)
位于java.lang.ProcessImpl.start(未知源)
... 还有17个
发布Javadoc
发布三叶草覆盖率报告。。。
由于生成失败,将不会发布Clover报告
[xUnit]开始录制。
[xUnit][PHPUnit]-使用嵌入式样式表。
[xUnit][错误]-未找到与测试框架“phpunit”的“E:\Projects\Hudson\.Hudson\jobs\TSG\workspace”相对的模式为“build/logs/phpunit.xml”的测试报告文件。您是否输入了与正确目录相关的模式?您是否为“PHPUnit”生成了结果报告?
[xUnit]正在停止录制。
完成:失败

看起来您有几个问题:

FATAL: command execution failed java.io.IOException: Cannot run program "sh" (in directory "E:\Projects\Hudson.hudson\jobs\TSG\workspace"): 
运行Hudson作业的用户路径中没有“sh”命令,因此无法运行shell脚本。将/bin添加到Hudson用户的$PATH应该可以解决这个问题

[xUnit] [ERROR] - No test report file(s) were found with the pattern 'build/logs/phpunit.xml' relative to 'E:\Projects\Hudson.hudson\jobs\TSG\workspace' for the testing framework 'PHPUnit'. 

这可能是先前错误的结果;生成的距离不够远,无法运行PHPUnit测试。

看起来您在windows系统上使用的是“执行shell”生成步骤,而不是“执行windows批处理命令”生成步骤。Windows通常没有“sh”,因此前者不起作用。

“sh”用于linux实现。在windows中同时使用“.exe”和“bat”文件。您正在尝试在windows或linux上安装和运行Hudson吗