It is always tricky to write an interview Q&A article because the list of questions that we provide is never going to be all-inclusive and also, interviews in real time aren’t exactly in the Q&A format.
We recommend learning SoapUI concepts from our training material located in the course QA 104: Web Services Testing Using Soapui
In an interview most questions would be a response to what you say your experience has been.
For example: If you say that you have been working on SoapUI for 5 years now and have tested an application both functionally and also ran some load tests – then the SoapUI testing interview questions would be about:
- What kind of application that was?
- How much of an involvement did you have?
- Were there any challenges?
- Any automation best practices you have implemented?
- What extent of groovy scripting was used?
- Your approach to maintaining data from the data sources?
And so on. Answers to these questions are situation/experience based, so there is no one fit-for-all solution.
However, the following are a list of SoapUI Web Services interview questions that are general.
They could be as below:
Q #1. What are webservices?
Ans. Web services are web components that transfer data between client and server. Client sends a web request to the server and the server then responds to client. The response and request are related and different requests evoke the corresponding response.
Web Service is a web component or software program that can be accessed on the Internet. It is mainly used to communicate with the web based applications through XML messaging concepts. For example, if we want to access a particular location using Google Maps, we can use the corresponding web service URL. For that we have to pass the appropriate inputs.
Q #2. What is the primary challenge when testing webservices?
Ans. Majority of the functional testing is carried out via the GUI; the biggest challenge of webservices is that they do not have a UI.
Q #3. What are the communication channels available for a web service?
In general, web service is combined with the following protocols. They are,
- HTTP / POST
- HTTP / GET
While exposing the web services, these channels will be used for communication with the clients. Here HTTP / POST protocol transfers the information between the clients with secure mode. HTTP / GET protocol allows the clients to view transferred data partially at the browser’s address bar. SOAP is used for transferring the confidential data safely.
Q #4. What are the different components can be used in the web services?
There are four components are used in web services. They are,
- WSDL – Web Service Description Language
- SOAP – Simple Access Object Protocol
- UDDI – Universal Description, Discovery and Integration
- RDF – Resource Description Framework
- XML – eXtensible Markup Language
Q #5. What are the tools used for testing Web services?
To perform functional testing for web services, we can use the following tools.
- RESTClient – This is a Firefox plug-in
- JMeter – Specially made it for performance testing tool and also we can do functional testing the web services.
Q #6. What is WSDL?
Ans. WSDL stands for Web Service Description Language and is a document written in XML. It uses XML to define the service layer document which consists of origin of the web service, headers, port types, request and response data. This one can provide the information about web methods and web service.
- Origin of the web service
- Header information
- Port type
- Input and output messages
Q #7. What is the role of WSDL document in web service testing?
Ans. Validating webservices in only possible with WSDL document because to configure web services in SoapUI, WSDL document is mandatory. If the WSDL document is not valid, SoapUI will throw an exception immediately.
Q #8. What is UDDI?
Ans. Universal Description, Discovery and Integration- a directory or global repository where all the webservices can be found. A new Webservice can also be registered through this. This is also the place where WSDL detailed definitions are found.
It uses the discovery layer which is used in the web services. UDDI has all the information about the web services in detail. Global web services can be deployed at http://uddi.xml.org/
Q #9. What is SOAP?
Ans. Simple Object access protocol that uses XML to interact with web applications. It uses XML based content to communicate between two client machines across any network.
SOAP is a protocol for accessing web services.
- It is XML based
- SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
- A SOAP message is an ordinary XML document containing the following elements:
- An Envelope element that identifies the XML document as a SOAP message
- A Header element that contains header information
- A Body element that contains call and response information
- A Fault element containing errors and status information
Q #10. What would be the message format of SOAP protocol?
Generally, all the SOAP based web services are written by using XML language which uses standard message format that is accepted across the universe. In this format, it is easy to read, identify the errors, avoids interoperability problems etc.
Here’s the sample SOAP message format.
- POST /InStock HTTP/1.1
- Host: localhost
- Content-Type: application/soap+xml; charset=utf-8
- Content-Length: 399
- SOAPAction: “http://www.example.com/soap-envelope”
Q #11. What are the advantages of SOAP?
Ans. Since its XML based, it is platform and programming language independent. RPC (Remote procedure calls) are sometimes blocked by firewalls and proxy servers- Soap overcomes that.
Q #12. What does a soap document contain?
Ans. Envelope element is the top most tag which identifies the XML document as a SOAP message. Followed by Envelope element, you see the header element that has header information. The Body element specifies the call and response information. Finally, you have a Fault element which contains errors and status information.
Q #13. What is meant by Protocols and what are the major types are used in web services?
A protocol is a set of standard rules that helps to communicate the hardware devices through the software applications. There are different types of protocols used in the Internet and Intranet applications. They are
TCP which stands for Transmission Control Protocol. It has the rules to exchange the messages between two different Internet applications.
Internet Protocol uses the rules for sending and receiving the information between two different Internet addresses.
Similarly, HTTP, FTP and DHCP protocols are used the set of rules to transfer the data other than Internet applications.
Q #14. What is XML?
Ans. XML (eXtensible Markup Language) is a mark-up language that is used for storing, sharing and formatting data. In general, an XML document is built by the tags. For more info and examples, check out this article http://www.softwaretestinghelp.com/web-services-api-testing-tool-soapui-tutorial-1/
Q #15. SoapUI and SoapUI Pro:
Ans. SoapUI is a webservices testing tool and SoapUI Pro is its commercial version. SoapUI can help create functional, security and load testing test suites. SoapUI Pro does all that with advanced drag and drop, data driven testing, advanced reporting and coverage analysis. Check out this article for more information: http://www.softwaretestinghelp.com/soapui-tutorial-12-soapui-pro-features/
Q #16. What we can do with the help of SoapUI?
SoapUI offers us to perform automation testing which includes functional testing, load testing and data driven testing.
It also provides in build reporting tool and export test results log provision
We assert our services using various types of assertions
Q #17. What hierarchy SoapUI follows to build a proper testing project?
In a SoapUI project, the following order should be maintained.
- TestSuite – This is combination of functional tests and logical blocks
- Testcase – Its a group that contains several test steps for the specific aspects of the service.
- Teststep – it contains the set of functional tests
Q #18. What is the basic method to automate web services in SoapUI?
- Create a project and add the WSDL file
- Add test suites, Test cases and Test cases- in that order
- Include custom programming/validation using by adding Groovy steps
- Call external data sources if using
- Add assertions if necessary
- Then RUN.
Q #19. What are SoapUI assertions?
Ans. Assertions compare the parts/all of the response message to the expected outcome.
Q #20. What are the major types of assertions available in SoapUI?
Assertions are the one of the major feature in SoapUI. It offers the following types of assertions.
- Simple contains
- Schema compliance
- Simple not contains
- Soap Faults
- Response SLA
- XPath Match
- XQuery Match
- WS security status
- Script Assertion
- WS- Addressing Request or Response Assertion
- Additionally Equals assertion is introduced in SoapUI NG Pro version.
Q #21. Explain about XPath Assertion in SoapUI
In SoapUI, XPath assertion is used for asserting the web service response value by specifying the absolute path. If the absolute path is matched with the response value, then the test case or test suite will be considered as PASS otherwise it will be notified as FAILED. We can see the results of assertion at bottom of the screen where the Assertion tab will have resultant information.
Q #22. What is Data Driven testing?
Data driven testing means to store our test data which includes input and expected output in an external data source called Excel / Database / XML file. Later, we need to iterate the data source using respective component. In SoapUI, Datasource and Datasource Loop test steps are used for performing data driven testing.
Q #23. What are the different types of assertions used in SoapUI?
Ans. The following are the different types of assertions:
- Contains & Not Contains
- XPath match
- XQuery match
- Schema compliance
- Soap Faults
- Response SLA
- WS security Status
- Script Assertion
- WS- Addressing Request or Response Assertion
Q #24. How can assertions be added in SoapUI?
Ans. Receive a response to a request as you normally would follow the below steps:
- Create a project, add WSDL
- Add Test suite, Test case and Test steps
- Run the request
- To add assertions:
– Click on the Add Assertions at the top of log tabs.
– Configure the assertions as per the type and data required.
Q #25. What is Groovy script and where can it be used?
Ans. Groovy is a scripting language which internally includes all the java libraries – it helps us to customize and add custom validations to SoapUI tests
Q #26. Can custom code be added to SoapUI? If yes, what can be added?
Q #27. How to group tests?
Ans. The basic Test suite is a way for us to group tests in SoapUI. When you need a different set of tests, you just have to create a new test suite and create tests as required under it as test cases.
Q #28. How to save the responses received?
Ans. The response values can be saved by clicking on the required request and choosing the “Dump file” location in its properties.
Q #29. What are the properties available in SoapUI?
In SoapUI, there are three levels of properties available. They are,
- Custom Properties or Project Level Properties:
- These properties are added several times based on our needs and they can be utilized at any test suites, test cases or test steps that belongs to the current project.
- Test Suite Level Properties:
- Tester can add his own properties with relevant information under the test suites. These properties are available under the corresponding test suite only.
- Test case Level Properties: If the tester needs to store their test data within the test cases they can create their own properties inside the test case. So these properties can be accessed within the respective test cases.
Q #30. Explain the procedure to parameterize the endpoint in SoapUI?
Parameterizing feature is most important when we automate the test cases and also this is the beginning of the test step creation process. Let us have look into this.
- Create project which has the endpoint information
- If necessary, change the endpoint and assign to the property through the property expansion test step
- Make sure the request information available in the given endpoint address
- During the execution time, property will hold the test value. Providing different input value to the property it is easy to do it through the IDE.
Q #31. What are the major places that Groovy Script Teststep used?
In SoapUI, we can use Groovy Script in the following two places.
- Groovy Script Teststep under the test case
- Script Assertion Test Step
Q #32. Soap vs REST?
SOAP is a protocol and REST is architecture. It allows us to send SOAP envelops to REST based applications.
- REST supports different message formats but SOAP permits XML only.
- REST services are faster and easy to handle.
- SOAP is tied with SMTP and HTTP protocols whereas REST relies on HTTP only.
- SOAP is more secure and structured format.
- REST does not depend on any specific standards as it supports various messaging formats like JSON, CSV and XML.
- SOAP web services allow us to build the client with RESTful services.
- SOAP was introduced for distributed computing.
- After REST’s entry, it accommodated the web by its performance and scalability as it is a light weight component.
- REST is stateless whereas SOAP is a state-ful specification.
- REST uses Uniform Resource Identifier (URI) and it has the methods like GET, PUT, POST and DELETE to expose their resources.
- SOAP uses named operations and interfaces to achieve its business logics.
Q #33. What is RDF?
Ans. Resource Description Framework- RDF contains the description of the web resources such as title, author, content, and copyright information. It is written using XML. For more info and examples, check out this article http://www.softwaretestinghelp.com/web-services-api-testing-tool-soapui-tutorial-1/
Q #34. What data sources can be used in SoapUI?
- Excel Files
- CSV Files
- ODBC Sources
- SQL / ADO Objects
Q #35. How can I parameterize the test data in soap UI?
- We can use excel (Or)
- Use test case level properties
This question also relates to the question “What is Data Driven testing?”
Q #36. What are the REST COMMANDS?
- Create => HTTP PUT
- Retrieve => HTTP GET
- Update => HTTP POST
- Delete => HTTP DELETE
Q #37. How do you validate your response?
- Add assertions to validate the data.
For example date format should be mm/dd/yyyy;
We can add assertions and regular expressions
- Write groovy script to connect to database and retrieve data;
- compare the data with the response xml
The above question is related to “How can assertions be added in SoapUI”?
Q) Difference between REST and SOAP
Ans. SOAP is a protocol for sending/receiving data over HTTP as XML. -REST (Representational State Transfer).It’s a way of designing a web service.
Q) How to use response coming from one service as a request for other service
Q)What is end point in Web Services?
Ans. It is the IP address of the server where the web services are running
Q) How will you do regression testing using soap UI?
Ans. By Creating Test Suite in the SOAP UI we can do regression Testing. We need to keep different assertions for the request coverage, that to confirm that all the expected parameters are coming in the response.
Q) What is XML?
Ans. Extensible Markup Language is a uniform data representation and exchange mechanism.
Q) What is UDDI?
Ans. Universal Description, Discovery, and Integration specification, UDDI is a mechanism to register and located WS based application.
Q) What is WSDL?
Ans. Web Services Description Language, this is a standard Meta language to describe the services offered. Specifically, WSDL states what a request message much contain and what the response will look like in a clear notation. WSDL also defines where the service is available and what communications protocol is used to talk to that service.
Q) What types of operations are available in WSDL?
Ans. There are four operations available: 1. One-way, where the operation can receive a message but will not return a response. 2. Request-response, where the operation can receive a request and will return a response. 3. Solicit-response, where the operation can send a request and will wait for a response. 4. Notification, where the operation can send a message but will not wait for a response.
Q)Define a REST web service?
Ans. REST is Representational State Transfer and it is a network of web pages where the client progresses through an application by selecting links. REST is an architectural style that uses existing standards such as HTTP.
Q) What are web services components? -XML
Ans. SOAP -UDDI -WSDL
Q) Can I use GET request instead of PUT to create resources?
Ans. No, you are supposed to use PUT or POST. GET operations should only have view rights.
Q) What all tools have you used to write Restful web service?
Q) What are the different styles of Web Services used for application integration?
Ans. SOAP WS and Restful Web Service
Q) How would you decide what style of Web Service to use?
Ans. SOAP WS or REST? In general, a REST based Web service is preferred due to its simplicity, performance, scalability, and support for multiple data formats. SOAP is favored where service requires comprehensive support for security and transactional reliability.
The answer really depends on the functional and non-functional requirements.
Asking the questions listed below will help you choose.
- Does the service expose data or business logic? (REST is a better choice for exposing data, SOAP WS might be a better choice for logic).
- Do the consumers and the service providers require a formal contract? (SOAP has a formal contract via WSDL)
- Do we need to support multiple data formats? Do we need to make AJAX calls? (REST can use the XMLHttpRequest)
- Is the call synchronous or asynchronous? Is the call stateful or stateless? (REST is suited for stateless CRUD operations)
- What level of security is required? (SOAP WS has better support for security)
- What level of transaction support is required? (SOAP WS has better support for transaction management)
- Do we have limited band width? (SOAP is more verbose)
- What’s best for the developers who will build clients for the service? (REST is easier to implement, test, and maintain)
Q) What tools do you use to test your Web Services?
Ans. Soap UI tool for SOAP WS
Q) What is the difference between SOA and a Web service?
Ans. SOA is a software design principle and an architectural pattern for implementing loosely coupled, reusable and coarse grained services. You can implement SOA using any protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP (i.e. EJB uses IIOP), and RPC etc. Messages can be in XML or Data Transfer Objects (DTOs). Web service is an implementation technology and one of the ways to implement SOA. You can build SOA based applications without using Web services For example by using other traditional technologies like Java RMI, EJB, and JMS based messaging, etc. But what Web services offer is the standards based and platform-independent service via HTTP, XML, SOAP, WSDL and UDDI, thus allowing interoperability between heterogeneous technologies such as J2EE and .NET.
Q) What types of testing can you perform using SOAP UI?
Ans. Soap UI allows you to easily and rapidly create and execute automated functional, regression, compliance, and load tests.
Q) What is Data-Driven testing? How can you do this using SOAP UI?
Ans. Data-driven testing is when you store test data (input, expected output, etc) in some external storage (database, spreadsheet, xml-files, etc) and then use that data iteratively in your tests when running them. For example to test your phone-lookup service, you might have a list of names and expected phone-numbers in a database which you would use to “drive” your test, checking that each name gets the right phone-number back. It’s really quite simple.
Q) Which version of SOAP UI Pro are you using?
Ans. Mention the latest version
Q) How to add an Assertion to the test?
- Open the request editor.
- In the request editor, click the Add an Assertion to Test Request button.
- Select Response SLA from the drop down in the Select Assertion dialog box.
- In the Configure Response SLA Assertion dialog box, write 500 and click OK. This will validate that the response of the SLA is fewer than 500.
- Now that you’ve added the assertion, you are going to run the request to validate the response. If all assertions are successful, the SOAP icon should turn green in three places .
You can also validate the response by adding an X-Path Match assertion.
- In Soap UI Pro you can open the Select X-Path dialog, which lets you select nodes to assert using point-and-click. As a result Soap UI creates the matching X-Path expression that refers to the selected node.
- Soap UI automatically populates the expected result to match what’s in the response. But of course, you can change this to what’s relevant for you.
Q) How to access the Project name from a Groovy Script Test Step?
Ans. testRunner.testCase.testSuite.project.name (Almost all items have a name property)
Q) How do I save the changes I make to my projects, requests, Test Cases, etc?
Ans. Soap UI automatically saves everything on exit. If you want to save your projects without exiting (for example if you want to commit your project file to CVS) use the “Save All” option in the main File menu
Q) How to Create a Mock Service?
1. Right-click on one of the SOAP interfaces and selects Generate Mock Service.
2. In the dialog Generate Mock Service you can specify the local port/path for the service you’re creating but for the moment just click OK.
3. Enter the name of your Mock Service in the Name dialog and click OK.
4. after creating the Mock Service, you should get a Mock Service with one operation and one request.
Q) What languages are supported in SOAPUI?
Q) What exactly WSDL document contains?
Ans. It is a document written in XML and used to describe web services.
It specifies the location of the service and the operations (or methods) the service exposes.
Q) Few tools used in your project if you used web services.
Ans. SOAP UI: Test the web service
Sometimes some of the back end services might not available, so you can create a mock response and run the web service from the soap UI. Then your program should hit the mock response and you can check the functionality.
Restful service calls:
HTTP PUT =>Create
HTTP GET => Retrieve
HTTP POST => Update
HTTP DELETE => Delete
GET: GET is the simplest type of HTTP request method; the one that browsers use each time you click a link or type a URL into the address bar. It instructs the server to transmit the data identified by the URL to the client. Data should never be modified on the server side as a result of a GET request.
PUT: A PUT request is used when you wish to create or update the resource identified by the URL.
DELETE: DELETE should perform the contrary of PUT; it should be used when you want to delete the resource identified by the URL of the request.
POST: POST is used when the processing you wish to happen on the server should be repeated, if the POST request is repeated (that is, they are not idempotent; more on that below). In addition, POST requests should cause processing of the request body as a subordinate of the URL you are posting to.
Q) Name a few HTTP status codes/messages
- 200 OK This response code indicates that the request was successful.
- 201 Created This indicates the request was successful and a resource was created. It is used to confirm success of a PUT or POST request.
- 400 Bad Requests The request was malformed. This happens especially with POST and PUT requests, when the data does not pass validation, or is in the wrong format.
- 404 Not Found This response indicates that the required resource could not be found. This is generally returned to all requests which point to a URL with no corresponding resource.
- 401 Unauthorized. This error indicates that you need to perform authentication before accessing the resource.
- 405 Method Not Allowed The HTTP method used is not supported for this resource.
- 409 Conflicts This indicates a conflict. For instance, you are using a PUT request to create the same resource twice.
- 500 Internal Server Errors When all else fails; generally, a 500 response is used when processing fails due to unanticipated circumstances on the server side, which causes the server to error out.
Conclusion: The above are some typical SoapUI based questions. However, please do bear in mind that the Q&A format is really very rare. Interviewers are more interested in knowing your experiences and expertise – rather than the ability to answer few trivia based questions.
SOAPUI REST Services Tutorial [Click Here]
SOAPUI SOAP Services Tutorial [Click Here]