简体   繁体   English

Fitnesse:执行套件时如何停止一次测试运行

[英]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.

相关问题 尝试通过Fitnesse运行Watir测试时出错 - Error when trying to run Watir test through Fitnesse 如何仅使用一个Web驱动程序实例在testng套件中运行多个测试类? - How to run multiple test classes in testng suite with only one web driver instance? 当我作为测试套件运行时,在其他选项卡上打开测试失败 - Opening the test on other tab is failing When i run as a test suite Selenium测试在单独运行时通过,在套件中运行时挂起,并在启用日志记录或远程运行时惊人地通过套件 - A Selenium test passes when run individually, hangs when run in a suite, and amazingly passes in the suite when logging is enabled or run remotely Selenium Eclipse Test Suite测试在套件中失败,但在单独运行时成功 - Selenium Eclipse Test Suite tests fail in the suite, but are successful when run individually 测试失败时如何使硒测试套件失败? - How to fail the selenium test suite when a test fails? 如何仅运行测试套件中的特定方法 - How to run only specific method from test suite 如何在不同的URL上使用Selenium和JUnit 5运行整个测试套件 - How to run an entire test suite with Selenium & JUnit 5 on different URLs 使用相同的浏览器实例如何运行测试套件 - Using same browser instance how to run the test suite 如何从命令行运行基于Groovy的JUnit Test Suite? - How to run groovy based JUnit Test Suite from the command line?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM