Watir The Beginning
-
Upload
automated-testinginfo -
Category
Technology
-
view
1.971 -
download
0
description
Transcript of Watir The Beginning
A U T O M AT E D -T E S T I N G . I N F O
Watir – The Beginning
A U T O M AT E D -T E S T I N G . I N F O
2
About Myself
2
Andrii DzyniaSenior Automation QA Engineer
A U T O M AT E D -T E S T I N G . I N F O
Agenda
Example
Watir
Question
3
A U T O M AT E D -T E S T I N G . I N F O
Problem
Automated testing of web applications
4
A U T O M AT E D -T E S T I N G . I N F O
How we could solve it?
5
WatijWin32-W
atir
WatiN
Watir
Watir
Selenium
A U T O M AT E D -T E S T I N G . I N F O
What is it?
• Watir – pronounced like “Water”• Web application testing in Ruby• Open-source• Lovely API• Running without browser• A lot of forks
6
A U T O M AT E D -T E S T I N G . I N F O
How it works?
7
A U T O M AT E D -T E S T I N G . I N F O
What is main advantage?
8
A U T O M AT E D -T E S T I N G . I N F O
Record & Play ?
Watir Recorder ++
TestWise Recorder
Firewatir-Gen
CubicTest
9
A U T O M AT E D -T E S T I N G . I N F O
This is for noobs
10
A U T O M AT E D -T E S T I N G . I N F O
What is professional way?
11
A U T O M AT E D -T E S T I N G . I N F O
So what we will do today?
– Test ‘Point of Sale’ PHP web application.
–Write Watir automated tests in different styles.
– Define benefits of each style.
12
A U T O M AT E D -T E S T I N G . I N F O
Web Application To Test
13
A U T O M AT E D -T E S T I N G . I N F O
First step
• IRB - Interactive Ruby Shell• Drive the browser• Some features
14
A U T O M AT E D -T E S T I N G . I N F O
Scenario
15
Open homepage
Login if need
Go to gifts page
Add gifs
Verify gift added
A U T O M AT E D -T E S T I N G . I N F O
Nice but not scalable?
16
A U T O M AT E D -T E S T I N G . I N F O
TestUnit – xUnit tool
17
A U T O M AT E D -T E S T I N G . I N F O
Scenario
18
Open homepage
Login if need
Go to customers
page
Add customer
Verify customer
added
A U T O M AT E D -T E S T I N G . I N F O
What about Business Users?
19
A U T O M AT E D -T E S T I N G . I N F O
How BDD fits with Ruby?
20
A U T O M AT E D -T E S T I N G . I N F O
Rspec library
21
A U T O M AT E D -T E S T I N G . I N F O
Cucumber
22
•Given•When•Then
In three words
A U T O M AT E D -T E S T I N G . I N F O
What we have seen today
• Validation method• xUnit style• BDD: Rspec and Cucumber
23
A U T O M AT E D -T E S T I N G . I N F O
Choose exactly what you need
24
“Life is a series of choices.”
25 A U T O M AT E D -T E S T I N G . I N F O