【问题标题】:Script table using SLIM fitNesse tool使用 SLIM fitNesse 工具的脚本表
【发布时间】:2018-07-24 15:31:08
【问题描述】:

如果我尝试使用 FitNesse SLIM 运行 givwenzen 脚本,则会出现错误,即 givwenzen 类未拾取。 可能是一些类路径错误。

如果有人可以帮助我举一个 givwenzen 的例子 即使加上两个数字。

提前致谢

【问题讨论】:

    标签: fitnesse acceptance-testing fitnesse-slim


    【解决方案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;
      }
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-14
      相关资源
      最近更新 更多