Creation of Test Case in SOAP UI: I. Right Click On The Suite and Select The Option To Create New Test Case

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Creation of test case in SOAP UI:

I. Right click on the suite and select the option to create new test case.

1. Add URL for REST or SOAP: Right click on project and select the option as shown:
2.
Add the endpoint in the pop up and click ok, for SOAP green arrow will generate for
REST blue as shown in above screenshot.

2.Add REST/SOAP API to any test case: Right click on the API as shown below and click
on the option as shown below, a pop up will appear with the list of test cases where you
want to add. Click on the test case and follow next pop-up to rename the API.
3. The highlighted steps are common for all the test cases.

4.In DataSource mention the workbook name present in your Data folder and the
sheet name as mentioned.
5.Insert steps as per the test case by right clicking on the step and insert step:

6. Clone test cases in case steps or API are common and requires modification in
sheet name of DataSource, API body and assertion or addition of few more test
cases. You can clone test step/test case/test suite as per the requirement. As shown
above there are options to clone the test step, similarly right lick on test-
suite/testcase to clone, rename, etc.

7. Double click on API, click on assertion to add assertions by clicking on green plus
sign, make sure to rename the assertion it is mentioned in test case.

8. Create and delete validations are added where you need to create any
incident/problem/SR and add the number generated in the API. Copy the script to
your test case and rename the API as per name used.
Change the aPI name in the script number of times it appears. If there are 5 create
api need to change for 5 blocks. Similarly for delete validation.

Currently we are doing REST to SOAP conversion for ver 3.0 to ver 7.0, and A3 token
implementation.

For SOAP to REST conversion.

1. Clone the suite you want to convert to SOAP.


2. Add the SOAP UI od Authenticate from the endpoint as shown below:
3. Add the headers and XML body with envelope from connect me page.
4. Compare the REST body with SOAP and all the field values in present in REST
corresponding in SOAP body.
5. Add the assertion as present in REST to SOAP. Few modification might be required in
case Xpath and groovy script validations are present.

For A3 token please refer below steps:

Step 1 : Set the Header 

Content-Type : application/json 
Step 2 : Paste the below in the Body section and change the password for your App

{
"appId" : "3720",
"appPassword": “password",
"otherApp": "4237",
"context" : "#GrandPrix#",
"oneTimeToken" : false,
"contextVersion" : 3,
"timeToLive" : 6000000
}
Step 3 : Use the below Endpoint and generate the token

Endpoint : https://idmsservice-uat.corp.apple.com/auth/apptoapp/token/generate

Step 4 : Add new 2 Headers in the API as below

HTTP_HEADER_SSP_AUTH_TOKEN  : <Token generated>


HTTP_HEADER_SSP_AUTH_TOKEN_TYPE : A3_TOKEN

Step 5 : Remove the espToken section


highlighted below line from the API Payload and execute the API
For reference to the test case refer Pushpa connectme page.
https://connectme.apple.com/people/pushpalatha_giriyappa/content

For Jenkins:
http://17.207.87.195:8443/job/SOAPUI_Test_Automation/

You might also like