How do you handle data issue in your automation ?

The challenges :

1. Dynamic data 
Type of data that changes often and can not be reused for next test.
2. Data is not sync between environment.
3. Data that exists in one environment does not 
exists in another and casue test failure.

What's your approach to handle them ?

*If the data change often and you have access to DB
Query the database to get up to 
date data and feed the data to your test.
*If you do not have access to DB but have access to API
Send the request to the endpoint that return your data 
and get the fields that you want using jsonPath.
* If you do not have data : CREATE IT FIRST 
then use that new data for your test.
You may create it from the UI Directly if the flow is available.
* If UI is not ready, but you have access to the 
API endpoint to create data, you may send POST request 
to add randomized data and use it for the test.
* last option(probably you will never have access to) is , 
inject the data directly from the database, 
you may ask for DBA help if that's the option.

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source