??????????????????????????????Cucumber??????
???????????? ???????[ 2011/10/13 11:26:13 ] ????????
???????????????????BDD??????????????1200??????Scenario????????????????????????????????????????????????????????????У???????1200?????????????????BDD?????????У???????????????2000??????????????????????????£?
?????? ???2000/5=400??/??
?????? ????1200/0.5=2400??/??
??????BDD???????????????Ч?????????屶??????????????????????????????£?hiahia????
??????????
?????????????????????硣??Ч????????????????????μ???????????????????????????????????????????????ε?nightly build/test??????????????12С????????????????????????????????????????????????????????????????????????????CI??????????????????????д????????????е??????????????????????????????????????????????????????????????????з????????????????????
?????????????????????????????Feature????????У????????????????Scenario????????????????????Щ??????????????????????????????????????????????????????e???????????????????????????????£???????
???????????????????????????????????壬?????????????????????????????????????????????д??????????????????Σ?????????????????????????????????????????????????
???????°?????????Ч??????????У???????????С??
?????????1??????Setup/Cleanup???Ρ?
???????????Eclipse??workspace?д???Java??????????
Scenario: create java fileinws
02 GivenIhave an Eclipse workspace
03 WhenIcreate anewjava file with name"Student"
04 Then eclipse should create a file with name"Student.java"as:
05 """
06 publicclassStudent {
07 public Student() {
08 }
09 }
10 """
???????????????step??
Given /^Ihave an Eclipse workspace$/do
2 eclipse.new_workspace()
3 end
???????????????????????????????????????????"Given an Eclipse workspace"?????????????£???????????????????????????????"workspace"???????????д??????????????????????step???????
Given /^Ihave an Eclipse workspace$/do
system("cp -r #{$empty_ws} .")
end
?????????????????delete_user????????????????delete database??????????????????????????db snapshot/rotate???????????????????????????create a new java file????????????裬????????????????????????????裬?????????????????????????????????????????
?????????2?????Setup/Cleanup???Ρ?
??????????????Setup/Cleanup???κ???????????ЩSetup/Cleanup????????????Scenario??????е???????Login???????????Web???????????hook.rb?У???????????
Beforedo
2 @cli= Cli.login(host?? user?? password)
3 @web= Web.login(url?? user?? password)
4 end
5 Afterdo
6 @cli.logout
7 @web.logout
8 end
??????Щ????????????????????????????????????cmd??????http request????????????????????????????????????????????????Scenario????????????????????????Scenario?????????????д???hook.rb???
@cli= Cli.login
2 @web= Web.login
3
4 at_exitdo
5 @cli.logout
6 @web.logout
7 end
??????????????????ε?????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11