Ask a Question

how to increment date for each test run

SOLVED
Nancy2
Occasional Contributor

how to increment date for each test run

Hi,

 

In my test step I need to pass new date in each test run. How can I do that?

 

Regards,

Preeti

28 REPLIES 28
nmrao
Champion Level 3

Can you show the screen shot of groovy script by running it multiple times?

What does the raw tab show?

Does you application accept the same format?


Regards,
Rao.
richie
Community Hero

Hey @Nancy2 

 

I can't help with  the groovy - but I think @New2API  mentioned that your error.png includes the testcase name in your property.  Have you tried removing the testcase name?

 

e.g. 

 

${#CreateActivity TestCase#New_Date}

 

remove the 'CreateActivity', so it reads as follows:

 

${#TestCase#New_Date}

Cheers,

 

richie

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
nmrao
Champion Level 3

Good catch!


Regards,
Rao.
nmrao
Champion Level 3

Looks, people don't pay attention. For a moment, I thought if I did not mention. But it was clearly mentioned how to use.


Regards,
Rao.
Nancy2
Occasional Contributor

oops!

Actually it worked after removing the name.

 

Thanks Richie!

 

 

Nancy2
Occasional Contributor

Can I ask something in the same thread?? 

In the Groovy script, date starts from today. In case I want to give specific date and would like to start from that date??

nmrao
Champion Level 3

@Nancy2,
Appreciate if you can mark the right solution(actual reply) which has the answer.


Regards,
Rao.
richie
Community Hero

Hey @Nancy2,

You can ask another question on the same thread, but its advisable to create a new one, there are several reasons for this but a major one is that you cant mark >1response as the solution (the correct answer), which leads onto the next point.

As @rao asked, the groovyscript provides the answer to your original problem so it's important to mark that as the answer to your original question, rather than the post relevant to the testcase name as it would be confusing for peopme searching for the answer to your original problem

Cheers

Richie
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Nancy2
Occasional Contributor

Hi Rao,

 

I think I marked the actual reply as solution which you posted on 02-13-2019 05:03PM. This post only gave me the actual solution. Kindly refer attached screenshot and suggest.

 

Regards

cancel
Showing results for 
Search instead for 
Did you mean: