Forum Discussion

Marc_Lefebvre's avatar
18 years ago

SoapUI Java API Questions

1. I know you can set the HTTP protocol to use 1.0 in the GUI and turn off chunked encoding, but how do you accomplish the same thing when running tests using the java api?  Is there a way to set this property in the java api?


2. I have a series of test cases I want to run against a series of end points.  Rather then duplicating the SAME test cases for each end point I want to test, I would like to use a single set of test cases and run them against an array of end points using the Java API.  How can this be accomlished?  Again, I cant find any properties which allow me to dynamically change the end point for a given test case that is read in.

Thanks,

-Marc

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Marc,

    1) Use

    SoapUI.getSettings().setString( HttpSettings.HTTP_VERSION, "1.0" );
    SoapUI.getSettings().setBoolean( HttpSettings.DISABLE_CHUNKING, true );

    2) Maybe you could use project-level properties for the endpoints? For example define a property named "MainHost", then use it in your endpoint(s) with ${#Project#MainHost} and change the value of the property for each run of the testcases!?

    regards!

    /Ole
    eviware.com