Automating Testing of SOA Composites — oracle-tech

    Forum Stats

  • 3,701,027 Users
  • 2,239,262 Discussions
  • 7,834,978 Comments

Discussions

Automating Testing of SOA Composites

41840994184099 Posts: 16
edited September 10 in SOA & Process Management

Dear All,

Good Day!!

We have a requirement to automate all our SOA Composites testing. We are able to automate individual composites using test suite. But our requirement is to automate all our SOA composite using single test suite.

Any pointers or other options regarding the same would be of great help.

Thanks in advance.

Tagged:

Best Answer

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited September 7 Accepted Answer

    Hi,

    "To be more precise is it possible to call multiple Test Suite/TestCases created for different service/composite from one TestSuite."

    Every service endpoint in a composite and every other composite is just another SOAP Webservice to SoapUI.

    So the URI differ, the part after soa-infra. There for you would need to import all the WSDLs for each endpoint you want to test. And ofcourse you would need to because the request and response documents differ.

    Again, to SoapUI it doesn't matter if an endpoint is from another composite or so.

    In this case how I will pass different web service URL's?

    It's in the endpoint field/attribute of the soap request. Different Soap Request teststeps based on different WSDLs can have different endpoints.

    See also https://blog.darwin-it.nl/2015/07/set-environment-properties-in-soapui.html  for a way to switch between environments (although I would do it simpler nowadays, but based on the same principle).

    Kind regards,
    Martien

    4184099

Answers

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited September 7

    Hi,

    Create a TestSuite with different testcases in SoapUI. Incredibly powerfull.

    ReadyAPI is even more powerfull, but requires a subscription based licenses that isn't quite cheap.

    I honestly never used the test capabilities within a SOA Composite.

    Kind regards,
    Martien

  • 41840994184099 Posts: 16
    edited September 10

    Hi Martien,

    But with SOAP UI pro also we have to create different Test Suite for each composite know. But our requirement is to test different SOA composites using some tool by creating single test suite for different end point composite url.

    We were thinking of creating a new composite and keep the different composite url value in DVM and depending upon the input pick the url from DVM and call the url by picking the input data from a file kept in some location. 

    But this approach doesn't seems to be much straight forward approach that's why wanted to check if there is any other feasible solution.

    Thanks

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited September 7

    Hi Ramesh,

    You certainly don't need to have a TestSuite per composite. SoapUI don't care.

    You can create one TestSuite and create as many testcases as you want. Each testcase can contain as many test steps as you want.

    I would create a testcase per test scenario. And thus have several test cases per composite.

    But you could create a test case that runs several scenario's against a composite.

    If the exposed service is a SOAP service, you create a SOAP Request test step. To SoapUI it's just a webservice call, it wouldn't know that it is executed by a certain composite.

    If the service is an asynch SOAP Service, you might want to be able to catch the response. Take a look at https://blog.darwin-it.nl/2012/05/testing-of-asynchronous-bpel-processes.html

    to see how you can do that.

    If your server is behind a firewall, and therefor your BPEL can't call back to your SoapUI on your development machine. You might need to create a tunnel. This is how it's done using MobaXterm: https://blog.darwin-it.nl/2019/04/test-remote-asynchronous-request.html

    SoapUI can also do JDBC or JMS using HermesJMS in the case the process is started using a Database or AQ adapter. Or if it's started using JMS.

    By the way, you say SoapUI Pro, but you can do with SoapUI OS as well.

    Kind regards,
    Martien

    4184099
  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited September 7

    Oh, and from a test case you can also call another test case.

    So you could create one TestSuite with several testcases that call other testcases in other testsuites.

    Kind Regards,
    Martien

    4184099
  • 41840994184099 Posts: 16
    edited September 7

    Hi Martien,

    Thanks for your reply.

    "Oh, and from a test case you can also call another test case.So you could create one TestSuite with several testcases that call other testcases in other testsuites."

    Does the above point means from one TestSuite I can call other TestSuites which is created for some other composite?

    To be more precise is it possible to call multiple Test Suite/TestCases created for different service/composite from one TestSuite.

    "If the exposed service is a SOAP service, you create a SOAP Request test step. To SoapUI it's just a webservice call, it wouldn't know that it is executed by a certain composite."

    In this case how I will pass different web service URL's?

    Is it possible to create one SOAP UI project and call different SOAP web service from that SOAP UI project where the request/response/namespace/url.

    Hope I am clear with my requirement.

    Thanks again!!

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited September 7 Accepted Answer

    Hi,

    "To be more precise is it possible to call multiple Test Suite/TestCases created for different service/composite from one TestSuite."

    Every service endpoint in a composite and every other composite is just another SOAP Webservice to SoapUI.

    So the URI differ, the part after soa-infra. There for you would need to import all the WSDLs for each endpoint you want to test. And ofcourse you would need to because the request and response documents differ.

    Again, to SoapUI it doesn't matter if an endpoint is from another composite or so.

    In this case how I will pass different web service URL's?

    It's in the endpoint field/attribute of the soap request. Different Soap Request teststeps based on different WSDLs can have different endpoints.

    See also https://blog.darwin-it.nl/2015/07/set-environment-properties-in-soapui.html  for a way to switch between environments (although I would do it simpler nowadays, but based on the same principle).

    Kind regards,
    Martien

    4184099
  • 41840994184099 Posts: 16
    edited September 8

    Thanks Martein for your response.

    I will try and update you on this.

  • 41840994184099 Posts: 16
    edited September 9

    Hi Martein,

    "See also https://blog.darwin-it.nl/2015/07/set-environment-properties-in-soapui.html  for a way to switch between environments (although I would do it simpler nowadays, but based on the same principle)."

    I tried this by importing 2 wsdls and a Test Suite but still not sure how from one Test Suite we can call the other wsdl which has a different request.

    To elaborate more in your link provided you are calling different host name which has the same request. In our case we have different request and we want to create only one Test Suite and test Different wsdls. We are not sure how to make the Test Suite understand for which wsdls we are running the test.

    It would be great if you can give some explanations on this or some pointers or links which will give us better understanding on how to achieve this.

    Thanks for your time Martein, I really appreciate it.

  • Martien van den AkkerMartien van den Akker Posts: 2,756 Bronze Crown
    edited September 10

    Hi,

    In a SoapUI project you can define one (or more) TestSuites. In every TestSuite you can can create as many TestCases as you want. If you execute one TestSuite with multiple testcases, it wil run them either sequentially or in parallel (depending on a button at the top of the TestCase).

    Also in SoapUI project you can register as many WSDLs as you want. you would need to register the WSDLs for each composite-service you want to be able to invoke.

    When you register a WSDL in SoapUI it will create sample requests (if you want, but checkbox is checked by default ) for each operation. Also you are asked if you want a test suite with test cases for it. If you choose to, you can select if you want one test case with teststeps for each operation or multiple testcases, one per operation.

    You can also clone or move test cases to one TestSuite.

    In every testcase you can create as many teststeps as you want. One type of test-step is the Soap Request which is based on a binding/operation within a WSDL. You can also select an Ad Hoc request under a WSDL-Binding in the project navigator and choose to add it as a teststep within a test case.

    Within a test case, not only you can add as many teststeps as you want, from different types, but you can add multiple SOAP Request test steps that do not need to invoke the same webservice! So within a test case you can call as many different services as you want. For SoapUI these do not need to belong to the same composite. In fact it does not know the distinction.

    The only thing that SoapUI keeps track of is that WSDLs and Bindings need to be unique in name and target-namespace. So if you have multiple composites that implement the same  WSDL (Binding and TargetNamespace) then importing a WSDL from another Composite that implements the same WSDL it will ask you if you want to update it.  SoapUI relates a Soap Request to a WSDL-Binding. In the case of having multiple composites with the same WSDL, then the endpoint will differ. So you can just set another endpoint to the SoapRequest.

    Kind regards,
    Martien

Sign In or Register to comment.