??????????????????????????????Cucumber??????
???????????? ???????[ 2011/10/13 11:26:13 ] ????????
?????????3?????sleep??
????????????????????????????????sleep???????????????sleep????????в??????????????????????????????????????У?sleep??????Scenario?????????????????@long??????@sleep?????????????????????????????С???????Σ??????????У???????ɡ?
?????????4???????????????
??????????????????????????????????????????????????????а?????????????????
Scenario: user action should be logged
2 Given user login bank website
3 When user transfer "20" bucx to stock
4 Then bank should log as:
5 | userid | mount | date |
6 | $user | 20 | today|
???????????????step???
Then /^bank should log as:$/ do |ast|
2 ast.hashes.each do |hash|
3 sleep 5
4 logdb.search(hash).should == true
5 end
6 end
????????????????????log??????????????web??????log???????????????????????????????????????????sleep???????????????????????д???????????????????????????????step???
Then /^bank should log as:$/ do |ast|
2 ast.hashes.each do
3 open("log"?? r) do |f|
4 f.read.should.include ("userid"+hash["user"]+"mount"+hash["mount"]+"date"+hash["date"])
5 end
6 end
7 end
????????log????????????Scenario??????????????????????黯????????????log??????汾??????????????????web????????
?????????5??????????
???????????????????????????????????????????????step?????裩???????data??????????????磺
Scenario: regiestered user login
02 Given registered users as:
03 |user | email | password |
04 | a |a@cnblogs.com | 123 |
05 | b-B_|b-B_@cn.com |3445 |
06 | c |c@haha.com |1 |
07 When users login with password:
08 |user | password|
09 | a | 123 |
10 | b-B_| 3445 |
11 |c |2 |
12 |d | 1233 |
13 Then users should see:
14 |user | msg |
15 |a | welcome |
16 |b-B_ | welcome |
17 | c | incorrect password|
18 |d | invalid user |
??????
???·???
??????????????????
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