Forum Discussion

ak0032803's avatar
ak0032803
Contributor
14 years ago

How to set DataSink properties value using Groovy

Hi,

I am new to groovy script.
I have created a testcase in which I am generating some random data using datasink teststep with  property.
My property name is DomainName which is in specific format and it should be unique for each request.

In data sink i am achieving it by setting values for property DomainName as -

Prefix
Test${=(int)(Math.random()*1000)}.
Content - TestDomain.com

Now when I am giving a request in loop it generates domain names as -
Row 1 -
Test134.TestDomain.com
Row2
Test356.TestDomain.com.TestDomain.com

It is appending previous result each time with new.
I want it something like
Row 1 -
Test134.TestDomain.com
Row2
Test356.TestDomain.com

Is there any way to clear previous data in Domain Name using Groovy script or any thing ...
Please help its urgant ..


Thanks
Archana