Hi,
At a risk of straying into this conversation, I found the topic of Global Datagen quite interesting... so I tried out an example on my SoapUI pro of a global id generator script, which I thought I'd share in case it helps your case.
Here is the Groovy script, a simple thread-safe id generator (SequentialIdGenerator.groovy):
package test
import java.util.concurrent.atomic.AtomicLong
public class SequentialIdGenerator {
public static final long counterSeed = 1000
private static AtomicLong counter = new AtomicLong(counterSeed)
public static long nextId() {
return counter.incrementAndGet()
}
}
(One difference with the example in this post is that I chose to use a package of 'test', not sure if this makes a differences to using the default package)
I placed this in a folder called 'test' (to match the package structure) in the default scripts folder that was already created in my SoapUI Home/java/app/bin/scripts (MacOSX) e.g.
/Applications/SoapUI-Pro-5.1.1.app/Contents/java/app/bin/scripts/test/SequentialIdGenerator.groovy
Then I saw the following in the SoapUI log tab:
Thu May 14 16:26:46 BST 2015:INFO:/Applications/SoapUI-Pro-5.1.1.app/Contents/java/app/bin/scripts/test/SequentialIdGenerator.groovy is new or has changed, reloading...
Thu May 14 16:26:46 BST 2015:INFO:Resetting groovy class cache due to 1 modified file
To test it, I then created a simple Groovy TestStep:
log.info test.SequentialIdGenerator.nextId()
Run it a few times to give:
Thu May 14 16:24:48 BST 2015:INFO:1001
Thu May 14 16:24:49 BST 2015:INFO:1002
Thu May 14 16:24:50 BST 2015:INFO:1003
Thu May 14 16:24:50 BST 2015:INFO:1004
I must admit I wasn't quite sure exactly how you wanted to use the timestamp across your TestSuites, at least not in a globally available sense, but would be very interested to hear? I undertand appending a Timestamp to request data to make it unique though...
Maybe there's a gap for me to develop a plugin for this sort of thing...
Hope this helps,
Rupert