Sreekant wrote:

I am fairly new to testing world. I am trying to run a set of test methods. I wrote a test class(subclass of JWebUnitTest) that has these methods and added it to my suite. But when I run the suite it ends up running each of the test methods in individual sessions. I have a random number generator in the class that is instantiated in the setup() method and each test method when run is getting a different number as opposed to my intentions of having one number for all the test methods in the test case. Am I missing something??? Any help is greatly appreciated.

Thanks much,

Sree


The setup method is run for every test. I you want your RNG to be initialised once only, make it a static variable and intialise it in your declaration.


L


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Jwebunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to