Python for blackbox testers

Sajnikanth Suriyanarayanan
Sajnikanth SuriyanarayananQA Engineer at Vistaprint
Presented at PyconSG on 14th June 2013
● Coastal GeoScientist and Civil Engineer
● 10+ years in Software Quality Assurance
and Functional Testing
● HP Certified Professional in Quality Center
● Lead Quality Assurance at Vistaprint
● Contributor to Holmium Core
● http://sajnikanth.com
About me
● Background to black-box testing
● Manual vs Automated testing
● Why python?
● selenium and other uses
● Lessons Learned
Contents
Black-box tester?
Source - http://innovation.lv/ino2/publications/leonardo_manual/en/www.innosupport.net/webhelp/wso/index.cfm@fuseactionlearnl_id3808pl_id3554.htm
● Prepare test plans and test cases
● Test the application
● Find and record defects
● Re-test
● Regression test
Black-box tester's task list
Qualities of a good black-box tester
How many test cases do you see?
What's the problem?
5 * 3 * 3 * 2 * 2 = 180
Test Cases * Browsers * Countries * Languages * Environment
Time to test on a few platforms?
Good luck sucker!!
● Repetitive manual regression = boring
● Low test coverage
● No common language
● Ever growing Test Suites
● Testing becomes a bottleneck
● QA bites the bullet
What's the problem?
Source -
http://en.wikipedia.org/wiki/Infinite_monkey_theorem
● "Fail fast; fail often" - Martin Fowler
● Integration / Functional / Performance
● Building block for continuous integration and
deployment
● Higher Return on investment
Automated testing
QTP to the rescue
● Expensive
● Proprietary
● Windows-centric
● "Ageing" community
● Familiar (HP Certified after all)
● Popular
● Supports Record and Play
I think it is time for QTP to die - http://paulhammant.com/blog/die-qtp-die.html/
python?
● Easy to setup
● Readable code (easy for beginners)
○ forced indentations; better for the team
○ consistency
● open source; active community / library
OK; Getting back to the problem
5 * 3 * 3 * 2 * 2 = 180
Test Cases * Browsers * Countries * Languages * Environment
Time to test on a few platforms?
● Record and Play (Firefox)
● Multiple browsers
● Mobile Support
● Multiple ways to locate an element
● Screenshots
● ...
Selenium Features
● Test APIs
● Write scripts for simple UI tests
● Create test data
● Test Suites
● Performance Testing
● ...
Working with python
Lessons learned
Lessons learned
Web dev changes conventions - intrologin-name,
intrologin-password etc.
1. Use Page Objects
PageObjects by Adam Goucher -
http://www.pushtotest.com/create-robust-selenium-tests-with-pageobjects
Lessons learned
Python for blackbox testers
Lessons learned
2. Wait instead of Sleep
Explicit and Implicit Waits -
http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp
Lessons learned
3. pick
nose is nicer testing for python -
https://nose.readthedocs.org/en/latest/
● Organize tests better
● Run selected tests
● Plugin Architecture
● List all tests
● Test Runner (less boilerplate code)
Lessons learned
● Run 30 tests on Firefox
○ about 12 minutes
Lessons learned
● Run 30 tests on a Headless browser
○ about 7 minutes
4. use headless
● step toward Continuous Integration
○ jenkins / teamcity / Travis CI are phantomjs-ready
● better performance than Firefox / Chrome
● works without GUI
○ no interruption
○ ec2 micro instance
○ vagrant
Lessons learned
● https://holmiumcore.readthedocs.org
● plugin for nosetests
○ developed by Ali-Akber Saifee
■ http://ali.indydevs.org/
● Page object definitions made easy
● Other options:
○ Specify environment
○ Select browsers
○ Run tests remotely
Introducing Holmium
nosetests tests/vistamobi_tests.py
--with-holmium
--holmium-browser=firefox
--holmium-environment=staging
--holmium-useragent=iphone
View this presentation from here -
http://sajnikanth.com
How many software testers does it take to change a lightbulb?
None; testers just report that the room is dark.
Questions?
1 of 26

Recommended

AUTOMATED TESTING USING PYTHON (ATE) by
AUTOMATED TESTING USING PYTHON (ATE)AUTOMATED TESTING USING PYTHON (ATE)
AUTOMATED TESTING USING PYTHON (ATE)Yuvaraja Ravi
4.4K views33 slides
UNIT CONVERTER by
UNIT CONVERTERUNIT CONVERTER
UNIT CONVERTERNishita Kaptak
2.7K views16 slides
Mobile Apps Design Principles by
Mobile Apps Design PrinciplesMobile Apps Design Principles
Mobile Apps Design PrinciplesMohamad Sani
1.8K views42 slides
Introduction to jmeter by
Introduction to jmeterIntroduction to jmeter
Introduction to jmetertest test
11.5K views21 slides
Introduction to Python - Training for Kids by
Introduction to Python - Training for KidsIntroduction to Python - Training for Kids
Introduction to Python - Training for KidsAimee Maree Forsstrom
7.2K views44 slides
dfd fitness app (1).pdf by
dfd fitness app (1).pdfdfd fitness app (1).pdf
dfd fitness app (1).pdfNuriyAzurin
233 views1 slide

More Related Content

What's hot

What is the difference between manual testing and automation testing by
What is the difference between manual testing and automation testingWhat is the difference between manual testing and automation testing
What is the difference between manual testing and automation testingEr Mahednra Chauhan
1.6K views2 slides
Introduction to python for Beginners by
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
129.3K views19 slides
iOS Architecture by
iOS ArchitectureiOS Architecture
iOS ArchitectureJacky Lian
1.9K views24 slides
Learning Python with PyCharm EDU by
Learning Python with PyCharm EDU Learning Python with PyCharm EDU
Learning Python with PyCharm EDU Sergey Aganezov
2.1K views13 slides
Gor Nishanov, C++ Coroutines – a negative overhead abstraction by
Gor Nishanov,  C++ Coroutines – a negative overhead abstractionGor Nishanov,  C++ Coroutines – a negative overhead abstraction
Gor Nishanov, C++ Coroutines – a negative overhead abstractionSergey Platonov
9.7K views95 slides
for loop in java by
for loop in java for loop in java
for loop in java Majid Ali
1.8K views17 slides

What's hot(20)

What is the difference between manual testing and automation testing by Er Mahednra Chauhan
What is the difference between manual testing and automation testingWhat is the difference between manual testing and automation testing
What is the difference between manual testing and automation testing
Er Mahednra Chauhan1.6K views
Introduction to python for Beginners by Sujith Kumar
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar129.3K views
iOS Architecture by Jacky Lian
iOS ArchitectureiOS Architecture
iOS Architecture
Jacky Lian1.9K views
Learning Python with PyCharm EDU by Sergey Aganezov
Learning Python with PyCharm EDU Learning Python with PyCharm EDU
Learning Python with PyCharm EDU
Sergey Aganezov2.1K views
Gor Nishanov, C++ Coroutines – a negative overhead abstraction by Sergey Platonov
Gor Nishanov,  C++ Coroutines – a negative overhead abstractionGor Nishanov,  C++ Coroutines – a negative overhead abstraction
Gor Nishanov, C++ Coroutines – a negative overhead abstraction
Sergey Platonov9.7K views
for loop in java by Majid Ali
for loop in java for loop in java
for loop in java
Majid Ali1.8K views
tybsc it asp.net full unit 1,2,3,4,5,6 notes by WE-IT TUTORIALS
tybsc it asp.net full unit 1,2,3,4,5,6 notestybsc it asp.net full unit 1,2,3,4,5,6 notes
tybsc it asp.net full unit 1,2,3,4,5,6 notes
WE-IT TUTORIALS49.7K views
Lecture 2 history_of_c by eShikshak
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_c
eShikshak1.5K views
Algoritmos e Técnicas de Programação - Aula 03 by thomasdacosta
Algoritmos e Técnicas de Programação - Aula 03Algoritmos e Técnicas de Programação - Aula 03
Algoritmos e Técnicas de Programação - Aula 03
thomasdacosta2.4K views
Programming in c by indra Kishor
Programming in cProgramming in c
Programming in c
indra Kishor10.9K views
Introduction to Python by Nowell Strite
Introduction to PythonIntroduction to Python
Introduction to Python
Nowell Strite167.9K views
Peer-graded Assignment Let's get talking Johannes Bambang Wirawan.pdf by Johannes Bambang Wirawan
Peer-graded Assignment Let's get talking Johannes Bambang Wirawan.pdfPeer-graded Assignment Let's get talking Johannes Bambang Wirawan.pdf
Peer-graded Assignment Let's get talking Johannes Bambang Wirawan.pdf
Performance Testing With Jmeter by Adam Goucher
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
Adam Goucher19.6K views
Computational Thinking by showslidedump
Computational ThinkingComputational Thinking
Computational Thinking
showslidedump8.4K views
Special value testing by Bapi Das
Special value testingSpecial value testing
Special value testing
Bapi Das2.6K views
Performance testing and reporting with JMeter by jvSlideshare
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
jvSlideshare27.4K views

Similar to Python for blackbox testers

UPC Plone Testing Talk by
UPC Plone Testing TalkUPC Plone Testing Talk
UPC Plone Testing TalkTimo Stollenwerk
605 views38 slides
Test Driven Development with PHP by
Test Driven Development with PHPTest Driven Development with PHP
Test Driven Development with PHPRogério Vicente
2K views16 slides
Behaviour Testing and Continuous Integration with Drupal by
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupalsmithmilner
904 views32 slides
Build and release iOS apps using Fastlane tools by
Build and release iOS apps using Fastlane toolsBuild and release iOS apps using Fastlane tools
Build and release iOS apps using Fastlane toolsWise Engineering
127 views25 slides
Codeception: introduction to php testing by
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testingEngineor
2.8K views20 slides
GTAC 2015 by
GTAC 2015GTAC 2015
GTAC 2015Dino Su
874 views78 slides

Similar to Python for blackbox testers(20)

Behaviour Testing and Continuous Integration with Drupal by smithmilner
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
smithmilner904 views
Build and release iOS apps using Fastlane tools by Wise Engineering
Build and release iOS apps using Fastlane toolsBuild and release iOS apps using Fastlane tools
Build and release iOS apps using Fastlane tools
Wise Engineering127 views
Codeception: introduction to php testing by Engineor
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
Engineor2.8K views
GTAC 2015 by Dino Su
GTAC 2015GTAC 2015
GTAC 2015
Dino Su874 views
Test all the things! Automated testing with Drupal 8 by Sam Becker
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
Sam Becker1.4K views
Vietnam qa meetup by Syam Sasi
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
Syam Sasi225 views
Android developer fundamentals training overview Part II by Yoza Aprilio
Android developer fundamentals training overview Part IIAndroid developer fundamentals training overview Part II
Android developer fundamentals training overview Part II
Yoza Aprilio264 views
Codeception: introduction to php testing (v2 - Aberdeen php) by Engineor
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
Engineor456 views
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience" by LogeekNightUkraine
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
LogeekNightUkraine103 views
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo... by MobileMonday Estonia
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Front-end Testing (manual, automated, you name it) - Erich Jagomägis - Develo...
Creating a reasonable project boilerplate by Stanislav Petrov
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
Stanislav Petrov104 views
Good practices for debugging Selenium and Appium tests by Abhijeet Vaikar
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar233 views
DrupalGov 2017: Testing any day: guide to end to end test driven Drupal projects by Vladimir Roudakov
DrupalGov 2017: Testing any day: guide to end to end test driven Drupal projectsDrupalGov 2017: Testing any day: guide to end to end test driven Drupal projects
DrupalGov 2017: Testing any day: guide to end to end test driven Drupal projects
Vladimir Roudakov353 views
Passing the Joel Test in the PHP World (phpbnl10) by Lorna Mitchell
Passing the Joel Test in the PHP World (phpbnl10)Passing the Joel Test in the PHP World (phpbnl10)
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell9.2K views
Moodle Development Best Pracitces by Justin Filip
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
Justin Filip15.5K views
Gomobile: gophers in the land of Android by Jovica Popovic
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of Android
Jovica Popovic184 views
Developer Experience to Testing by Mozaic Works
Developer Experience to TestingDeveloper Experience to Testing
Developer Experience to Testing
Mozaic Works468 views
Demise of test scripts rise of test ideas by Richard Robinson
Demise of test scripts rise of test ideasDemise of test scripts rise of test ideas
Demise of test scripts rise of test ideas
Richard Robinson4K views

Recently uploaded

TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
11 views15 slides
Empathic Computing: Delivering the Potential of the Metaverse by
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the MetaverseMark Billinghurst
449 views80 slides
Black and White Modern Science Presentation.pptx by
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptxmaryamkhalid2916
14 views21 slides
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
66 views25 slides
Report 2030 Digital Decade by
Report 2030 Digital DecadeReport 2030 Digital Decade
Report 2030 Digital DecadeMassimo Talia
13 views41 slides
Data-centric AI and the convergence of data and model engineering: opportunit... by
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...Paolo Missier
29 views40 slides

Recently uploaded(20)

TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab11 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst449 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier29 views
AI: mind, matter, meaning, metaphors, being, becoming, life values by Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
[2023] Putting the R! in R&D.pdf by Eleanor McHugh
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh38 views
How the World's Leading Independent Automotive Distributor is Reinventing Its... by NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman25 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS15 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price12 views
Web Dev - 1 PPT.pdf by gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet52 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta14 views

Python for blackbox testers

  • 1. Presented at PyconSG on 14th June 2013
  • 2. ● Coastal GeoScientist and Civil Engineer ● 10+ years in Software Quality Assurance and Functional Testing ● HP Certified Professional in Quality Center ● Lead Quality Assurance at Vistaprint ● Contributor to Holmium Core ● http://sajnikanth.com About me
  • 3. ● Background to black-box testing ● Manual vs Automated testing ● Why python? ● selenium and other uses ● Lessons Learned Contents
  • 5. Source - http://innovation.lv/ino2/publications/leonardo_manual/en/www.innosupport.net/webhelp/wso/index.cfm@fuseactionlearnl_id3808pl_id3554.htm ● Prepare test plans and test cases ● Test the application ● Find and record defects ● Re-test ● Regression test Black-box tester's task list
  • 6. Qualities of a good black-box tester
  • 7. How many test cases do you see? What's the problem? 5 * 3 * 3 * 2 * 2 = 180 Test Cases * Browsers * Countries * Languages * Environment Time to test on a few platforms? Good luck sucker!!
  • 8. ● Repetitive manual regression = boring ● Low test coverage ● No common language ● Ever growing Test Suites ● Testing becomes a bottleneck ● QA bites the bullet What's the problem? Source - http://en.wikipedia.org/wiki/Infinite_monkey_theorem
  • 9. ● "Fail fast; fail often" - Martin Fowler ● Integration / Functional / Performance ● Building block for continuous integration and deployment ● Higher Return on investment Automated testing
  • 10. QTP to the rescue ● Expensive ● Proprietary ● Windows-centric ● "Ageing" community ● Familiar (HP Certified after all) ● Popular ● Supports Record and Play I think it is time for QTP to die - http://paulhammant.com/blog/die-qtp-die.html/
  • 11. python? ● Easy to setup ● Readable code (easy for beginners) ○ forced indentations; better for the team ○ consistency ● open source; active community / library
  • 12. OK; Getting back to the problem 5 * 3 * 3 * 2 * 2 = 180 Test Cases * Browsers * Countries * Languages * Environment Time to test on a few platforms?
  • 13. ● Record and Play (Firefox) ● Multiple browsers ● Mobile Support ● Multiple ways to locate an element ● Screenshots ● ... Selenium Features
  • 14. ● Test APIs ● Write scripts for simple UI tests ● Create test data ● Test Suites ● Performance Testing ● ... Working with python
  • 16. Lessons learned Web dev changes conventions - intrologin-name, intrologin-password etc.
  • 17. 1. Use Page Objects PageObjects by Adam Goucher - http://www.pushtotest.com/create-robust-selenium-tests-with-pageobjects Lessons learned
  • 20. 2. Wait instead of Sleep Explicit and Implicit Waits - http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp Lessons learned
  • 21. 3. pick nose is nicer testing for python - https://nose.readthedocs.org/en/latest/ ● Organize tests better ● Run selected tests ● Plugin Architecture ● List all tests ● Test Runner (less boilerplate code) Lessons learned
  • 22. ● Run 30 tests on Firefox ○ about 12 minutes Lessons learned ● Run 30 tests on a Headless browser ○ about 7 minutes
  • 23. 4. use headless ● step toward Continuous Integration ○ jenkins / teamcity / Travis CI are phantomjs-ready ● better performance than Firefox / Chrome ● works without GUI ○ no interruption ○ ec2 micro instance ○ vagrant Lessons learned
  • 24. ● https://holmiumcore.readthedocs.org ● plugin for nosetests ○ developed by Ali-Akber Saifee ■ http://ali.indydevs.org/ ● Page object definitions made easy ● Other options: ○ Specify environment ○ Select browsers ○ Run tests remotely Introducing Holmium
  • 26. View this presentation from here - http://sajnikanth.com How many software testers does it take to change a lightbulb? None; testers just report that the room is dark. Questions?