My application does not accept duplicates.I need to test a user form where I submit data.
I cannot use simple record and play .Each time I play back the recorded script the same data is entered.
How do I deal with this?Is there a code which can assign random data for each field for each test.
In this way there are no duplicates and my data goes into the application correctly and I can test user forms by clicking submit.
Re: Apllication does not take duplicates-code submit
You could use random data. But that's then difficult to verify whether or not the data was input correctly.
My suggestion would be to create a method that would do the data entry given a parameter of the data to enter. Then you would call that method either with in-line data in the code or the data would be read in from some external source using a data driven testing method (such as the DDT objects or something similar).
To create the method, you could start with recording it and then take the procedure that is recorded and modify it to take the data as parameters.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure