简体   繁体   English

在FitNesse中为决策表创建方案

[英]Create an Scenario for a Decision Table in FitNesse

I am trying to create an scenario before executing a decision table on FitNesse, but I am not able to make it work. 我试图在FitNesse上执行决策表之前创建一个方案,但是我无法使其工作。 Doing it with an script table looks easy, but I can't find any example doing it with a decision table. 使用脚本表执行此操作看起来很容易,但是我找不到使用决策表执行此操作的任何示例。

What I want is to execute the scenario script just before checking the decision table. 我想要的是在检查决策表之前执行场景脚本。 My code looks like this: 我的代码如下所示:

--Here the Scenario

!|Scenario|ScenarioTest|
|AddSomeData|1|
|AddSomeData|2|

--Here the decision table

!| TestingScenarios.DecisionTable       |
|Parameter1|Parameter2|Result1?|Result2?|
|1         |2         |3       |4       |
|3         |4         |5       |6       |

A scenario is just a definition of a sequence of steps (so you can use these multiple times without having to repeat all the steps each time). 场景只是对一系列步骤的定义(因此您可以多次使用这些步骤,而不必每次都重复所有步骤)。

If you just want to execute the steps once, before the decision table, put a script table on the page before the decision table. 如果只想执行一次这些步骤,请在决策表之前,将脚本表放在决策表之前的页面上。

If you want to execute the steps for each row in the decision table see 'Invoking a scenario from a Decision Table' on http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScenarioTable 如果要对决策表中的每一行执行步骤,请参阅http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScenarioTable上的 “从决策表中调用场景”。

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

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