[英]Fitnesse: How to stop one test run when executing a suite
I am using Fitnesse 20130530 to execute a test suite that contains multiple tests. 我正在使用Fitnesse 20130530执行包含多个测试的测试套件。 Most of my tests use script tables with SLIM to drive Selenium.
我的大多数测试都使用带有SLIM的脚本表来驱动Selenium。 I use a Stop Test Exception to stop the execution of a test when one of the method calls raises an exception.
当方法调用之一引发异常时,我使用Stop Test Exception来停止测试的执行。 Unfortunately, this also stops the execution of the whole suite.
不幸的是,这也停止了整个套件的执行。 Is there a way to just stop the current test and then continue execution with the next test in the suite?
有没有办法只停止当前测试,然后继续执行套件中的下一个测试?
Not in FitNesse itself, but you can build it into your fixtures. 不在FitNesse本身中,但是您可以将其内置到灯具中。
When I had a similar problem I was able to solve it using what we called "fail fast" mode. 当我遇到类似的问题时,我可以使用所谓的“快速失败”模式来解决。 This was a static variable that could be set to true under certain conditions (typically by an element not found exception or similar).
这是一个静态变量,可以在某些条件下设置为true(通常由未发现异常或类似的元素)。
Our main driver was structured such that we could pass through one spot that could check for that value before calling the browserDriver. 我们的主驱动程序的结构使其可以通过一个可以在调用browserDriver之前检查该值的位置。 This would then skip the broswerDriver calls until the test ended.
然后,这将跳过broswerDriver调用,直到测试结束。
The next text would clear the flag and start up again. 接下来的文本将清除该标志,然后重新启动。
You would need to manage the whole process, but it can work. 您将需要管理整个过程,但是它可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.