Python for blackbox testers


Published on

This is my experience as a non-technical, black box test engineer in a software development team. I try to explore answers to questions like: What are my strengths? Were my strengths becoming my weaknesses? Writing "code" is for developers; How can I? Yeah, but why python? * Was it worth the effort?

Published in: Technology

Python for blackbox testers

  1. 1. Presented at PyconSG on 14th June 2013
  2. 2. ● Coastal GeoScientist and Civil Engineer● 10+ years in Software Quality Assuranceand Functional Testing● HP Certified Professional in Quality Center● Lead Quality Assurance at Vistaprint● Contributor to Holmium Core● http://sajnikanth.comAbout me
  3. 3. ● Background to black-box testing● Manual vs Automated testing● Why python?● selenium and other uses● Lessons LearnedContents
  4. 4. Black-box tester?
  5. 5. Source -● Prepare test plans and test cases● Test the application● Find and record defects● Re-test● Regression testBlack-box testers task list
  6. 6. Qualities of a good black-box tester
  7. 7. How many test cases do you see?Whats the problem?5 * 3 * 3 * 2 * 2 = 180Test Cases * Browsers * Countries * Languages * EnvironmentTime to test on a few platforms?Good luck sucker!!
  8. 8. ● Repetitive manual regression = boring● Low test coverage● No common language● Ever growing Test Suites● Testing becomes a bottleneck● QA bites the bulletWhats the problem?Source -
  9. 9. ● "Fail fast; fail often" - Martin Fowler● Integration / Functional / Performance● Building block for continuous integration anddeployment● Higher Return on investmentAutomated testing
  10. 10. QTP to the rescue● Expensive● Proprietary● Windows-centric● "Ageing" community● Familiar (HP Certified after all)● Popular● Supports Record and PlayI think it is time for QTP to die -
  11. 11. python?● Easy to setup● Readable code (easy for beginners)○ forced indentations; better for the team○ consistency● open source; active community / library
  12. 12. OK; Getting back to the problem5 * 3 * 3 * 2 * 2 = 180Test Cases * Browsers * Countries * Languages * EnvironmentTime to test on a few platforms?
  13. 13. ● Record and Play (Firefox)● Multiple browsers● Mobile Support● Multiple ways to locate an element● Screenshots● ...Selenium Features
  14. 14. ● Test APIs● Write scripts for simple UI tests● Create test data● Test Suites● Performance Testing● ...Working with python
  15. 15. Lessons learned
  16. 16. Lessons learnedWeb dev changes conventions - intrologin-name,intrologin-password etc.
  17. 17. 1. Use Page ObjectsPageObjects by Adam Goucher - learned
  18. 18. Lessons learned
  19. 19. 2. Wait instead of SleepExplicit and Implicit Waits - learned
  20. 20. 3. picknose is nicer testing for python -● Organize tests better● Run selected tests● Plugin Architecture● List all tests● Test Runner (less boilerplate code)Lessons learned
  21. 21. ● Run 30 tests on Firefox○ about 12 minutesLessons learned● Run 30 tests on a Headless browser○ about 7 minutes
  22. 22. 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○ vagrantLessons learned
  23. 23. ●● plugin for nosetests○ developed by Ali-Akber Saifee■● Page object definitions made easy● Other options:○ Specify environment○ Select browsers○ Run tests remotelyIntroducing Holmium
  24. 24. nosetests tests/
  25. 25. View this presentation from here -http://sajnikanth.comHow many software testers does it take to change a lightbulb?None; testers just report that the room is dark.Questions?