Sujit Soni
Sujit Soni

Reputation: 135

How to submit different value in same field for each user

I have a scenario in which user logon into system and submit some entry , but as system does not allow to submit duplicate records , i need to change on of filed value .

How this can be done , an sample code will be much more helpfull.

Upvotes: 1

Views: 299

Answers (2)

Hassen Bennour
Hassen Bennour

Reputation: 3913

you can map columns of a csv file with CSV_Data_Set_Config by setting variables names to : user,pwd...

after that you can use them to logon like this '${user}'

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168052

You have a number of options, feel free to choose the one which suits you best:

  • __threadNum() function - returns current user number, i.e. 1 for first user, 2 for second, etc.
  • __Random() function - returns a random number in the given range
  • __time() function - returns current timestamp in the different formats
  • __UUID() function - returns random (type 4) UUID structure - probably the most "unique" option

You can use functions anywhere in your test plan, i.e. directly as a parameter value.

UUID

See the following references:

Upvotes: 2

Related Questions