One of the things I would like to put into JXWeb is driving the HTTP parameter values more from test data files. In other words, I would like to have my 'test.jxu' files be the templates for my test flows, but have the data derived from another source (say, a properties file).
We could then alter the HttpSetFormParameter so that the value it sets for a particular parameter could be derived from a properties file, not in the test.jxu file.
To achieve this I propose that we add a new target that loads a property file into the JXProperties object made available in the HttpStep base class. Then any step that uses these properties looks up that java.util.Properties object and uses the values set there instead.
Having played with the source a bit a found a need for a step that works directly with the WebRequest object. That is, in certain cases I needed to short-circuit the WebForm object and didn't have a class to do that with. I propose that we create an HttpSetRequestParameter class that works directly with the underlying WebRequest object.
Also I found that having some control over the HTTP Unit options is helpful. I've already coded up a class that can set various boolean properties on the HttpUnitOptions class from HTTP Unit.
Do these make sense? Is this a smart way of doing things?
--Alex Vollmer (new JXWeb developer)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Alex
Have u added the new step and the new class ?this is great! The ideas are excellent and infact JXWeb is an extended form of JXUnit which supports the idea of seperating test data from test code.
If you look the JXWebs schema file, the setFormParameter bean has a optional attribute (file) but it is not implemented yet :-(.
I think this can also be looked to implement the properties files.The addition of a seperate teststep is fine and is more generic.
Any help from guys up here is always welcome :)
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One of the things I would like to put into JXWeb is driving the HTTP parameter values more from test data files. In other words, I would like to have my 'test.jxu' files be the templates for my test flows, but have the data derived from another source (say, a properties file).
We could then alter the HttpSetFormParameter so that the value it sets for a particular parameter could be derived from a properties file, not in the test.jxu file.
To achieve this I propose that we add a new target that loads a property file into the JXProperties object made available in the HttpStep base class. Then any step that uses these properties looks up that java.util.Properties object and uses the values set there instead.
Having played with the source a bit a found a need for a step that works directly with the WebRequest object. That is, in certain cases I needed to short-circuit the WebForm object and didn't have a class to do that with. I propose that we create an HttpSetRequestParameter class that works directly with the underlying WebRequest object.
Also I found that having some control over the HTTP Unit options is helpful. I've already coded up a class that can set various boolean properties on the HttpUnitOptions class from HTTP Unit.
Do these make sense? Is this a smart way of doing things?
--Alex Vollmer (new JXWeb developer)
Hi Alex
Have u added the new step and the new class ?this is great! The ideas are excellent and infact JXWeb is an extended form of JXUnit which supports the idea of seperating test data from test code.
If you look the JXWebs schema file, the setFormParameter bean has a optional attribute (file) but it is not implemented yet :-(.
I think this can also be looked to implement the properties files.The addition of a seperate teststep is fine and is more generic.
Any help from guys up here is always welcome :)
Thomas