简体   繁体   English

如何在复杂的FitNesse套件中配置运行选定的测试?

[英]How to configure running selected tests in a complex FitNesse suite?

We have a complex Fitnesse suite with tens of subsuites, includes and symbolic links. 我们拥有一个复杂的Fitnesse套件,其中包含数十个子套件,包括和符号链接。 Sometimes we don't want to run the whole thing and would like to run selected test cases and not run the others . 有时我们不想运行全部东西,而是想运行选定的测试用例而不运行其他用例 We see two ways to do it: 我们看到两种方法:

  1. By managing page properties (Suite - Test - Normal), we can turn on/off test cases. 通过管理页面属性(Suite-Test-Normal),我们可以打开/关闭测试用例。

    But this is inconvenient. 但这很不方便。 First of all, it's boring. 首先,这很无聊。 And second, we can't see the suite current state (what test cases are turned on and gonna be run). 其次,我们看不到套件的当前状态(将打开并运行哪些测试用例)。

  2. In Fitnesse, there are tags , and we can specify desired tags in suiteFilter or excludeSuiteFilter. 在Fitnesse中, 有标签 ,我们可以在suiteFilter或excludeSuiteFilter中指定所需的标签。

    This is inconvenient too. 这也不方便。 You have to remember tag names and don't forget or misspell them in filters. 您必须记住标记名,并且不要忘记或在过滤器中拼错它们。 Of course, we can store predefined links with carefully selected lists of tags, but in our case it's not the option, since the lists are subject to frequent changes. 当然,我们可以存储带有精心选择的标签列表的预定义链接,但是在我们的情况下,由于列表经常更改,因此不是可选项。

Also, we don't want to divide our suite on several parts, since we benefit from having the general Scenario Library and variable lists. 另外,我们不想将套件分为几个部分,因为我们从通用场景库和变量列表中受益。

The ideal solution for us would be having a Fitnesse suite configurator, which could display and change settings of Fitnesse pages. 对于我们来说,理想的解决方案是安装Fitnessfit Suite设置器,它可以显示和更改Fitnesse页面的设置。 Say, it may be a Fitnesse plugin, which read Fitnesse folder structure and display current settings in an html page or with Windows Form, letting change these settings and save the changes. 假设它可能是Fitnessfite插件,可以读取Fitnessfite文件夹结构并在html页面或Windows Form中显示当前设置,以便更改这些设置并保存更改。 Or an external tool with similar functionality. 或具有类似功能的外部工具。

Have you heard of such tools? 您听说过这样的工具吗? Did you bump into the same troubles? 您遇到了同样的麻烦吗? What would be your suggestions? 您有什么建议?

I would agree that the first option you listed, manipulating the page properties is a bad idea. 我同意您列出的第一个选项,即操纵页面属性是一个坏主意。 It will cause pain in the log run. 它将导致日志运行中的疼痛。

I would note that tags area very reasonable approach. 我会注意到标记区域的方法非常合理。 The thing to keep in mind about tags filets is that you can build links that will run all of the tests tagged a specific value and make that a part of the FrontPage 有关标记文件的注意事项是,您可以建立链接,该链接将运行所有标记了特定值的测试,并使该链接成为FrontPage的一部分。

For example, you can put a link in your FrontPage that will run all tests marked "smoke". 例如,您可以在FrontPage中放置一个链接,该链接将运行所有标记为“烟雾”的测试。 [[Run Smoke Tests][.FrontPage.MonsterSuite?suite&suiteFilter=smoke]] [[运行冒烟测试] [。FrontPage.MonsterSuite?suite&suiteFilter =烟]]

There is one other variation on selective execution you could do, but I've not been as successful with. 您可以执行选择性执行的另一种方式,但是我没有那么成功。 Take a look at SuiteQuery: http://fitnesse.org/FitNesse.UserGuide.TestSuites.SuiteQuery . 看一下SuiteQuery: http ://fitnesse.org/FitNesse.UserGuide.TestSuites.SuiteQuery。

SuiteQuery is a technique that lets you specify a suite by building a table that lists the pages or page name filters to run. SuiteQuery是一种技术,可让您通过建立一个列出要运行的页面或页面名称过滤器的表来指定套件。

!|Suite|
|Page|FitNesse.SuiteAcceptanceTests|
|Content|[Bb]ug|

!|Suite|
|Page|FitNesse.SuiteAcceptanceTests|
|Title|Import|

There is an another way.. 还有另一种方法。

Create a new suite and add the following code to it.. 创建一个新套件,并向其中添加以下代码。

!see .FrontPage.TestPage

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM