jenkins 集成java搅拌_如何将Gauge与Jenkins集成
我對Gauge測試工具有點熟悉,現在我正在通過Jenkins執行它 .
首先:我在"Execute Windows Batch Command"字段中設置 gauge --version . 這是輸出:
Started by user anonymous
Building in workspace C:\jenkins\workspace\Run_Gauge_Test
[Run_Gauge_Test] $ cmd /c call C:\WINDOWS\TEMP\hudson8329964667758110371.bat
C:\jenkins\workspace\Run_Gauge_Test>gauge --version
Gauge version: 0.6.2
Plugins
-------
No plugins found
Plugins can be installed with `gauge --install {plugin-name}`
C:\jenkins\workspace\Run_Gauge_Test>exit 0
Finished: SUCCESS
如果我直接在命令行中運行Gauge,則將此與我得到的輸出進行比較:
C:\jenkins\workspace\Run_Gauge_Test>gauge --version
Gauge version: 0.6.2
Plugins
-------
html-report (2.1.1)
java (0.5.1)
xml-report (0.1.3)
所以我將相同的命令放在批處理文件中并運行它只是為了再次獲取"no plugins found"消息 . 作為最后一個選項,我勾選 Use custom workspace 并將我的目錄設置為一個文件夾,我通常從命令行運行規范測試,但它仍然是"no plugins found"
然后我嘗試將其作為shell命令運行 . 輸出:
Started by user anonymous
Building in workspace C:\jenkins\workspace\Run_Gauge_Test
[Run_Gauge_Test] $ sh -xe C:\WINDOWS\TEMP\hudson211231385407124893.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "sh" (in directory "C:\jenkins\workspace\Run_Gauge_Test"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
(truncated)
at hudson.model.Executor.run(Executor.java:404)
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.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 16 more
Build step 'Execute shell' marked build as failure
Finished: FAILURE
當然,我將實際運行規范測試(并且它不起作用),而不僅僅是獲取版本;但我認為解決為什么它沒有正確獲取插件細節會更簡單 . 有線索嗎?
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的jenkins 集成java搅拌_如何将Gauge与Jenkins集成的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: visual paradigm 表示选择
- 下一篇: java中为什么要用注解_java中的注