我使用Protractor进行e2e测试。并且我尝试在特定错误之后停止测试执行(不是所有错误,而不仅仅是在第一次错误之后(如快速失败))。 我试图使用promises,process等。 如果我写:process.exit(1)它可以工作,但套件中的所有规格都没有启动。 也许有人知道如何阻止当前规范(特定错误后的步骤描述)?
我的想法是将它用于.waitReady()方法:
func GetRates(checkoutI InterfaceCheckout) []Rate {
getRates(checkoutWrapper(checkoutI))
}
func getRates(checkoutI InterfaceCheckout) []Rate {
for _, item := range checkoutI.GetItesm() {
p := item.GetProduct()
}
}
// smaller wrapper interfaces
type checkoutWrapper interface {
GetItems() []itemWrapper
}
type itemWrapper interface {
GetProduct() InterfaceProduct
}
答案 0 :(得分:0)
Привет!
似乎这些库中的一个可能有所帮助 - https://github.com/Updater/jasmine-fail-fast https://github.com/F1LT3R/protractor-jasmine2-fail-whale
他们以茉莉花2记者为基础。