Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Functional test best practice

21 views

Published on

Best practices for functional testing

Published in: Software
  • Be the first to comment

  • Be the first to like this

Functional test best practice

  1. 1. E X P E R I E N C E T O O L S CUSTO M ER E X P E R I E N C E T O O L S DEVELOPER Lei Zhu October 23, 2018 Functional Test Best Practices
  2. 2. Introduction Lei Zhu Software Engineer WalmartLabs EMAIL: lzhu@walmart.com
  3. 3. Agenda • Test Automation Result Patterns • Common Problems & Best Practices • Test Armada’s Solution • Q&A
  4. 4. Test Automation Result Patterns
  5. 5. Expected Results
  6. 6. Random Failure Pattern
  7. 7. Single Test Failing on All Browsers
  8. 8. Single Browser Failing for All Tests
  9. 9. Combination Failure Pattern
  10. 10. All Failure Pattern
  11. 11. Common Problems & Best Practices
  12. 12. Common Problems: Selector Test Pattern • All tests fail in particular browser(s) Problem • Selector only works on some browsers or OS Example: :nth-child
  13. 13. Best Practices: Selector Best Practice • Support same selector for mainstream browsers • Selector: .class_name
  14. 14. Common Problems: Timing Test Pattern • One test fails in all browsers Problem • Test relies on sleeping or timing tricks to pass Example: sleep(), pause()
  15. 15. Best Practices: Timing Best Practice • Use wait() instead • Only operate when element is operable • Page is fully rendered • Element is in DOM • Element is in viewport • Insulate test from loading network resources
  16. 16. Common Problems: Non Deterministic Tests Test Pattern • One test fails in all browsers Problem • Non-deterministic test Example: Rolling Carousel
  17. 17. Best Practices: Non Deterministic Tests #1 Best Practice • Create predictable test • NO conditional statement • One test for one path
  18. 18. Best Practices : Non Deterministic Tests #2 Best Practice • Make AUT act predictable to accommodate automation
  19. 19. Common Problems: Test Dependencies Test Pattern • One test fails in all browsers • All tests fail in all browsers Problem • Test relies on result of other tests
  20. 20. Best Practices: Test Dependencies Best Practice • Isolate test from others • Use hooks to create repeatable test
  21. 21. Test Armada’s Solution
  22. 22. Test Armada: High Level Architecture AUTOMATION TEST ARMADA DATA INSIGHTS TEST ARMADA MOCKING APPIUM Sauce Labs TestObject GITHUB
  23. 23. Magellan Ecosystem Architecture
  24. 24. Q&A
  25. 25. Contact Us @testarmada github.com/testarmada http://www.testarmada.io

×