Automation Testing web services

24,128

Solution 1

I am working through a similar request. As the client already has automated some of the servies using soapUI (OS) my job is a little harder.

The OS version doesn't have the data source, data loop test steps to make a data driven test suite but there is always a work around.

You can use even the Open Source version to implement the three kinds of prevalent automation frameworks.

  1. Action Driven framework - To apply this framework to soapUI you have to identify some common test steps in the setup, execution and validation of the service. Once identified, separate them out in a test suite and/or test cases and simply call the appropriate test suite/test step.

    For example: I have a test step that validated that an order entry has been made in the db by the service so i'll create a test suite + test case and add a jdbc test step in there to search for order id based on the data i supply. The query will be parameterized. In the actual script, i'll execute the service and extract all the values necessary to run the db query. These values will be passed to the reusable test case using the run test test step.

    A few things to remember, is if you have a large number of test cases/parameters and think that the service will need to be modified then put the parameters in an excel file and load them using groovy from the test suite setup script area.

    You'll need scriptom api to work with excel or Jxl (a little more complicated implementation)

  2. Data Driven framework, in this framework you basically identify different scenario that you want to run on the service and populate an excel with relevant data, then using groovy and scriptom or jexcel or jxl api loop through all the rows in the excel and execute the service with different data elements. This approach can be made as complex as you like and as simple as you want.

  3. Keyword driven framework - this is probably the most complex frameworks of all to implement as it requres you to do a lot of planning, development and such. I am currently designing such a framework. I would have shared some details with you if there weren't confidentiality agreements in place.

I also understand that you are new to groovy, you should check out soapUI and groovy's site they have a lot of really good examples and remember there is always stackoverflow to answer your queries.

Let me know how you make out with this effort.

Solution 2

What we did during a large project is with many connected legacy systems (200+ services):

  • for each service we created SoapUI projects with the proper assertions which are reflecting the goodness of the service (connectivity, functionality, etc)
  • we set up Hudson to run the list of those SoapUI projects for the services. All executed services are logged (request, response)
  • we created ant jobs to analyse logged responses and create a daily report (also run on Hudson)

We also touched async services by searching patterns in server logs. What was important here to have a SoupUI project creation convention (naming, needed assertions, etc).

Solution 3

You can use Soap-UI Pro if you want to automate your web service regression testing. Automation is quite simple in soapui, I am working on the same thing. I have automated my all flights integration web service using soap ui. You can use groovy scripting language for complex scenarios.

Thanks, Hanumant

Solution 4

What I've done in a similar situation (needed to test a very complex 3rd party application which tended to have recurring quality issues): I wrote some unit tests using the regular JUnit 4 environment, but instead of testing local java classes, I performed web service calls and checked the response. If you need to verify the results against a SAP R/3 backend, that's possible as well using the Java Connector (JCo) available from http://service.sap.com/connectors. The downside is - you obviously need to know how to code tests in Java.

Share:
24,128
Admin
Author by

Admin

Updated on September 09, 2020

Comments

  • Admin
    Admin over 3 years

    I work for a Midtier team & I've been pretty much testing web services Manually using SOAP UI. I got a task of getting the regression testcase to be Automated. We dont have any Automation team right now & hence I am given the full freedom of using whatever tool I want to & let my manager know which tool fits well..But I am yet to learn Automation Testing. Anyone any suggestions about which will be a good tool for Automation testing Midtier? We have many services where we validate the results with the results in SAP. For example if I am testing the price for an item in Midtier, I should go check if the price returned matches the price in SAP. Ive been doing this manually where I login to SAP go to the provided transaction code & checking the price for that item, can someone think of any good Automation Testing tool where I can handle this kind of situation?

  • Admin
    Admin about 11 years
    Thanks vwegert for the reply..You are right, I need to know how to code tests in Java & I really have no idea..so still looking to learn QTP. Thanks again!
  • Admin
    Admin about 11 years
    Thanks Hanumat, Did you find any training material that I can learn from? I just started working on SOAP UI & have no idea about groovy scripting