简体   繁体   English

FitNesse测试返回“ Class RunEtlFixture不是固定装置”

[英]FitNesse test returns “Class RunEtlFixture is not a fixture”

I set up FitNesse locally, and I'm trying to run a test, using my own java code. 我在本地设置了FitNesse,并尝试使用自己的Java代码运行测试。

Here is the Fixture class: 这是Fixture类:

import fit.ColumnFixture;

public class RunEtlFixture
{
   private String etlName;
   private int numOfInputRecords;
   private int numOfOutputRecords;

   public void setEtlName(String etlName) {
      this.etlName = etlName;
   }

   public void setNumberOfInputRecords(int num){
      this.numOfInputRecords = num;
   }

} 

And here is the test wiki: 这是测试维基:

<test page>

!path /Users/shay/Projects/AMP/Talend Jobs Testing/FitNesseTests

| RunEtlFixture                          |
| EtlName | InputRecords | OutputRecords |
| etl_one | 5            | 5             |
| etl_two | 10           | 10            |

However, when I run the test, I get: 但是,当我运行测试时,我得到:

Class RunEtlFixture is not a fixture. 类RunEtlFixture不是固定装置。

I tried searching for help online, but it seems the FitNesse resources are very few. 我尝试过在线寻求帮助,但是FitNesse的资源似乎很少。 Can anyone help? 有人可以帮忙吗?

Turns out all I was missing is extending the proper fixture: 原来我所缺少的只是扩展适当的装置:

public class RunEtlFixture extends ColumnFixture {
   ...
}

我认为更好的方法是在子Wiki中定义以下内容:

!define TEST_SYSTEM {slim}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM