fitnesse - 使用 SLIM fitNesse 工具的脚本表
问题描述
如果我尝试使用 FitNesse SLIM 运行 givwenzen 脚本,则会出现错误,即 givwenzen 类没有被拾取。可能是一些类路径错误。
如果有人可以帮助我举一个 givwenzen 的例子,即使加上两个数字。
提前致谢
解决方案
项目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;
}
}
推荐阅读
- node.js - 如何使用 next 在 AWS S3 上托管静态文件?
- regex - 如何在 Notepad++ 中用正则表达式替换每一个奇数出现的子字符串?
- git - Git 有标签吗?
- python - 如何检测“节奏游戏”自动播放器的符号
- android - 当我更新它的版本时,Firebase auth 移动验证停止工作
- python - 如何使我的箭袋图更能代表数据,即。有明确的箭头?
- javascript - 使用切换按钮更新存储值
- angular - 具有多个子步骤的角步进器
- javascript - 我如何管理 React Final Form 之外的状态?
- python - 为什么使用范围只会将我的代码加速 2 倍?