首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >使用SLIM fitNesse工具编写表格脚本

使用SLIM fitNesse工具编写表格脚本
EN

Stack Overflow用户
提问于 2018-07-24 23:31:09
回答 1查看 325关注 0票数 0

如果我尝试使用FitNesse SLIM运行一个givwenzen脚本,得到的错误是这个givwenzen类没有被拾取。可能是某个类路径错误。

如果有人能帮我举个givwenzen的例子,即使是两个数字的相加。

提前感谢

EN

回答 1

Stack Overflow用户

发布于 2018-08-29 12:46:07

https://github.com/weswilliams/GivWenZen项目有许多示例。这里有一个:

1)从在givwenzen_test.jar中找到的一个示例fixture实际类开始。

2)在FitNesse表中,它可能如下所示。导入和启动应该在SetUp或SuiteSetUp中进行

代码语言:javascript
复制
|import|
|org.givwenzen|

|script|
|start|giv wen zen for slim|

这是你的测试

代码语言:javascript
复制
|script|
| given| a ToDo item is due tomorrow |
| when | the date changes to tomorrow  |
| then | a notification exists indicating the ToDo is due |

3)下面是一个示例步骤类和测试步骤方法===

代码语言:javascript
复制
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;
  }

}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51502512

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档