如果我尝试使用FitNesse SLIM运行一个givwenzen脚本,得到的错误是这个givwenzen类没有被拾取。可能是某个类路径错误。
如果有人能帮我举个givwenzen的例子,即使是两个数字的相加。
提前感谢
发布于 2018-08-29 12:46:07
https://github.com/weswilliams/GivWenZen项目有许多示例。这里有一个:
1)从在givwenzen_test.jar中找到的一个示例fixture实际类开始。
2)在FitNesse表中,它可能如下所示。导入和启动应该在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;
}
}
https://stackoverflow.com/questions/51502512
复制相似问题