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.

Bro, manage test data like a pro!

741 views

Published on

Almost any application or software system manages data. It is hard to imagine test automation that is not affected by this fact. There are many differenct approaches how to prepare system under test, providing predefined test data: use application UI, invoke API methods, run business logic directly, access DB from test scenarios, etc. In this talk we will review most of existing approaches, starting from the easiest and the most popular ones and finishing with really tricky ways to manage your test data for large distributed systems. There is no ideal solution for every case or silver bullet, but I hope your toolset will become wider after visiting this talk.

Published in: Technology
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1url.pw/YLJCX ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Bro, manage test data like a pro!

  1. 1. Bro, manage your test data like a pro! Mikalai Alimenkou @xpinjection http://xpinjection.com
  2. 2. https://qaguild-slack.herokuapp.com
  3. 3. Test Data Application Driver Test Logic Test components
  4. 4. Data independency as performance driver • Most dependencies are data related • Dependent tests = no parallel execution • Data should be test specific with no reuse • Use small focused datasets
  5. 5. #1. Prepare test data using UI SYSTEM DB QUEUE UI API EXTERNAL SERVICES API CONTRACTS #1. UI
  6. 6. Easiest approach to start with Blackbox solution Clear and simple Unstable Too long Failures chaining
  7. 7. Data Registry
  8. 8. #2. Data insertion via API SYSTEM DB QUEUE UI API EXTERNAL SERVICES API CONTRACTS #2. API
  9. 9. Reuse existing API for tests Data oriented Much quicker Require clear API Greybox Coding skills Existing tools
  10. 10. #3. SQL for direct data insertion to DB SYSTEM DB QUEUE UI API EXTERNAL SERVICES API CONTRACTS #3. SQL
  11. 11. Unit/integration tests
  12. 12. Use internal system knowledge Flexibility Quickest way Whitebox Support and sync Too verbose Direct data access Caching
  13. 13. #4. Datasets with optional commit SYSTEM DB QUEUE UI API EXTERNAL SERVICES API CONTRACTS #4. DBUnit
  14. 14. Unit/integration tests
  15. 15. API/System level tests
  16. 16. Additional level of data abstraction Great tools around DBUnit Suitable format Whitebox Support and sync Small datasets Caching Flexible constraints
  17. 17. #5. Versioned DUMPs SYSTEM DB QUEUE UI API EXTERNAL SERVICES API CONTRACTS #5. DUMPs
  18. 18. Support DUMPs for different suites /serviceA/dump/smoke/v50/data.tar.gz /serviceA/dump/smoke/v51/data.tar.gz /serviceA/schema/v51/db.jar /serviceA/dump/regression/v50/data.tar.gz /serviceA/dump/regression/v51/data.tar.gz
  19. 19. Version your test data with schema Direct data access Quick Unclear Required skills DUMP preparation via UI Infrastructure support Artifact repository
  20. 20. DB Object Pools • DB instance • Heavy domain objects • Available data roots
  21. 21. #6. Production data DUMP SYSTEM DB QUEUE UI API EXTERNAL SERVICES API CONTRACTS #6. LIVE DATA
  22. 22. Real data is always better for testing Live data No preparation Large Permissions More realistic cases Security
  23. 23. @xpinjection http://xpinjection.com mikalai.alimenkou@xpinjection.com

×