4. N畛i dung
1. Automation testing and its benefits
2. When to do Automation Testing
3. BDD (Behavior driven development) in Automation
testing
5. 1. Automation testing and its benefits
Manual Testing Automation Testing
A process that makes use of automation testing tools to excute
prescripted tests on aplications, then compares the test results
to the expected behavior and reports it to the tester
6. 1. Save time and money
They can be repeated again and again
They can execute overnigh
2. Reusale: Automation testing toool allow to reuse the
scripts on different versions of the application
3. Increase test coverage
1. Automation testing and its benefits
7. 2. When to do Automation Testing
1. Need to run the test cases a lot number of times
2. The number test cases is high, and these will be run
more than once
3. The test case wont be frequently updated
8. 3. Behavior driven development
3.1. Kh叩i ni畛m BDD, l畛i 鱈ch khi s畛 d畛ng BDD
3.2. Ci 畉t, kh畛i t畉o project BDD
3.3. Vi畉t n畛i dung test case b畉ng BDD
9. Behavior driven development
Quy tr狸nh ph叩t tri畛n ph畉n m畛m theo 坦 K畛ch b畉n test 動畛c vi畉t tr動畛c d動畛i d畉ng
feature file b畉ng ng担n ng畛 t畛 nhi棚n
3.1. Kh叩i ni畛m BDD, l畛i 鱈ch khi s畛 d畛ng BDD
10. Ti li畛u 動畛c vi畉t d動畛i d畉ng ng担n ng畛 t畛 nhi棚n, b畉t k畛
畛i t動畛ng no c滴ng c坦 th畛 hi畛u 動畛c.
N但ng cao ch畉t l動畛ng ph畉n m畛m, t畉o ra s畉n ph畉m h畛u
鱈ch: V狸 ph叩t tri畛n ph畉n m畛m theo h動畛ng hnh vi n棚n
c坦 th畛 focus vo vi畛c t畉o ra s畉n ph畉m 炭ng v畛i y棚u c畉u
c畛a kh叩ch hng.
3.1. Kh叩i ni畛m BDD, l畛i 鱈ch khi s畛 d畛ng BDD
11. Ci 畉t specflow 畛 vi畉t test case d畉ng BDD (B畛 ci:
hthienSETUPAuto)
T畉o Project Test
Add c叩c reference c畉n thi畉t (hthienSETUPAutoLib)
TechTalk.SpecFlow.dll
Setting config 畛 畉m b畉o n畛i dung file .cs t畛 sinh khi vi畉t
testcase
3.2. Ci 畉t, kh畛i t畉o project BDD
16. 1. T畉o file test case
2. C叩c vi畉t n畛i dung test case
3. M担 t畉 c叩c thao t叩c c畛a t畛ng b動畛c trong test case
M畛t s畛 l動u 箪:
-M畛i m畛t file Feature n棚n g畉n v畛i 1 t鱈nh nng c畉n ki畛m tra
-N棚n chia nh畛 c叩c test case 畛 畉m b畉o c叩c case ch畉y 畛c l畉p nhau
-Kh担ng n棚n s畛 d畛ng k畉t qu畉 c畛a test case tr動畛c 畛 lm 畉u vo
cho test case sau
3.3. Vi畉t test case s畛 d畛ng BDD
17. M畛t s畛 l動u 箪: M畛i file test case l 1 t鱈nh nng c畉n ki畛m tra (trong 坦 s畉
ch畛a c叩c test case c畉n ki畛m tra c畛a t鱈nh nng 坦) T動董ng 動董ng nh動
m畛t test suite
T畉o file Test case
18. Vi畉t n畛i dung Test case
Feature d湛ng 畛 m担 t畉 c叩i t鱈nh nng ch炭ng ta s畉 test
Scenario [m担 t畉 t坦m t畉t n畛i dung k畛ch b畉n test c畛a feature]
Given: M担 t畉 tr畉ng th叩i ban 畉u c畛a h畛 th畛ng
When: M担 t畉 c叩c b動畛c hay c叩c hnh vi th畛c hi畛n tr棚n h畛 th畛ng
Then: M担 t畉 b動畛c ki畛m tra
Background: B動畛c th畛c hi畛n tr動畛c khi ch畉y qua c叩c scenario
D畛 li畛u: D畛 li畛u s畛 d畛ng trong test case c坦 th畛 l gi叩 tr畛 c畛 th畛 ho畉c l畉y t畛
Excel
M畛i scenario g畛m nhi畛u steps. C叩c steps 動畛c b畉t 畉u b畉ng Given, When,
Then. D湛ng # 畛 comment