Is there a way to get a table variable to auto generate the next time a keyword test is run?
Is there a way to get a table variable column value to auto generate the next time a keyword test is run?
For example, I run the test once and have a variable table value field set with a city name. Once the test is run the city name is saved to the database. When I run the test a second time my database will not allow a duplicate name to be saved. Is there a way to auto generate a new city name the next time I run the test or do I have to manually do that by going to the variable on the keyword test and generate a new random name?
Please see my attached screenshot to see the field I'm referring to.
When you define a table in that way, it is a static table.
What I would do is, when you use that value in your test, add some sort of unique identified value to the end of the data you get from the table before you use it... if that's possible.
Alternatively, at the end of your test run (or the beginning of a new one), perform some sort of "reset" of the data in your application under test so that it is no longer subject to the data duplication check. For example, in a previous "life", at the start of a test run, we restored an SQL database from back up which contained a "baseline" of data so that any tests that followed would avoid any of this duplication of data.