簡體   English   中英

無法用誘惑力/紅寶石黃瓜產生結果

[英]Unable to generate results with allure / ruby cucumber

我一直在使用ruby開發新的自動框架,但是無法獲得誘人的報告結果,我嘗試了各種不同的方法,但最終出現以下錯誤:

DevTools listening on ws://127.0.0.1:12177/devtools/browser/498a65da-7ba2-4387-8243-8d0e5be0424e

WARNING: The formatter AllureCucumber::Formatter is using the deprecated formatter API which will be removed in v4.0 of Cucumber.

undefined method 'name' for #<Cucumber::Core::Test::Step:0x00000000059673a0> (No MethodError)

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/allure-cucumber-0.5.8/lib/allure-cucumber/formatter.rb:121:in 'after_test_step'

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.0/lib/cucumber/formatter/ignore_missing_messages.rb:11:in 'method_missing'

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/cucumber-3.1.0/lib/cucumber/formatter/legacy_api/adapter.rb:32:in 'block in initialize'

我已經閱讀了文檔,並且在使用Java進行報告方面擁有豐富的經驗,是否可能不支持我的黃瓜版本? 充其量我可以創建一個空的結果目錄,但是上述消息總是導致黃瓜測試出錯。

這篇文章成立8個月了,希望您能解決這個問題,但是如果其他人落在這里,您可以使用以下內容修補黃瓜紅寶石,以使測試通過:

class Cucumber::Core::Test::Step
  def name
    return text if self.text == 'Before hook'
    return text if self.text == 'After hook'
    "#{source.last.keyword}#{text}"
  end
end 

不過,有關API折舊超過4.0的警告將保留。 希望它將在此之前修復: https : //github.com/allure-framework/allure-cucumber/issues/63

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM