brace yourself from automation death trap
TRANSCRIPT
![Page 1: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/1.jpg)
Brace yourself from the
Automation TrapPrasad
Kalgutkar
![Page 2: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/2.jpg)
![Page 3: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/3.jpg)
Why we Automate?
![Page 4: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/4.jpg)
Fast Feedback
Input
Result
![Page 5: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/5.jpg)
Save Time & Money
Perform Exploratory TestingAnalyze future requirementsDeliver on time
![Page 6: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/6.jpg)
Then why we fail?
![Page 7: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/7.jpg)
Too much of unwanted
automationSource: http://www.energizers.com/portfolio-view/entangled
![Page 8: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/8.jpg)
Automation done Perfunctory!
Damn! We have agreed to
automate, let me write some tests
![Page 9: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/9.jpg)
“Are we building it correctly?”
![Page 10: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/10.jpg)
My journey of challenges
![Page 11: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/11.jpg)
eCommerce
Train Travel
Airline Travel
![Page 12: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/12.jpg)
Airline domain with a big Enterprise Org StructureMobile App Development & Frequent ReleasesMixed Skilled Testing TeamDistributed team across 4 locations
![Page 13: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/13.jpg)
As a Agile QA,What it meant
to me?
![Page 14: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/14.jpg)
…automation serving
as a help&
not an overhead!
![Page 15: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/15.jpg)
Some food for thought!
![Page 16: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/16.jpg)
#1Let automation run in
the blood!
![Page 17: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/17.jpg)
Be thoughtful while automating
Design &
ToolsClean Coding
How much?
&Where
to?
Runs on CI
QA Build from
CI
![Page 18: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/18.jpg)
# Break the silos in testing
# Every QA, contributes to automation
# Best when
business refers your test-cases
![Page 19: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/19.jpg)
Let’s Refactor!
Fail Fast,Grow Right!
Add,Delete,Merge!
Optimize as you
proceed
![Page 20: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/20.jpg)
#2Aim for the Test
Pyramid
![Page 21: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/21.jpg)
Test PyramidManual /
Exploratory
Impact
Business
FacingTests
Technology FacingTests
TimeCost
Integration
JavaScript
Web Service
UI
Unit
View
Courtesy: Anand Bagmar-What is Agile Testing?
![Page 22: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/22.jpg)
# Unit TestsFor iOS, Android, MWeb codeDevs own while doing TDD # Integration
TestsDevs own while doing TDD
# Functional TestsFocus only E2EQAs/Devs own it # GUI E2E
TestsFocus on UI detailsQAs/Devs own it
![Page 23: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/23.jpg)
#3Strongly dependent on OOPs concepts
![Page 24: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/24.jpg)
We usedPage Objects
User ProfileInformation
AccountsHistoryTransfers Apply
Loan
Account Balance
Open Demat
Home Page
![Page 25: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/25.jpg)
The right way...
● Has only required user services
● Knows about the Locators & Next Navigation!
● Delegates user actions to Driver
● Registered with Page Registry
User ProfileInformation
AccountsHistoryTransfers Apply
Loan
Account Balance
Open Demat
Home Page
![Page 26: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/26.jpg)
DefineHard-
workingDriver
![Page 27: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/27.jpg)
The Driver,
=> Provides actions to Page
Objects
=> May have setup methods
=> Takes care of Waits
![Page 28: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/28.jpg)
Single Test Layer⇒
Invokes single step implementation
⇒Calls relevant
Page Objects⇒
Respective library do user actions
Our Eco-system
![Page 29: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/29.jpg)
#4Test Cases: Try Behavior Driven
![Page 30: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/30.jpg)
How Cukes helped …
=> Scenarios are E2E only
=> Acted as the Framework
=> Everyone collaborates!
Given a ...
When I ...
Then I ...
Scenario : To test...
![Page 31: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/31.jpg)
Do’s
●Build independent test scenarios grouped in functional chunks
● If not cukes, provide sensible names to the tests
●Avoid setups in test-cases layer
![Page 32: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/32.jpg)
#5Maintainable Test
Data
![Page 33: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/33.jpg)
Keep it understan
dable
Keep it close to domain
Keep it simple
![Page 34: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/34.jpg)
In the scenario...
![Page 35: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/35.jpg)
WhenI search for flight with|origin |destination |type || BOM | DEL | One way|
ThenI should get “13A” as “aisle” seat
![Page 36: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/36.jpg)
Test Data Hash...
![Page 37: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/37.jpg)
When I enter “VISA” card details
Def testCards {“VISA” => {
“Num” => “400010004000”
“Exp Month” => “10”
“Exp Year” => “},“AMEX” => {
………
},}
![Page 38: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/38.jpg)
Test Data Objects...
![Page 39: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/39.jpg)
GivenI have a “delayed_multi_pax” PNR in my trips
some_step_def_method(type){
myPnr =PnrFactory.getPnr(type)...}
![Page 40: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/40.jpg)
Avoid data sheets or
CSVs
Leverage the
tech stack
Avoid data fetching from DB
![Page 41: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/41.jpg)
#6Test the Framework
![Page 42: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/42.jpg)
B’coz,
●Drivers, Page Objects are core!
●As the project grows, so do the contributors!
●When automation is the backbone of project delivery
![Page 43: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/43.jpg)
“Get them running…”
Get Continuous Integration
![Page 44: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/44.jpg)
“ …is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day…Each integration is verified by an automated build to detect integration errors as quickly as possible … “
- Martin Fowler, ThoughtWorks Chief Scientisthttp://www.thoughtworks.com/continuous-integration
Continuous Integration
![Page 45: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/45.jpg)
“Every experience, no
matter how bad it seems…
Holds a blessing of some kind”
- Gautam Buddha
![Page 46: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/46.jpg)
Thank You
![Page 47: Brace yourself from automation death trap](https://reader036.vdocument.in/reader036/viewer/2022062522/58705d1d1a28aba2118b6e09/html5/thumbnails/47.jpg)