Different Test data for each execution

Hi all, I am quite new with this tool and I’m very interested in it! I just had a question that comes to my mind and because I had it before…

Let’s say I automate a sign up for any web site, for the first time it will be okay, but for the second run of the test, the user (email) would be already present in the system, how can I solve this problem?

Can I make all data after each execution to be gone? can I have kind of a list of users (test data) to try and signup?

Thanks!

Hello Vicente,
what are you looking for is data driven testing. This approach is supported by Katalon studio and more about that you can find here:

Andrej Podhajský said:

Hello Vicente,
what are you looking for is data driven testing. This approach is supported by Katalon studio and more about that you can find here:
Katalon AI-augmented Software Quality Management Platform

Hi Andrej,
many thanks for your quick answer, but I think I’ll still have the same problem… this will be very useful for iterations with data as I can see…

In my case I have to test an environment where all data is kept after test is executed, so next time I execute the test suite, the tests will fail because of data being present in the test environment, I understand I can have a dataset with many users/logins for each test execution, but eventually it won’t be enough and this dataset will have to be increased.

What I’m asking for is the possibility of leaving the environment as it was before the test suite was executed, so it can be executed again without data collisions. But I don’t think this is actually a thing that Katalon can do.

Hi Vicente,
it is not an Katalon fault … usually on such systems i use some tricks:
e-mail - i use google mail which allows you to use 1 email address so many times you want - just add +TIMESTAMP (e.g. my mail is testMail@gmail.com and by using + will look like: testMail+123456789@gmail.com)
for any ID i use random string+timestamp (if possible, if numeric, timestamp+random number)
for names (if they don’t need to be unique) random string
this approach will allow me to execute tests even in parallel without interfering between themselves
so basically i’m generating data on fly. also for each business test i use 1 set of data. you need to think about usage of your tests, not every time you need to create fresh user to execute some test, and can use some predefined ones.
btw. you also have great opportunity to implement basic performance tests this way - by measuring time of test execution on such system you can discover possible performance issues related to amount of data in system. just don’t forget to set KPI with your PO (project owner) to give meaning to measurements.

2 Likes

That made it! many thanks @Andrej Podhajský, I will have in mind your advice regarding performance tests!