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.

Test Data - Food for your Test Automation Framework

4,980 views

Published on

Slides from my talk in Selenium Conference 2016, Bangalore

Blog post: http://essenceoftesting.blogspot.com/2016/06/test-data-food-for-test-automation.html

Abstract:
Building a Test Automation Framework is easy - there are so many resources / guides / blogs / etc. available to help you get started and help solve the issues you get along the journey.

Teams already building 1000s of tests of various types - UI, web service-based, integration, unit, etc. is a proof of that.

However, building a "good" Test Automation Framework is not very easy. There are a lot of principles and practices you need to use, in the right context, with a good set of skills required to make the Test Automation Framework maintainable, scalable and reusable.

In this talk, we will focus on one of the critical aspects and patterns in building the Test Automation framework - Test Data!

We will look at different data patterns as options and techniques how to create, manage, use, reuse Test Data in a way to keep the tests running in an reliable and deterministic way. We will also discuss what questions to ask, what things to think about in selecting your approach for Test Data!

This discussion will be applicable for any type of Test Automation (web / mobile / desktop), but, we will focus primarily on UI automation frameworks, ex. using Selenium.

Video & blog post will be linked soon!

Published in: Software
  • Be the first to comment

Test Data - Food for your Test Automation Framework

  1. 1. TEST DATA – FOOD FOR TEST AUTOMATION FRAMEWORK Anand Bagmar Software Quality Evangelist
  2. 2. @BagmarAnand about.me/anand.bagmar ABOUT ME
  3. 3. Why are you here?
  4. 4. Test Automation A PRACTICE THAT MAKES TEAMS SUCCESSFUL?
  5. 5. Test Automation A PRACTICE THAT MAKES TEAMS UNSUCCESSFUL?
  6. 6. Why do we do Test Automation?
  7. 7. QUICK FEEDBACK
  8. 8. Automation - A Safety Net
  9. 9. How to get value from Test Automation?
  10. 10. Run on every change in the codebase Product & Test
  11. 11. What makes Automation successful?
  12. 12. o  Repeatable o  Deterministic o  Indicates Quality
  13. 13. What makes Automation Repeatable?
  14. 14. Test Data
  15. 15. WHAT IS TEST DATA? ¨ Input - Data required for test to execute ¨ Environment configurations ¨ Credentials ¨ URLs ¨ … ¨ Output - Expected Data as output of actions done on Product-under-test
  16. 16. What is a Design Pattern?
  17. 17. Test Data Patterns
  18. 18. Why do we need to think differently about Test Data?
  19. 19. CRITERIA FOR TEST DATA ¨ Data is complex ¨ Needs to mimic “real” data ¨ Needs to be unique ¨ Data can be nested ¨ Though specified as static, may need to be Dynamic ¨ Data can be shared and reused
  20. 20. Case Study
  21. 21. 23
  22. 22. 24
  23. 23. 25
  24. 24. Code sample
  25. 25. What did we observe?
  26. 26. DIFFERENT WAYS TO SPECIFY TEST DATA ¨ In Test implementation ¨ In Test specification / intent ¨ In code … separate data structures / classes / etc. ¨ External files
  27. 27. TEST DATA SPECIFICATION EXAMPLES ¨ Excel ¨ CSV ¨ Property ¨ XML ¨ YAML ¨ Database ¨ Json
  28. 28. CRITERIA FOR SELECTION ¨ Easy to specify ¨ Easy to read and consume (by test framework) ¨ Ability to override specified data, easily ¨ Usable
  29. 29. TIPS FOR IMPLEMENTATION ¨ Consistent way to specify test data ¨ Read the data – as Business Entities ¨ Override as appropriate ¨ Create DSL to give meaning to data ¨ Use in test implementation ¨ Implement Test Data Entity Utilities – Build, Equals, Copy, Find, etc.
  30. 30. WHICH IS THE “BEST” PATTERN TO USE ?
  31. 31. It DEPENDS! on the Context!
  32. 32. Some tools
  33. 33. 35
  34. 34. @BagmarAnand about.me/anand.bagmar THANK YOU

×