Lets see if I can include jmx files here. If not I can post these in my github repository.
Please find enclosed two JMX tests (Assuming something doesn't eat them between here and there.) samplevars.jmx contains two user defined variable elements, one of which is disabled. You can switch which one is disabled to get a different environment. testSampleVars.jmx contains a simple demonstration with the jmeter 2.4 include controller. Note that if you use earlier versions of jmeter your mileage may vary. I'm not sure where the include controller looks for its files by default, but it'll probably tell you when you try to run this test. When you change something in samplevars.jmx, you need to save BOTH samplevar.jmx and testSampleVars.jmx, so that the include controller refreshes its tree correctly. If your mail system or the forum software ate the tests let me know and I'll post them on github. I included a bit of bonus code -- a groovy sampler that reads a properties file in from a file. I use this in Hudson integration -- Hudson puts parameters in the environment, which jmeter doesn't seem to be particularly good at reading. So before I launch Hudson jobs (With ant,) I echo the environment into a file with env > environment.props (Or something like that, forget the filename I used but it's in the code.) Then I read it in with this sampler. For some config elements this doesn't work so well, because you're defining the variables at test run time, but the config elements need to have access to the variables earlier. For those variables, I send them to jmeter as properties. I'm not sure where the include controller looks for its files by default, but it'll probably tell you when you try to run this test. When you change something in samplevars.jmx, you need to save BOTH samplevar.jmx and testSampleVars.jmx, so that the include controller refreshes its tree correctly. -- Bruce Ide flyingrhenqu...@gmail.com
--------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org