SlideShare una empresa de Scribd logo
1 de 42
Behavior Driven Development (BDD)  with Selenium RC Presented by: MykolaKolisnyk
About me MykolaKolisnyk Overall experience: 6+ years Positions: QA Lead  Senior Automation Consultant  Test Automation Architect Tools:SilkTest TestComplete                    Selenium                    RFT SoapUI Co-author: “SilkTest manual” book (http://silktutorial.ru) Portal http://automated-testing.info
About presentation What’s that? Why? Behavior-Driven Development Solutions? Problems? How?
Builder xUnit Selenium Typical toolset
Business Analyst Test Designer xUnit Solution difficulties Not all people read tests code Developer Test Automation Engineer
xUnit Solution difficulties Complex code constructions are hard to maintain If it works don't touch it!
xUnit Solution difficulties Low informative report What exactly has happened?
How to improve it We gonna make it better
It should be clear to everyone We gonna make it better
More people should be involved We gonna make it better
Profit We gonna make it better
New approach? Behavior-Driven Development? Data-Driven Testing Keyword-DrivenTesting Model-Based Testing
How about tests like that? Behavior description prior to implementation
List of BDD engines NBehave Cucumber Freshen JBehave Behat
BDD tests structure Background Feature Given Background When Scenario 1 Then Scenario Scenario 2 Given Scenario N When Then
Connections to code Text instruction WhenI log into the system as “login”/”password” Actual Code When/log into the system as “(.*)””(.*)”/do|login,password| app.login( login , password )‏ end Explicit Selenium calls class App def login( username , password )‏ # Some actions end end
BDD project structure Main working folder Keyword implementations Core library Initialization module Tests storage
What BDD brings? Natural language instructions I can get it!
What BDD brings? Reports show steps to reproduce I see where the problem occurs!
What BDD brings? Process optimization Run Implement Design Test Automation pipeline On-demand runs Writes user stories BA
What BDD brings? Process optimization Run Implement Design Test Automation pipeline On-demand runs Write simple tests Dev
What BDD brings? Process optimization Run Implement Design Test Automation pipeline Analyze results Designs tests Tester
What BDD brings? Process optimization Run Implement Design Test Automation pipeline Results analysis Implementation & code maintenance ATE
Who participates in automation?
Stages to framework migration Decompose code by details level Extract Selenium object and wrap it into global object Wrap each function with appropriate keyword Re-design existing tests
Framework decomposition We care what we do only We care where we are Business Functions level Pages level We care how to do it Explicit Selenium calls Explicit Selenium calls Core level
Framework re-organization to BDD Code layer Business Functions level Pages level Global Selenium Object Core level
Implementation layer BF level Pages level Core level Tests layer Framework re-organization to BDD When /click on “(.*)” element/ do |locator| selenium.click( locator ) end Code layer BF level Pages level When I click on “Test” element Core level Selenium selenium.click( locator );
Collect all resources Initialize shell Global Selenium Object Run instructions Finalize execution Generate report Selenium place selenium.start() Start Call Command Stop DefaultSelenium.new selenium.stop()
There’re still some questions How to avoid duplicates? How to locate elements? How to store values? How to use random data?
UI elements mapping. What for? Which way is more reliable and informative? When I click on “Search" link When I click on "//div[@id='some_div']/button[text()='Add']" button When I click on "Add" button on "Home Page" When I create “test.txt" file in “%USERPROFILE%” folder When I create “test.txt" file in “C:Temp” folder
Page Title Name Item Alias Locator UI elements mapping. How? Examples: Ini file XML file
UI Mapping. Trivial case Text instruction:      When I click on the “Updates” link Actual code: selenium.click( “link=Updates” );
UI Mapping. Specific page Will look into this section Will take this locator When I click on the “Apply Button” on the “Links Page” Will click here: selenium.click(“links_apply_btn”) Explicit Selenium calls Similar elements on different pages
UI Mapping. Current page Will read current page title Will find section with matching header Will take this locator When I click on the “Apply Button” element Will click here: selenium.click(“links_apply_btn”) Explicit Selenium calls Similar elements on different pages
Different keywords can do the same things Examples:   When /click on the “(.*)” link/   When /click on “(.*)” link/   When /click on (.*) link/ Main challenges
Resolution: Standards & Naming Conventions!!! Trainings & Review!!! Main challenges
After that: Examples:   When /click on the “(.*)” link/    #Valid as conforms the rules When /click on “(.*)” link/#Invalid. Violates Rule #1 Main challenges Rule #1: each field, element, page name should have “the” article
Main challenges Too many keywords Resolution: organize keywords vocabulary
Main challenges Data exchange between steps Resolution: use external hash for data storage “My Folder” field now contains actual path
Main challenges Random data generation Resolution: Is necessary? Yes Use explicit value No Is needed? Do not pass a value No Yes Pass alias
Questions?

Más contenido relacionado

La actualidad más candente

Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Sargis Sargsyan
 
Code Camp Applying Modern Software Development Techniques To Ui Testing
Code Camp  Applying Modern Software Development Techniques To Ui TestingCode Camp  Applying Modern Software Development Techniques To Ui Testing
Code Camp Applying Modern Software Development Techniques To Ui TestingChristopherGTaylor
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object PatternDante Briones
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online trainingDivya Shree
 
Web based automation testing on Node.js environment
Web based automation testing on Node.js environmentWeb based automation testing on Node.js environment
Web based automation testing on Node.js environmentYu-Lin Huang
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumberDaniel Kummer
 
TFS 2010: Team Development on Crack
TFS 2010: Team Development on CrackTFS 2010: Team Development on Crack
TFS 2010: Team Development on CrackSteve Lange
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium Sargis Sargsyan
 
Continuous Integration, TDD & Living Documentation - Odoo Experience 2015
Continuous Integration, TDD & Living Documentation - Odoo Experience 2015Continuous Integration, TDD & Living Documentation - Odoo Experience 2015
Continuous Integration, TDD & Living Documentation - Odoo Experience 2015Colin Wren
 
#speakgeek - Angular JS
#speakgeek - Angular JS#speakgeek - Angular JS
#speakgeek - Angular JSDerek Chan
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction SheetvodQA
 
Whys and Hows of Automation
Whys and Hows of AutomationWhys and Hows of Automation
Whys and Hows of AutomationvodQA
 
Using galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingUsing galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingSarah Elson
 
SpecFlow and some things I've picked up
SpecFlow and some things I've picked upSpecFlow and some things I've picked up
SpecFlow and some things I've picked upMarcus Hammarberg
 
A Deeper Look at Team Foundation Server 2012 Version Control
A Deeper Look at Team Foundation Server 2012 Version ControlA Deeper Look at Team Foundation Server 2012 Version Control
A Deeper Look at Team Foundation Server 2012 Version ControlSteve Lange
 
Impact Analysis - LoopConf
Impact Analysis - LoopConfImpact Analysis - LoopConf
Impact Analysis - LoopConfChris Lema
 

La actualidad más candente (20)

Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Code Camp Applying Modern Software Development Techniques To Ui Testing
Code Camp  Applying Modern Software Development Techniques To Ui TestingCode Camp  Applying Modern Software Development Techniques To Ui Testing
Code Camp Applying Modern Software Development Techniques To Ui Testing
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
QA Automation testing online training
QA Automation testing online trainingQA Automation testing online training
QA Automation testing online training
 
Web based automation testing on Node.js environment
Web based automation testing on Node.js environmentWeb based automation testing on Node.js environment
Web based automation testing on Node.js environment
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
TFS 2010: Team Development on Crack
TFS 2010: Team Development on CrackTFS 2010: Team Development on Crack
TFS 2010: Team Development on Crack
 
Web Application Testing with Selenium
Web Application Testing with Selenium Web Application Testing with Selenium
Web Application Testing with Selenium
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Continuous Integration, TDD & Living Documentation - Odoo Experience 2015
Continuous Integration, TDD & Living Documentation - Odoo Experience 2015Continuous Integration, TDD & Living Documentation - Odoo Experience 2015
Continuous Integration, TDD & Living Documentation - Odoo Experience 2015
 
ASP.NET 5 & Unit Testing
ASP.NET 5 & Unit TestingASP.NET 5 & Unit Testing
ASP.NET 5 & Unit Testing
 
#speakgeek - Angular JS
#speakgeek - Angular JS#speakgeek - Angular JS
#speakgeek - Angular JS
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction Sheet
 
Whys and Hows of Automation
Whys and Hows of AutomationWhys and Hows of Automation
Whys and Hows of Automation
 
Using galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testingUsing galen framework for automated cross browser layout testing
Using galen framework for automated cross browser layout testing
 
SpecFlow and some things I've picked up
SpecFlow and some things I've picked upSpecFlow and some things I've picked up
SpecFlow and some things I've picked up
 
A Deeper Look at Team Foundation Server 2012 Version Control
A Deeper Look at Team Foundation Server 2012 Version ControlA Deeper Look at Team Foundation Server 2012 Version Control
A Deeper Look at Team Foundation Server 2012 Version Control
 
Impact Analysis - LoopConf
Impact Analysis - LoopConfImpact Analysis - LoopConf
Impact Analysis - LoopConf
 
Cucumber BDD
Cucumber BDDCucumber BDD
Cucumber BDD
 

Similar a BDD approach with Selenium RC

Spec flow – functional testing made easy
Spec flow – functional testing made easySpec flow – functional testing made easy
Spec flow – functional testing made easyPaul Stack
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentMonocularVision
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ideTestertester Jaipur
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1willmation
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersAdam Englander
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
AD207 Presentation
AD207 PresentationAD207 Presentation
AD207 Presentationmackejo1
 
Selenium Testing Training in Bangalore
Selenium Testing Training in BangaloreSelenium Testing Training in Bangalore
Selenium Testing Training in Bangalorerajkamal560066
 
Selenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedSelenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedDavid Harrison
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of ToolsDawn Code
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object patternMichael Palotas
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part IIMichael Fons
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
 
Steps to write Selenium
Steps to write Selenium  Steps to write Selenium
Steps to write Selenium Rohit Thakur
 

Similar a BDD approach with Selenium RC (20)

Spec flow – functional testing made easy
Spec flow – functional testing made easySpec flow – functional testing made easy
Spec flow – functional testing made easy
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for Beginners
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
AD207 Presentation
AD207 PresentationAD207 Presentation
AD207 Presentation
 
Selenium Testing Training in Bangalore
Selenium Testing Training in BangaloreSelenium Testing Training in Bangalore
Selenium Testing Training in Bangalore
 
Selenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedSelenium Testing @ Agile Speed
Selenium Testing @ Agile Speed
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of Tools
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object pattern
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part II
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Steps to write Selenium
Steps to write Selenium  Steps to write Selenium
Steps to write Selenium
 

Último

Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Amil Baba Naveed Bangali
 
Pradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun Jani
Pradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun JaniPradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun Jani
Pradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun JaniPradeep Bhanot
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶anilsa9823
 
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》2tofliij
 
Genesis 1:10 || Meditate the Scripture daily verse by verse
Genesis 1:10  ||  Meditate the Scripture daily verse by verseGenesis 1:10  ||  Meditate the Scripture daily verse by verse
Genesis 1:10 || Meditate the Scripture daily verse by versemaricelcanoynuay
 
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UKNo 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UKAmil Baba Naveed Bangali
 
madina book to learn arabic part1
madina   book   to  learn  arabic  part1madina   book   to  learn  arabic  part1
madina book to learn arabic part1JoEssam
 
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRElite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRDelhi Call girls
 
Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...
Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...
Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...Amil Baba Company
 
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...anilsa9823
 
Study of the Psalms Chapter 1 verse 2 - wanderean
Study of the Psalms Chapter 1 verse 2 - wandereanStudy of the Psalms Chapter 1 verse 2 - wanderean
Study of the Psalms Chapter 1 verse 2 - wandereanmaricelcanoynuay
 
Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientiajfrenchau
 
Surah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual PracticesSurah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual Practicesaijazuddin14
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...Amil Baba Mangal Maseeh
 
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UKVashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UKAmil Baba Naveed Bangali
 
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️soniya singh
 
Flores de Mayo-history and origin we need to understand
Flores de Mayo-history and origin we need to understandFlores de Mayo-history and origin we need to understand
Flores de Mayo-history and origin we need to understandvillamilcecil909
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...baharayali
 

Último (20)

Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
Top Astrologer in UK Best Vashikaran Specialist in England Amil baba Contact ...
 
Pradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun Jani
Pradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun JaniPradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun Jani
Pradeep Bhanot - Friend, Philosopher Guide And The Brand By Arjun Jani
 
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service  🕶
CALL ON ➥8923113531 🔝Call Girls Nishatganj Lucknow best Female service 🕶
 
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
 
Genesis 1:10 || Meditate the Scripture daily verse by verse
Genesis 1:10  ||  Meditate the Scripture daily verse by verseGenesis 1:10  ||  Meditate the Scripture daily verse by verse
Genesis 1:10 || Meditate the Scripture daily verse by verse
 
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UKNo 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
No 1 Amil baba in UK Best Astrologer in UK Famous Vashikaran Specialist in UK
 
madina book to learn arabic part1
madina   book   to  learn  arabic  part1madina   book   to  learn  arabic  part1
madina book to learn arabic part1
 
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCRElite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
Elite Class ➥8448380779▻ Call Girls In Mehrauli Gurgaon Road Delhi NCR
 
Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...
Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...
Real Amil baba in Pakistan Real NO1 Amil baba Kala Jado Amil baba RAwalpindi ...
 
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
Lucknow 💋 Call Girls Lucknow - Book 8923113531 Call Girls Available 24 Hours ...
 
Study of the Psalms Chapter 1 verse 2 - wanderean
Study of the Psalms Chapter 1 verse 2 - wandereanStudy of the Psalms Chapter 1 verse 2 - wanderean
Study of the Psalms Chapter 1 verse 2 - wanderean
 
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientia
 
Surah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual PracticesSurah Yasin and Daily Spiritual Practices
Surah Yasin and Daily Spiritual Practices
 
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
+92343-7800299 No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Ka...
 
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UKVashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
Vashikaran Specialist in London Black Magic Removal No 1 Astrologer in UK
 
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
Call Girls in sarojini nagar Delhi 8264348440 ✅ call girls ❤️
 
Flores de Mayo-history and origin we need to understand
Flores de Mayo-history and origin we need to understandFlores de Mayo-history and origin we need to understand
Flores de Mayo-history and origin we need to understand
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...Authentic Black magic, Kala ilam expert in UAE  and Kala ilam specialist in S...
Authentic Black magic, Kala ilam expert in UAE and Kala ilam specialist in S...
 

BDD approach with Selenium RC

  • 1. Behavior Driven Development (BDD) with Selenium RC Presented by: MykolaKolisnyk
  • 2. About me MykolaKolisnyk Overall experience: 6+ years Positions: QA Lead Senior Automation Consultant Test Automation Architect Tools:SilkTest TestComplete Selenium RFT SoapUI Co-author: “SilkTest manual” book (http://silktutorial.ru) Portal http://automated-testing.info
  • 3. About presentation What’s that? Why? Behavior-Driven Development Solutions? Problems? How?
  • 4. Builder xUnit Selenium Typical toolset
  • 5. Business Analyst Test Designer xUnit Solution difficulties Not all people read tests code Developer Test Automation Engineer
  • 6. xUnit Solution difficulties Complex code constructions are hard to maintain If it works don't touch it!
  • 7. xUnit Solution difficulties Low informative report What exactly has happened?
  • 8. How to improve it We gonna make it better
  • 9. It should be clear to everyone We gonna make it better
  • 10. More people should be involved We gonna make it better
  • 11. Profit We gonna make it better
  • 12. New approach? Behavior-Driven Development? Data-Driven Testing Keyword-DrivenTesting Model-Based Testing
  • 13. How about tests like that? Behavior description prior to implementation
  • 14. List of BDD engines NBehave Cucumber Freshen JBehave Behat
  • 15. BDD tests structure Background Feature Given Background When Scenario 1 Then Scenario Scenario 2 Given Scenario N When Then
  • 16. Connections to code Text instruction WhenI log into the system as “login”/”password” Actual Code When/log into the system as “(.*)””(.*)”/do|login,password| app.login( login , password )‏ end Explicit Selenium calls class App def login( username , password )‏ # Some actions end end
  • 17. BDD project structure Main working folder Keyword implementations Core library Initialization module Tests storage
  • 18. What BDD brings? Natural language instructions I can get it!
  • 19. What BDD brings? Reports show steps to reproduce I see where the problem occurs!
  • 20. What BDD brings? Process optimization Run Implement Design Test Automation pipeline On-demand runs Writes user stories BA
  • 21. What BDD brings? Process optimization Run Implement Design Test Automation pipeline On-demand runs Write simple tests Dev
  • 22. What BDD brings? Process optimization Run Implement Design Test Automation pipeline Analyze results Designs tests Tester
  • 23. What BDD brings? Process optimization Run Implement Design Test Automation pipeline Results analysis Implementation & code maintenance ATE
  • 24. Who participates in automation?
  • 25. Stages to framework migration Decompose code by details level Extract Selenium object and wrap it into global object Wrap each function with appropriate keyword Re-design existing tests
  • 26. Framework decomposition We care what we do only We care where we are Business Functions level Pages level We care how to do it Explicit Selenium calls Explicit Selenium calls Core level
  • 27. Framework re-organization to BDD Code layer Business Functions level Pages level Global Selenium Object Core level
  • 28. Implementation layer BF level Pages level Core level Tests layer Framework re-organization to BDD When /click on “(.*)” element/ do |locator| selenium.click( locator ) end Code layer BF level Pages level When I click on “Test” element Core level Selenium selenium.click( locator );
  • 29. Collect all resources Initialize shell Global Selenium Object Run instructions Finalize execution Generate report Selenium place selenium.start() Start Call Command Stop DefaultSelenium.new selenium.stop()
  • 30. There’re still some questions How to avoid duplicates? How to locate elements? How to store values? How to use random data?
  • 31. UI elements mapping. What for? Which way is more reliable and informative? When I click on “Search" link When I click on "//div[@id='some_div']/button[text()='Add']" button When I click on "Add" button on "Home Page" When I create “test.txt" file in “%USERPROFILE%” folder When I create “test.txt" file in “C:Temp” folder
  • 32. Page Title Name Item Alias Locator UI elements mapping. How? Examples: Ini file XML file
  • 33. UI Mapping. Trivial case Text instruction: When I click on the “Updates” link Actual code: selenium.click( “link=Updates” );
  • 34. UI Mapping. Specific page Will look into this section Will take this locator When I click on the “Apply Button” on the “Links Page” Will click here: selenium.click(“links_apply_btn”) Explicit Selenium calls Similar elements on different pages
  • 35. UI Mapping. Current page Will read current page title Will find section with matching header Will take this locator When I click on the “Apply Button” element Will click here: selenium.click(“links_apply_btn”) Explicit Selenium calls Similar elements on different pages
  • 36. Different keywords can do the same things Examples: When /click on the “(.*)” link/ When /click on “(.*)” link/ When /click on (.*) link/ Main challenges
  • 37. Resolution: Standards & Naming Conventions!!! Trainings & Review!!! Main challenges
  • 38. After that: Examples: When /click on the “(.*)” link/ #Valid as conforms the rules When /click on “(.*)” link/#Invalid. Violates Rule #1 Main challenges Rule #1: each field, element, page name should have “the” article
  • 39. Main challenges Too many keywords Resolution: organize keywords vocabulary
  • 40. Main challenges Data exchange between steps Resolution: use external hash for data storage “My Folder” field now contains actual path
  • 41. Main challenges Random data generation Resolution: Is necessary? Yes Use explicit value No Is needed? Do not pass a value No Yes Pass alias

Notas del editor

  1. Тема данного доклада “Использование селениума в контексте Behavior-Driven Development” (далее BDD). В данном докладе больше речь вестись будет не столько о Selenium, сколько о подходе как таковом, а также о том, каким образом Selenium встраивается в решение построенное с использованием данного подхода. Selenium (точнее его клиентская часть, которой пользуются разработчики автотестов) представляет из себя библиотеку с набором функций. То есть сама по себе библиотека особого интереса не представляет, а важен контекст, в котором она используется. Вот на этот и ряд других моментов будет и сделан упор, когда речь будет вестись об использовании Selenium-а.
  2. Так кто же участвует в автоматизации тестирования теперь? Вся команда. Все вместе и каждый по отдельности