Вы находитесь на странице: 1из 5

A Job Guaranteed Program for Software

Engineers

Visit JALATechnologies.com for more details

Web Services Testing Web Services Testing Duration: 2 Days

Installing the SOAP UI Open Source

1. Download the SOAP UI Open Source Installer


https://www.soapui.org/downloads/soapui.html

2. Make sure the tutorials are installed, During the installation, It asks for the permission to
install the SoapUI-Tutorials

Creating a SOAP Project

1. Use the below WSDL Services


http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?
WSDL
http://dneonline.com/calculator.asmx?wsdl

2. Create a TestSuite named TestSuite1

3. Create a TestCase named TestCase1

4. Create a TestStep named TestStep1

5. Create at least 5 test steps with different input data

6. Create a test step for generating fault code( Wrong input leads to fault code)

7. Double click on the project and understand the overview screen

8. Add assertion using contains

9. Add assertion using not contains

JALA Technologies offers Job Guaranteed Programs for Fresher’s to 12 years’ experience with salary range of 2-16 lakhs per
annum on JAVA / .Net / Automation Testing / Dev-Ops / Middleware Technologies / WebLogic / JBOSS / Python and for those who
want to be a software engineer in 100 Days. Know more Details at: http://jalatechnologies.com/
A Job Guaranteed Program for Software
Engineers

Visit JALATechnologies.com for more details

10. Add the below script to scripting assertion and check the result

// JALA Technologies
//Define Groovy Utils and holder for validating the XML response content
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder(messageExchange.responseContent)

//Define the NameSpace


holder.namespaces["ns1"] = "http://tempuri.org/"

//Get the Value of the Node 'AddResult' and assign it to a variable


def sum = holder.getNodeValue("//ns1:AddResult")

//print the value of the conversion rate in the Output pane


log.info "The Addition of two numbers is " + sum

//Comparing the value to print 'Pass' or 'Fail'


if(sum=="40")
{ log.info "Pass" }
else
{ log.info "fail"}

Scenarios
1. Validating the node value
XPath Expression:
//ns1:AddResult

2. Validating the HTTP Status Code


Script Assertion:

JALA Technologies offers Job Guaranteed Programs for Fresher’s to 12 years’ experience with salary range of 2-16 lakhs per
annum on JAVA / .Net / Automation Testing / Dev-Ops / Middleware Technologies / WebLogic / JBOSS / Python and for those who
want to be a software engineer in 100 Days. Know more Details at: http://jalatechnologies.com/
A Job Guaranteed Program for Software
Engineers

Visit JALATechnologies.com for more details

def expectedHTTPResponse = ['HTTP/1.1 200 OK']


def headers = messageExchange.response.responseHeaders
def actualHTTPResponse = headers['#status#']
assert expectedHTTPResponse == actualHTTPResponse

3. What is fault code and fault String

Web Service Error Code References

Number Name SOAP fault Description

301 Moved Server The requested page has been permanently


permanently moved. The server automatically redirects the
request to the new location.

304 Not Modified Server The server has decided, based on information
in the request, that the requested data has not
been modified since the last request and so it
does not need to be sent again.

307 Temporary Server The requested page has been moved, but this
Redirect change may not be permanent. The server
automatically redirects the request to the new
location.

400 Bad Request Client.BadRequest The HTTP request is incomplete or


malformed.

401 Authorization Client.Authorization Authorization is required to use the service,


Required but a valid user name and password were not
supplied.

403 Forbidden Client.Forbidden You do not have permission to access the


database.

404 Not Found Client.NotFound The named database is not running on the
server, or the named web service does not

JALA Technologies offers Job Guaranteed Programs for Fresher’s to 12 years’ experience with salary range of 2-16 lakhs per
annum on JAVA / .Net / Automation Testing / Dev-Ops / Middleware Technologies / WebLogic / JBOSS / Python and for those who
want to be a software engineer in 100 Days. Know more Details at: http://jalatechnologies.com/
A Job Guaranteed Program for Software
Engineers

Visit JALATechnologies.com for more details

exist.

408 Request Server.RequestTimeout The maximum connection idle time was


Timeout exceeded while receiving the request.

411 HTTP Length Client.LengthRequired The server requires that the client include a
Required Content-Length specification in the request.
This typically occurs when uploading data to
the server.
413 Entity Too Server The request exceeds the maximum permitted
Large size.

414 URI Too Large Server The length of the URI exceeds the maximum
allowed length.

500 Internal Server Server An internal error occurred. The request could
Error not be processed.

501 Not Server The HTTP request method is not GET, HEAD,
Implemented or POST.

502 Bad Gateway Server The document requested resides on a third-


party server and the server received an error
from the third-party server.
503 Service Server The number of connections exceeds the
Unavailable allowed maximum.

Request Methods:

GET Read or retrieve data

POST Add new data

PUT Update data that already exists

DELETE Remove data

JALA Technologies offers Job Guaranteed Programs for Fresher’s to 12 years’ experience with salary range of 2-16 lakhs per
annum on JAVA / .Net / Automation Testing / Dev-Ops / Middleware Technologies / WebLogic / JBOSS / Python and for those who
want to be a software engineer in 100 Days. Know more Details at: http://jalatechnologies.com/
A Job Guaranteed Program for Software
Engineers

Visit JALATechnologies.com for more details

Creating a REST Project from URI

1. Use the below URI to create a REST project


http://petstore.swagger.io/v2/swagger.json

2. TBD

XPath for JSON tool: Helps to generate XPath for JSONPath Expression
http://jsonpathfinder.com/

JALA Technologies offers Job Guaranteed Programs for Fresher’s to 12 years’ experience with salary range of 2-16 lakhs per
annum on JAVA / .Net / Automation Testing / Dev-Ops / Middleware Technologies / WebLogic / JBOSS / Python and for those who
want to be a software engineer in 100 Days. Know more Details at: http://jalatechnologies.com/

Вам также может понравиться