我在葫蘆裏面使用了AfterStep鉤子/ ios/cucumber。我如何從葫蘆黃瓜裏面的AfterStep中提取步驟名稱
我想知道我的鉤子裏面最後執行的步驟。
AfterStep do |scenario|
puts "Step: #{scenario.name} #{scenario.title} #{scenario.gherkin_statement}"
end
我可以看到該場景已經傳入,但是如何訪問當前正在運行的步驟?我在scenario docs裏看不到有關這方面的任何信息。
我會假設該步驟將被傳遞到AfterStep
掛鉤。任何線索?
http://stackoverflow.com/questions/20912864/how-can-i-figure-out-which-step-ive-just-executed-in-cucumbers-afterstep-hook將有所幫助。 – Purus 2016-02-08 14:53:47