HomeSUPPORT QUESTIONS

Need help with StresStimulus? Start here.

Random Data Messages in this topic - RSS

Charles Durrant
Charles Durrant
Posts: 8


9/27/2012
Charles Durrant
Charles Durrant
Posts: 8
Hi,
 
We have a web service that has an add record method. One of the fields is a primary key, I'd like to run a test that continually adds records, my problem is that I really need to have a uniqueid - I could use a data source but it would quickly be used up so to speak.
 
Is there a way to create a unique ID, I expect not, if so how can I pass a FiddlerScript function result to an extractor? I.e.
 
public static string NewGuidString()
{
    return Guid.NewGuid().ToString();
}
Charlie
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


9/27/2012
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Charlie,
This type of API is not supported in extractors yet. You can use the Fiddler scripting engine to parse requests and substitute a constant primary key by a guid. A custom script should be added to the OnBeforeRequest(oSession: Session) method. Fiddler scripting documentation is provided at http://www.fiddler2.com/Fiddler/dev/ScriptSamples.asp. There may be a performance consequence to execute your custom script if you run an intense stress test.
Alternatively, you can use approach described in this post http://www.stresstimulus.com/forum/run-tests-with-unique-data-242  thatit is based on deleting the test data from the database before re-running the same Test.
 
Cheers,
-Vadim
0 link






Copyright © 2024 Stimulus Technology