Anyone have any experience with passing attributes between scripts? I have a support ticket into Segue/Borland but thought I'd check here.
Basically I'm setting a couple of attributes in one script with the float of some timer and custom counter values. I'm able to do that fine, but when I try to read the value in the second script I always get 0.0000000.
FYI, it also appears that despite the documentation, you have to declare the attribute in the project attributes before setting the attribute will work.
FYI, per Segue, this is as designed. Attributes are not capable of being passed BETWEEN scripts. IMHO the help description was ambiguous which led me to believe that you could do this. I also found a workaround by only writing the values out to a file if the vuser ID is 1. It's not elegant or optimal, as if vuser 1 dies I lose my output. But how often is a complex solution to a simple problem 'optimal'or 'elegant'?
If you are not passing strings from user to user then the best solution would probably be GlobalVars. The idea of GlobalStrings has been an RFE with Segue for some time and I do not think that you will see that implemented any time soon.
As for the file solution, this becomes painful if you are running on multiple agents because you then must read and write to a file on a shared network drive that is accessible by all agents. You also have race conditions on the data in the file unless you setup a global resource/Mutex. I would try to use globalVars if at all possible instead of doing extra file I/O during a load test.
Now a customer...and at the mercy of support, services, and development just like the rest of you.
Thanks for the advice. Yeah, I know about the pain of writing to files from multiple agents, I've had to deal with it before. So far I haven't had to do that. And in this case I really wouldn't - I could just have seperate files on each agent and combine the results post test. FYI, I ended up solving this with globalvars and writing the globalvar value along with some other information to a file.
Hmm, just re-reading the post from mhansen and looking at the help file on the createmutex function. The help file information (IMHO) seems extremely sparse and uninformative. Also, the way I eliminated the potential race condition is that I only write to the file if I'm user #1.
Does anyone have any examples on how they have used the mutex functionality? Or something more descriptive than the help file examples/explanations?