New

Funtions GetCurrentDate and IncrementInterger

  • 27 December 2021
  • 0 replies
  • 8 views

Hi,  

 

I have been creating some tests and I came accross the need to use unique values dynamically in my tests. I have been advised to use scenarios, but that does not really solve my problem, if I have to create a unique scenario for every time I have to run a test, it is not efficient.

Ideally I would like to appened a unique integer or current date to a string every time i run the test, this would ensure the data is always unique and its better maintainable on the long run. A tag or function to increment an inter or get current date would do. The funcion or tag should be accessible from Data Editor for each recording.

 

E.g.:

  • Step: Enter Text | Replay data: “Lorem ipsum <CurrentDate>”  
  • Step: Enter Text | Replay data: “Lorem ipsum GetCurrentDate(string format=”dd/mm/yyyy”)”
  • Step: Enter Text | Replay data: “Lorem ipsum IncrementOnRun(int intialValue=0)” Note: For this function would be ideal if it could somehow remember the last value, such that it can be intialized only once and would keep incrementing every time a test is run.

I believe that this features in combination with variables (which is already available) can procedure more complex test use cases.

 

I hope to hear from you, thank you.

 

Kind Regards,

Elviro Junior


0 replies

Be the first to reply!

Reply