使用 SLIM fitNesse 工具的脚本表
Posted
技术标签:
【中文标题】使用 SLIM fitNesse 工具的脚本表【英文标题】:Script table using SLIM fitNesse tool 【发布时间】:2018-07-24 15:31:08 【问题描述】:如果我尝试使用 FitNesse SLIM 运行 givwenzen 脚本,则会出现错误,即 givwenzen 类未拾取。 可能是一些类路径错误。
如果有人可以帮助我举一个 givwenzen 的例子 即使加上两个数字。
提前致谢
【问题讨论】:
【参考方案1】:https://github.com/weswilliams/GivWenZen 项目有很多例子。这是一个:
1) 从 givwenzen_test.jar 中的示例夹具实际类开始。
2) 在 FitNesse 表中,它可能看起来像这样。 import 和 start 应该进入 SetUp 或 SuiteSetUp
|import|
|org.givwenzen|
|script|
|start|giv wen zen for slim|
这是你的测试
|script|
| given| a ToDo item is due tomorrow |
| when | the date changes to tomorrow |
| then | a notification exists indicating the ToDo is due |
3) 下面是一个示例步骤类和测试步骤方法===
package bdd.steps;
@DomainSteps
public class ExampleSteps
@DomainStep( “a ToDo item is due (.*)” )
public void createToDoWithDueDateOf(CustomDate date)
// do something
@DomainStep( “the date changes to (.*)” )
public void theDateIs(CustomDate date)
// do something
@DomainStep( “a notification exists indicating the ToDo is due” )
public boolean verifyNotificationExistsForDueToDo()
// do something
return false;
【讨论】:
以上是关于使用 SLIM fitNesse 工具的脚本表的主要内容,如果未能解决你的问题,请参考以下文章