Forum Discussion

evert_timmer's avatar
evert_timmer
New Contributor
16 years ago

Login dialog pops up

Hi to all,

I am in the process of automating a test scenario for a SOA environment where we deal with several environments ( dev, test, acc, prod ).

I want to be able to dynamically configure all my test request endpoints based on information i receive from a "locator" service that holds all service-urls within an environment.

For some reason, i cannot get around it, i need to pull the wsdl description from all services in order to map them to the interface names i configured in soapui, and then update the url if there is a match ( not all services are going to be tested by soapui )

Here my problem starts...

Some of the services need credentials and some don't and i only need to "remap" the services that don't. Since i do not know at forehand what service ( interface ) it is that i am calling, a login dialog appears when i hit one of the services that i don't need to test.

Is there a way to prevent the dialog from popping up and let me just handle the exception in code ? ( not using commandline )

If not, is there another, more intelligent, way to do the job described ? I cannot control the information in the locator service so i am dependent on it as it is.

thanks,
Evert

2 Replies

  • I use a project property for the endpoints of all my requests as I also have multiple endpoints to deal with:

    Set the endpoint of the request to a property similar to:  ${#Project#MyURL}

    Then parse the information from the locator service and set the MyURL property value.
  • Thanks for the reply.

    I did not know you can use expanders for the endpoints too, so thanks a lot for the tip.

    -

    I resolved the issue regarding the dialogs myself:

    Previously, what I did was this:

    I created a testcase and teststep on the fly and let that teststep retrieve the wsdl from the service. I then got the response, parsed the wsdl and tried to map the port(s) in the wsdl to interfaces configured in soapui. Then, when found, i updated the endpoints of the interface found so it would point to the right service url. This caused the login popup to show up for services that needed authentication.

    Now i do it like this:
    I developed a couple of classes that will let me connect to webservices using a HttpURLConnection and by using them, i am bypassing the soapui object tree and the events that come with it ( the dialogs popping up ).

    So i am done!

    I have a small xml file containing basic information about an environment, including the environment dependend url for the "Service Locator" service, and some properties to use in the testcases.

    In my Setup Script, i read the xml, let the user select the environment that he want's to test from an optionDialog and then, based on that choice, retrieve information from the Locator Service, modify the endpoints and set some initial properties.

    Thanks,
    Evert