Soap UI
Soap UI is a tool
for testing Web Services . It is cross platform tool and build entirely on java
platform.
WSDL is Xml
document that contains all details about Web Service and all API requests. This
is hierarchy we use in Soap UI-- Projects->TestSuite->test case->test
step
Once we download
the soap UI, we can create new Soap project. Then one Diglog box will open and
you have to write the project name and initial WSDL. As I have used CountryInfo
Service as a WebService. For example- Countryinfoservicesoapbinding
is the WSDL(Web Services Description Language). We test our API’s like
CountryName, CountryCity, CountryISOCode, FullContryInfo and so on. We have
request editor and response editor.
After right click
on WSDl, go to the option generate Test Suite, you will get a window like style
(one test case for each operation, single test case with one request for each
operation). You have to choose the style what you want but the best style is
single test case with all requests. Give test suite name then it has created a
test suite. Test case and test step will be generated .
You can validate
your test by putting many assertions as you can. We can run our test case in
sequence and parallel . When you are running test suite if a test case is
failed then test suite will be fail.
We can create our
API documentation . We can take
particular API And it is very handy .
We can create
rest API projects as well in Our SoapUI. In Rest API project, the method to
add API’ S are the same , we add different Requests and add these requests to
the test case by right click on request.
We can add
parameters (name,value,style,level) by using request editor. We can run from
different levels. In test suite, it run all the test case together. For
example, we have to check country name is present or not, for this purpose we
add assertions like contains . After adding assertions, it has become a test
case.
Properties -
Properties can be
used to store values as a variables that can be referred as testing . Properties
can be accessed at following levels:
Properties can be accessed at following
levels:
Project - ${#Project#PropertyName}
TestSuite - ${#TestSuite#PropertyName}
TestCase - ${#TestCase#PropertyName}
TestStep -
${TestCaseName#PropertyName}
System - ${#System#PropertyName}
Env - ${#Env#PropertyName}
Global - ${#Global#PropertyName}
GROOVY Script:
Groovy is
a scripting language which internally includes all the Java
libraries, therefore all java related keywords and functions can be used in
the groovy script directly.
Groovy
Script test step is included for custom automation test script creation
in SoapUI / Pro. It can be used for functional/
load/regression.
In SoapUI, we use
grovvy gettting and setting property .
It is static and
dynamic language with feature similar to python
Some of
the advantages that you will have with groovy:
·
Run
any step 5–10 times with programming
·
Read
excel files with programming
·
SoapUI
free version does not have many features but those can be used with the help of
groovy like data driven testing
·
You
can write a logic and produce an output and use it as input to a request
·
Assertion
can be applied in programming way (if / else)
·
Save
logs in your system with groovy logic
No comments:
Post a Comment
Please let me know if you have any doubts.