2
是否有方法從鉤子文件內部啓動一個方案。在After hook中,我抓取失敗的場景的行,以及場景所在的文件或功能,並對其進行格式化,以便我可以在cmd中運行該行,並且只運行失敗的場景。從鉤子文件運行黃瓜測試
例如:功能\ homepage.feature:8環境= 'http://stage.homepage.local/'
現在我需要幫助的上一個失敗的情況下
After() do |scenario|
if scenario.failed?
#code here w/ cucumber features\homepage.feature:8 environment='http://stage.homepage.local/'
end
end
機後可這甚至可以做到運行此?