In Tricentis Tosca, about random expressions

1.4k Views Asked by At

I am working on an website in which I have to automate it so, I created an test step, in which I used 2 "random expressions" - 1. phone number and 2. Email....But In another test step I have to verify them whether the phone number and email are displaying or not. My doubt is like how can we verify them if they change every time we run the test case??

Thank you.

2

There are 2 best solutions below

0
rolko On

You can only verify if they adhere to a certain format. This can be done with regex verification: https://documentation.tricentis.com/tosca/1420/en/content/tbox/regular_expressions.htm

0
Psytho On

So you either:

  1. do not use random values and hard code email and phone number

or

  1. Store generated random values to buffer and use that buffer later in verification. You even marked the question with "buffer" tag...