Fitnesse的4中表格测试实验及接口测试方法-2

上一篇 / 下一篇  2012-04-18 11:35:40 / 个人分类:Fitnesse

4ScriptTable

3MH.Vlc'@"sqf0

举例:51Testing软件测试网6e_/z7wW'm%t/`Y7Yc%u

//info.fitnesse.fixturegallery包下面新建两个类一个是HelloWorld,另外一、//个是HelloWorldForFitnesse,其实在java语法上,HelloWorld//HelloWorldForFitnesse的内部类51Testing软件测试网(HQ;yHV6\4d

Public class HelloWorld{51Testing软件测试网)k#Bq9adC8p[v[ B

Public String sayHello(String name)51Testing软件测试网.y Lw,m.hy

{

vIM+`[L0

Returnhello:+name;51Testing软件测试网+w#b0G-@%lT

}51Testing软件测试网{;?\$r|#_8Rk

}51Testing软件测试网3sV?w0J~C

 51Testing软件测试网&G|&QVc l

!path D:\eclipse\imageco-test\workspace\FitnessTest\bin

CRSx-{a!q0

!define TEST_SYSTEM {slim}51Testing软件测试网F$z%wmn9]'J%O

!define value {jims}51Testing软件测试网EM"X&df4}!hd

!define result {hello:jims}51Testing软件测试网YtU5w:zn#su

!|import|51Testing软件测试网Eu#~&iR"Q

|info.fitnesse.fixturegallery|

}2TdBB!ce0

!|script.|HelloWorldForFitnesse|

6{*o*kOP;s p\m)Q0

|check|testSayHello|${value}|${result}|

%?uY?l{*VJ0

 

w d!A'x*wI9xr0

public class HelloWorldForFitnesse{51Testing软件测试网~7H8Y2WS3b6H

private HelloWorld hw;

P^Y m_+u4^!P:i p0

public HelloWorldForFitnesse()51Testing软件测试网 GizQWg*LV[%A-y3q

{51Testing软件测试网7S&ZJk/g;E

 hw=new HelloWorld();

Y9T X'a0H L.D Zc.]0

}51Testing软件测试网p#n[L*j t5f

public String testSayHello(String str)

,{Q3I7OS5pQ0

{

}nx}"z"Ch8`N0

return hw.sayHello(str);51Testing软件测试网/^ LgQ6f d4{2f `

}51Testing软件测试网s N5r2v%n

}51Testing软件测试网JUk~T5z E


TAG:

 

评分:0

我来说两句

Open Toolbar