This action might not be possible to undo. Are you sure you want to continue?
Table of Contents
Table of Contents........................................................2 1 Introduction.............................................................3 2 How to create a Test Suite?..........................................4 3 How to add requests in a test suite?.................................7 4 Modify Pass/Fail reporting option in a Test Case?................11 5 Set the Aut credentials ..............................................13 6 Set end point URL for requests.....................................17 7 Running TestRequests and TestCase...............................20 8 Assertions:.............................................................23
Let’s look at these in a little more detail: TestSuites (as mentioned above) are created at the project level for grouping TestCases into logical units. 2. They are added to a TestCase and used control the flow of execution and validate the functionality of the service(s) to be tested. 3 . 3. For example we can have one TestSuite with account-related TestCases and another for TestCases related to payments. TestCases and TestSteps. 1. This has been explained in detail in this document. You can add any number of TestCases to a containing TestSuite and even modularize them to call each other for complex testing scenarios. Any number of TestSuites can be created inside a soapUI project to support massive testing scenarios. A TestCase is a collection of TestSteps that are assembled to test some specific aspect of your service(s). TestSuites. TestSteps are the "building blocks" of functional tests in soapUI. Our project can contain any number of TestSuites and we can see and execute them all (in sequence or parallel) from the Project TestSuites tab. A TestSuite is a collection of TestCases that can be used for grouping functional tests into logical units.1 Introduction SoapUI structures functional tests into three levels.
1.1 Goto File New soapUI Project 2.1. And press ‘OK’.2 Provide Project Name and WSDL path (file system path).1 Create a Project in soapUI 2. 4 .2 How to create a Test Suite? 2.
2.1 Right click on the project created and select option ‘New TestSuite’ 5 .3 New project has been created: 2.2.2 Create Test Suite 2.1.
3 A new test suite has been created.2. 6 .2 Provide a name for the Test Suite and press ‘OK’ 2. as shown below.2.2.
1.1 Create a new TestCase 3. as shown below: 3. as shown below: 7 .1 Right click on the TestSuite that you created and select option ‘New TestCase’.3 How to add requests in a test suite? 3.2 Provide a name to the new TestCase and press ‘OK’.1.
1.3 A new TestCase has been created inside out TestSuite.3.1.1 Right click on the new TestCase that has been created and select option ‘Add Step’ ‘SOAP Test Request’. 3.2 Create new empty request. as shown below.2 Specify the name for the request XML. as shown below. 3. as shown below. 8 . and press ‘OK’.1. 3.
3 Then Select the operation that the request will invoke. 3.5 Then select the options.3.1.4 And press ‘OK’. 3. and press ‘OK’ again. as shown below. 9 .1.1.
6 An empty Input XML has been created.1.3. 10 .
even if a single TestStep fails inside the TestCase. 11 . and select ‘Options’. 4. This can be achieved by following the below mentioned steps.4 Modify Pass/Fail reporting option in a Test Case? We can declare a TestCase inside a TestSuite as Failed.1 Right click on the ‘TestCase’ inside the ‘TestSuite’. as shown below.
And the execution of the TestCase will not stop when a TestStep fails. a TestCase will be shown as failed if even a single step inside the TestCase fails. and press ‘OK’. After making these changes. 12 .2 Uncheck the checkbox ‘Abort on error’ and check the checkbox ‘Fail TestCase on Error’.4.
for which the credentials have to added.2 The following screen will appear.5 Set the Aut credentials 5. 5. 5.1. Provide ‘username’ and ‘password’.1 Double click on the Request.1. and then select the tab ‘Aut’ at the bottom of the request. as shown in the image below. 13 .1 Set the Aut credentials (Username and password) for a single request in the TestCase.
5.2.2 Select the ‘Key’ present on the title bar. The following screen will appear.1 Double click on the TestCase that you created.5.2 Set the Aut credentials (Username and password) for all the requests in a TestCase. 14 . as shown in the image below. 5.2.
2.3 The following screen will appear. This will set the same username and password for all requests present in this particular TestCase.4 Provide Username and Password and press ‘OK’. 15 . 5.2.5.
for which the end point URL has to be set.6 Set end point URL for requests 6.2 On the address bar.1.1 Double click on the Request. 6. and press OK. select option ‘Edit Current’ and provide the desired end point url.1 Different end point URL’s for different requests 6.1. 17 .
2 Select the ‘URL’ button present on the title bar. 18 .2. 6.2 Same end-point URL for all the requests in a TestCase: 6. The following screen will appear.6.1 Double click on the TestCase that you created.2.
This will set the same end-point URL for all the requests present in the TestCase.2. 19 .6.3 Set the end-point URL and press ‘OK.
1 Running individual TestRequests 7.1 Double click on the TestRequest that has to be run and press run image.7 Running TestRequests and TestCase 7.1. as shown below. 20 . present on the tool bar.
2 Running all requests present in a TestCase 7. Uncheck option ‘Abort on Error’. And press ‘OK’. and goto ‘Options’. as shown below.2. 7.2 The following screen will appear.7.2.1 Right click on the TestCase that needs to be run. 21 .
7.3 Double click on the TestCase that needs to be run. present on the tool bar.7.4 Select the green arrow.2. 22 . the following screen will appear. This will run all the test cases present in the TestCase. Screen similar to the following will appear.2.5 After all TestRequests inside a TestCase have been executed.2. 7.
1 Right click on the TestCase name in which the request XML has to be added.1.8 Assertions: Now that we've created our test. soapUI contains several functions that enhances automation for those who spends their days (and nights) testing and are in need of extensive assertions. and select option ‘Add Step’ ‘SOAP Test Request’ 23 . In soapUI. 8.1 Adding assertions at the time of creating request XML. we are going to add a validation of the response. this is called adding an assertion. Examples of assertions that are possible in soapUI are: • Schema Compliance • Simple Contains • Simple Not Contains • SOAP Fault • Not SOAP Fault • SOAP Response • Response SLA • XPath Match • XQuery Match • Script Assertion • WS-Security Status • WS-Addressing Response Assertion • WS-Addressing Request Assertion 8.
1. 24 .8. 8. select those and press ‘OK’.3 Select the operation from the dropdown and press ‘OK’. as shown below.2 Provide the name of the request and press ‘OK’. Whatever option is application in your case.1.1. 8.4 The following four assertion options are provided at this stage.
The following screen will appear.1.2.8. 25 .1 Double click and open the request XML for which an assertion has to be added.5 A new blank XML has been created with the assertions applied. as shown in the image below.2 How to add assertions? 8. 8.
2. write 500 and click ‘OK’. 8.2 In the request editor.Select Response SLA from the drop down in the Select Assertion dialog box.3 From the dropdown select the assertion that has to be implemented. 26 . 8.8. Click the Add an Assertion to Test Request button. Example .4 In the Configure Response SLA Assertion dialog box. This will validate that the response of the SLA is under 500.2.2.
3. As shown below there are ‘3’ assertions applied on this response. If all assertions are successful.1 The number of assertions that have been applied on the Response can be verified from the ‘Assertion’ tab.8. the SOAP icon will turn green in three places as shown below. we are going to run the request to validate the response.3 How to find how many assertions have been applied to a request XML? 8. 8.5 Now that we’ve added the assertion. 27 .2.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.