这是我的Fitnesse页面:
!contents -R2 -g -p -f -h
!define TEST_SYSTEM {slim}
!path C:\Users\Jayasree
!path C:\Users\Jayasree\workspace\Selenium\bin\Sample
!|import|
!|add|
|num1|num2|sum()|
|10 | 2 |12 |
我的灯具代码:
package Sample;
import fit.ColumnFixture;
public class add extends ColumnFixture{
public int a;
public int b;
public add(int a,int b)
{
this.a=a;
this.b=b;
}
public int getA() {
return a;
}
public void setA(int a) {
this.a = a;
}
public int getB() {
return b;
}
public void setB(int b) {
this.b = b;
}
public int sum() {
return a+b;
}
}
我收到以下错误:
variable defined: TEST_SYSTEM=slim
classpath: C:\Users\Jayasree
classpath: C:\Users\Jayasree\workspace\Selenium\bin\Sample
import import: Bad table! Import tables must have at least two rows.
eg.add Could not invoke constructor for eg.add[0]
num1 num2 sum()
10 The instance decisionTable_1.setNum1. does not exist
2 The instance decisionTable_1.setNum2. does not exist
12 The instance decisionTable_1.setSum. does not exist
我该如何解决这个问题?
答案 0 :(得分:0)
导入表需要要导入的包的名称:
!|import|
|Sample|
ColumnFixture
要求测试系统适合:
!define TEST_SYSTEM {fit}