2

我想從詹金斯使用弗蘭克自動化測試會話。坦白從詹金斯自動化

這是我收到的錯誤消息。

(Frank::Cucumber::FrankNetworkError) 
    ./step_definitions/test_steps.rb:30:in `/^I navigate to button V\303\244der$/' 
    test.feature:41:in `When I navigate to <link>' 
    | Radar  | Norrland | 


    ********************************************* 
    Oh dear. Your app fell over and can't get up. 
    ********************************************* 

Jenkins從git檢出代碼,除此之外,我已經添加了如下的shell命令。

cd ios #<--this is so that I go to the root folder, the one with the .xcodeproj project 
frank setup 
frank build 
frank launch 
mv features/*.feature Frank/features/. #<--- this is the testscript 
mv features/step_definitions/*.rb Frank/features/step_definitions/. #<--here it is moved to the newly created frank/features & Frank/features/step_definitions folder 
cd Frank/features 
cucumber test.feature 

一切是建立應該的方式,如果我去到服務器
和手動從我的shell命令鍵入最後一行將測試執行。

最好的問候

+0

圖調用它。請注意,Jenkins通常以自己的用戶身份運行,這與用戶不同。這會導致很多問題,除非您以常規用戶身份運行Jenkins。 – Gonen

+0

我會盡快看看,謝謝你的建議 – Jan

回答

0

我個人有很多問題在Mac上運行Jenkins。特別是如果您使用Jenskins Mac映像安裝程序,則Jenkins始終在安裝期間創建的「jenkins」用戶下運行。

這給了我很多頭疼的問題,從內部工作中運行黃瓜或啓動iOS模擬器。

我也終於學會了在我自己的用戶開始詹金斯,是這樣的: 「nohup的Java的罐子/Applications/Jenkins/jenkins.war --httpPort = 8080

從那時起,我就能夠運行黃瓜沒有任何問題希望這有助於

0

出現這種情況,每次您的應用程序崩潰時應用程序崩潰,接收事件和黃瓜坦誠停止與你看到的錯誤結束

有兩個可能的原因:。

  1. 你在你的應用程序中的錯誤是由應用程序崩潰
  2. 弗蘭克有使你的應用程序崩潰

您應檢查崩潰/應用程序日誌,看看具體的原因的錯誤。

我瞭解到,jenkins作業捕獲應用程序日誌非常有用,例如,

function grab_log_and_fail { 
    APP_NAME = "MyApplication" 

    # get the PID of the last process with the given name 
    PID=$(cat /var/log/system.log | grep "$APP_NAME\[" | tail -n 1 | sed -e "s/^.*$APP_NAME\ [\([^\]*\)\].*/\1/g") 

    # grab all the messages from the process with the PID 
    cat /var/log/system.log | grep "$APP_NAME\[$PID\]" >"$WORKSPACE/$APP_NAME.log" 

    #fail the job 
    exit 1 
} 

可以使用

cucumber test.feature || grab_log_and_fail 

(必搶只有黃瓜結束錯誤日誌)你正在建設一個Mac上