2008/3/31, sebb <[EMAIL PROTECTED]>: > > In 31/03/2008, Krzysieq <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > A quick question which I didn't find an answer to in the docs: in our > > projects we use many different testing platforms. Obvious choice here > is to > > use property files to store their configuration for our test purposes. > And > > this works perfectly with automatic test campaigns on cruisecontrol. > > However, people often need to run the tests using the gui from their > own > > machines, against different platforms. How can we go about this fact > > otherwise than by starting jmeter on command line with different -p > > > Or you can use the -q argument or user.properties .. > > > > argument? This is annoying cause You have to restart the app all the > time if > > You need to run the tests on different machines. > > > ... but of course those won't help after JMeter has been loaded > > > > Also, another ugly as hell > > solution is to store all configuration in several user variable config > > elements inside the tests. This is what we're unfortunately doing right > now, > > but we want to drop this in favor of some cleaner solution. Any help > will be > > greatly appreciated. > > > So what you want is a way of updating a set of properties from the GUI?
Not really update - I need to switch between sets of property files. When You load one on startup using -p, You're stuck with it until You switch off and back on again. This is a pain. On the other hand, I need to avoid using many config sets insisde one tests, because they're difficult to maintain, especially as the number of tests grows. The Property Display element: > > > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Property_Display > > allows one to change individual properties, but I assume there are too > many for that to be feasible. > > I suppose the test element could be extended to allow a property file > to be loaded. > > Alternatively, you could write a BeanShell function to load the JMeter > properties from a file name passed to it. This can be invoked via a > dummy variable definition on the Test Plan. But would this override the set of properties defined on startup? Or if I run the tests with one of these, can I use another file on another run of tests? I haven't used beanshell or jexl, but maybe it's high time I do. The BeanShellFunction.bshrc sample init file has function definitions > for gettting and setting properties, but it would probably be easier > to load the property file into a temp. object and then add that to the > existing properties. For example code, have a look at how the -q > option is handled in JMeter.java - search for > case PROPFILE2_OPT: > > You could probably use Jexl for this instead if you don't want to use > BeanShell. > > > Best regards, > > Chris > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >

