You are on page 1of 261

Before we strt testing with sopui, follow step by step procedure mentioned below to instll sop ui bet (version

4.5.1) in your mchine. Before strting to instll SOP UI bet you cn downlod the setup (.exe) file from the link SOPUI Step 1: Click on sopUI-x32-4.5.1.exe (32 bit windows instller) vilble in your locl computer. This will strt the Sopui instller s shown below.

Step 2: fter the bove instller progress completes you will see the Smrtber Setup wizrd. Click on Next.

Step 3: License greement window is displyed. Click on I ccept the greement nd click on Next.

Step 4: In this window, choose the destintion directory for sopui 4.5.1 to be instlled in your locl computer.

Step 5: Select components window displys vrious components vilble for Sopui. Just click on Next.

Note: Uncheck Hermes JMS component since instller would sk for jr file. Step 6: The window shown in below figure llows downloding LodUI if u check the box.

Note: If you don t wnt to setup LodUI, skip the below steps nd continue from Step 7.

Check the box to instll lodui in your setup wizrd nd click on Next.

Now the window sks for proxy if it is vilble in your system. If you hve proxy, provide the proxy nd the port detils. Otherwise click on Next.

Clicking on Next displys the License greement for LodUI.

Step 7: Choose the trget loction for SOPUI tutorils using browse button.

Step 8: Click on Next in the consecutive screens shown below.

Step 9: Check the option crete desktop icon s in the imge to crete shortcut for SOPUI on desktop.

Note: If you get the below error while Instlltion, error setting jxbrowser instll dir , downlod the .exe file gin nd instll it gin.

Step 10: Click on Finish to complete instlltion

Crete New Project in SOPUI

Now tht we hve setup the environment for testing in Sopui in the previous tutoril, let s see how to crete project in this tutoril to do vrious types of testing like functionl testing, lod testing, security testing, etc., Before we strt creting new project in sopui 4.5.1, you need to know some of the importnt terms.

SOP is simple XML-bsed protocol to let pplictions exchnge informtion over HTTP. Or more simply: SOP is protocol for ccessing Web Service. Why SOP?? It is importnt for ppliction development to llow Internet communiction between progrms. Todys pplictions communicte using Remote Procedure Clls (RPC) between objects like DCOM nd CORB, but HTTP ws not designed for this. RPC represents comptibility nd security problem; firewlls nd proxy servers will normlly block this kind of trffic. better wy to communicte between pplictions is over HTTP, becuse HTTP is supported by ll Internet browsers nd servers. SOP ws creted to ccomplish this. SOP provides wy to communicte between pplictions running on different operting systems, with different technologies nd progrmming lnguges.

WSDL: WSDL stnds for Web Services Description Lnguge. It is written in XML. So we cn sy, WSDL is n XML document. WSDL is used to describe Web services. It is lso used to locte Web services. It is W3C recommendtion nd specifies the loction of the service nd the opertions (or methods) the service exposes.

W3C Recommendtion: W3C Recommendtion is the finl stge of rtifiction process of the World Wide Web Consortium (W3C) working group concerning technicl stndrd. This designtion signifies tht document hs been subjected to public review, hs circulted mongst W3C member orgniztions for review, hs tken ccount of feedbck on how implementble the document is nd tht it hs finished these processes. t this stge, the document hs been formlly pproved by W3Cs director preventing ny further technicl chnges nd mking it redy for wide deployment in its problem domin. The purpose of the recommendtion is to stndrdise the Web technology. It is the equivlent of published technicl stndrd in mny other industries.

With the knowledge of wht is WSDL nd wht is SOP, let s see how to crete project now in SOP UI step by step.

Step 1: Click on sopUI 4.5.1.exe, this will open the SOPUI s shown.

Step 2: SOPUI is displyed s shown.

The window nd its pnes re described in imge s shown below.

Step 3: To crete new project, Click on File New SOPUI Project.

Step 4: New SOPUI project is displyed s shown in figure. This llows the user to select vrious options while creting project.

Step 5: In the bove window just give the project nme nd provide the wsdl url or wsdl file loction by clicking on Browse nd click on OK s shown in the imge below. For smple testing, use the wsdl url provided, http://www.mobilefish.com/services/web_service/countries.php?wsdl

Step 6: Clicking on OK, will disply the progress of loding definition s shown below.

Step 7: Thus the sopui project is creted successfully s shown in the imge below.

Run project in SOPUI

So fr, we hve seen how to crete project in sopui. Now in this tutoril, let s see how to run request vilble in project. In order to run project, crete project s explined the previous tutorils. Follow the below steps to run project in SOPUI.

Step 1: Click on Request nme. This will disply the defult requests s shown in the imge below.

Step 2: In the request, fill the vlue for the tgs with ? .

Step 3: Check for the service endpoint before clicking in Run button.

Step 4: Click on Run button s shown in the below imge.

fter clicking on RUN,

Step 5: Now you cn find the response for the bove requests in the Response window.

Thus the response for the sop request is obtined s shown in the bove imge. Thus sopui project is run successfully.

Seting Up Preferences in your SOPUI

In this tutoril, let s see how to setup preferences nd sve your preferences vilble in SOPUI open source version nd Pro version. Step by step explntion of ll the preferences is explined below.

Step 1: To go to Preferences window, click on File Preferences or you cn just press Ctrl+lt+P key s shown in the imge below.

Step 2: This will open the SOPUI Preferences window s shown below. SOPUI Opensource version:

SOPUI Pro version:

Some of the tbs in both SOPUI open source nd Pro versions re common. The tbs in preferences window re explined below. 1. HTTP Settings tb: Set properties specific to HTTP protocol (protocol version, User-gent heder, request nd response compression etc.).

Option HTTP Version User-gent Heder

Description Selects the HTTP version Sets the HTTP User-gent Heder. If none is specified the defult HttpClient heder is

Request Compression Response Compression Disble Response Decompression

Close connections fter request Chunking Threshold

uthenticte Preemptively Expect-Continue

Preencoded Endpoints Bind ddress

used Selects the request compression type Indictes if compressed responses from hosts re ccepted Disbles decompression of compressed responses Disbles HTTP Keep-lives by requesting to close the HTTP connection fter ech request. This will hve negtive impct on performnce but my give more relistic vlues during lod testing Using content-chunking for requests lrger thn threshols, blnk to disble Send uthentiction heders with ech request without first receiving n uthentiction chllenge. This is potentil security hzrd but will improve performnce since only one request will be required for uthenticted endpoints insted of two dds Expect-Continue heder to outgoing request. Do not URL-encode endpoints, set this if your endpoint URLs re lredy URL-encoded (contining for exmple %20 or %3) The locl ddress to bind to when sending requests, cn be overridden on request

Include request in time tken Include response in time tken Socket Timeout Mx Response Size

Mx Connections Per Host

Mx Totl Connections

Leve MockEngine Enble Mock HTTP Log

level (with the corresponding request property) nd on system level by setting the sopui.bind.ddress system vrible. Includes the time it took to write the request in time-tken Includes the time it took to red the response body in time-tken The socket timeout for HTTP requests in milliseconds The mximum number of bytes to red from response (0 = unlimited) The mximum number of simultneous connections to specific host. Increse this vlue if you re running LodTests with more thn 500 threds on prticulr host. The totl mximum number of connections. Increse this vlue if you re running LodTests with more thn 2000 threds. Will leve the MockEngine running even when ll MockServices hve stopped resulting in much fster strtup-times for new MockServices nd 404 errors when trying to cll stopped MockService (insted of connection filure) Logs wire content of ll mock requests. Selecting this option will degrde Mock

Engine performnce mrginlly nd my require restrt to enble or disble. 2. Proxy settings tb: Define proxy server (host, port, usernme, pssword nd excludes). lso this is where user specify whether proxy is in use or not.

Option Proxy Host Proxy Port Proxy Usernme Proxy Pssword

Excludes

Enble proxy

Description The HTTP Proxy host to use The HTTP Proxy port to use The usernme sent for proxy uthentictions The pssword sent for proxy uthentictions comm-seprted list of hosts to exclude, for exmple 127.0.0.1:8080, myserver.com will not use proxy for 127.0.0.1 on port 8080 nd myserver.com on ny port. Flg indicting if supplied proxy properties should be enbled, i.e. if proxy should be used

.SSL Setting tb: Define keystore, nd Mock service SSL prmeters.

Option

Description Pth to the keyStore to use when locting KeyStore client certifictes KeyStore pssword the keyStore pssword Enble Mock SSL Enbles SSL support for MockServices Mock Port The port for SSL connections Mock KeyStore The keystore to use for SSL certifictes Mock Pssword The keystore pssword Mock Key Pssword The defult keys pssword Mock TrustStore The truststore to use (optionl) Mock TrustStore Pssword The truststore pssword Client uthentiction Indictes if client uthentiction is required

4. WSDL Settings Tb: Define WSDL specific properties.

Option Cche WSDLs Smple Vlues Type Comment Include Optionl Pretty Print

ttchment Prts

No Content-Type Vlidtion

Schem Directory

Nme with Binding

Description Turns on nd off cching of WSDLs Genertes exmple vlues in requests when creting from schem Genertes comments with type informtion in new requests lwys includes optionl elements in generted requests Pretty prints response messges in response editor Genertes prt-elements in request messges for mime-ttchments in RPC messges (required by some ws-stcks) Does not vlidte the content-type of mime-ttchment ginst the type(s) specified in the SOP-Binding Specifies directory contining schem (.xsd) files tht should be utomticlly dded when prsing or vlidting wsdl or requests. Chnging the contents of this directory requires restrt. Tells SopUI to nme imported interfces with the nme of their corresponding sop/http binding, nd not with their portType. This ensures tht WSDL contining bindings for both SOP 1.1 nd

Excluded Types 5. UI Settings Tb:

SOP 1.2 will get unique nmes during import. This setting defults to true. list of XML-Schem types nd globl elements in the form of nme@nmespce which will be used when generting smple requests nd responses nd input forms in the SopUI Pro Form editor. By defult the XML-Schem root element is dded since it is quite common in .NET services nd genertes smple xml frgment of bout 300 kb!.

Define user interfce properties (bckup, utosve, look & feel, items ordering in tree, tooltips visibility, grbge collection intervl etc.).

Option

Close Projects Order Projects Order Services Order Requests Show Descriptions Sve Projects On Exit Crete Bckup

Bckup Folder

uto Sve Intervl

Desktop Type

Description Closes ll projects t strtup for improved strtup-time nd less memory consumption. Sorts Projects in lphbeticl order in the nvigtor. Sorts Services in lphbeticl order in the nvigtor. Sorts Requests in lphbeticl order in the nvigtor. Show description content when vilble utomticlly sve ll projects on exit. Cretes bckup copy of projects projectfile before sving. The folder where to sve bckups, if reltive or empty the folder is reltive to the project files folder Sets project uto sve intervl (in minutes). If set over 0, SopUI will utomticlly sve ll projects tht hve no running tests (both Functionl nd Lod) t the specified intervl Selects which desktop lyout to use. SopUI Pro dds Tbbed Desktop s n lterntive to the defult lyout. Chnging this setting will be pplied when closing

the preferences dilog. 6. Editor Settings Tb: Set vrious editor properties like font, line numbers visibility, request nd response vlidtion etc.

Option

Editor Font XML Line Numbers

Groovy Line Numbers

Description The font to be used by ll XML Editors. The Select Font button opens dilog for selecting the desired font nd size. Shows line-numbers by defult in ll XMLEditors (use lt-L in editors to toggle). Shows line-numbers by defult in ll Groovy-Editors (use lt-L in editors to toggle).

Disble uto-resize Tbbed Request view

Vlidte Requests

bort on Invlid

Vlidte Responses 7. Tools Tb:

Disbles utomtic resizing of request/response editors. Sets the tb-lyout s the defult lyout for request/response editors. Turns on utomtic vlidtion of requests before they re submitted from request editor. The vlidtion performed is the sme s when pressing lt-V in the editor. Enbled in conjunction with Vlidte Requests, if selected ny requests tht fil vlidtion will not be submitted. Turns on utomtic vlidtion of response messges when they re received in response editor. The vlidtion performed is the sme s when pressing lt-V in the editor.

Define externl tools executbles. To run tools from the Tools min ppliction menu, their executbles must be defined here.

Option JBossWS wstools JX-RPC WSCompile JX-WS WSImport xis 1.X

Description Loction of JBossWS wstools Loction of JX-RPC wscompile Loction of JX-WS wsimport Loction of xis 1.X

xis 2.X .NET 2.0 wsdl.exe XFire 1.X CXF 2.X

Loction of xis 2.X Loction of .NET 2.0 wsdl.exe Loction of XFire 1.X Loction of CXF 2.X

8. WS-I Settings Tb: Define WS-I tools properties.

Option Verbose Results Type Messge Entry

Description Sets verbose output of WS-I tools Sets which results to show in the generted report Shows messge entries in report

Filure Messge ssertion Description Tool Loction Show Log

Output Folder 9. Globl Properties :

Includes defined filure messges in report Includes description of ech test ssertion in report Locl pth to instlled WS-I test tools Shows Log window when running WS-I tools If specified, generted HTML reports will utomticlly be exported to this folder, which is required when running ws-i vlidtion from the commnd-line or one of the Mven plug-ins

Define custom globl ppliction properties. Option Enble Override 10. Globl Security Settings Tb Define pssword for shdowing proxy pssword in settings file. Option Pssword Description Pssword for shdowing proxy pssword in settings file Description Enbles overriding of ny propertyreference with globl properties

11. WS- Settings Define prmeters relted to web services ddressing. Option Description If present in the WSDL Sop ction Overrides sop ction overrides WS-S ction ws:ction 12. lodUI Settings Tb Define pth to lodUI nd integrtion ports. Option Description lodUI.bt(.sh) folder Pth to lodUI executble 13. Web Recording Settings Tb Define request heders to exclude during web recording. Option Description Request heders to exclude from recording

Excluded heders 14. SopUI Pro Tb Set SopUI Pro specific properties.

Option Defult Request Editor Defult Response Editor

Outline Editor Limit

Form Editor Limit

Tble Inspector Columns Script Librry Disble Reporting Complete Error Logs Custom Report Librry 15. Coverge Settings Tb

Description Sets the defult Messge Editor to use when Request is opened Sets the defult Messge Editor to use when Response is received Defines the mximum size of messges to hndle in the outline editor; since the outline editor consumes lrge mount of memory, setting limit relted to one s own memory settings is encourged Defines the mximum size of messges to hndle in the form editor; since the form editor consumes lrge mount of memory, setting limit relted to one s own memory settings is encourged Sets the mximum number of columns displyed by the Tble Inspector (due to performnce resons). Prt to folder contining groovy object scripts tht should be globly vilble Disble reporting to preserve memory Logs complete messges to reports on errors Pth to folder contining custom jsper templtes or reports

Enble or disble utopreprtion of coverge reports. Option Description utomticlly prepres for Coverge clcultion when opening window contining Coverge content.

uto Prepre 16. Code Templtes Tb Define code templtes. Option dd Delete Restore 17. JDBC Drivers Properties Tb

Description dds new templte Removes selected templte Restores templtes to defult settings

Declre jdbc drivers nd their connection string ptterns. Option Description dds driver to the driver list Removes selected driver from the driver list Lods driver vlues from n externl file Relods defult driver settings

ject encryption

There my be situtions when you need to ensure your projects re encrypted or secured to prevent misuse of your projects. SOPUI tool provides the project encryption feture to encrypt / secure your project using secure project pssword.

Follow the steps discussed to encrypt your project in SOPUI.

Step 1: Click on the Project nme.

Step 2: In the properties pne of the project, there is n option Project Pssword to provide the pssword for project encryption.

Step 3: Now enter pssword for the project in the Project Pssword field nd press enter to confirm your pssword.

Step 4: Now your project ppers with (E symbol) ner the project nme in the Nvigtor pne s shown in the imge below.

Step 5: Click on File sve ll projects to sve the chnges mde to the projects. Now to check if the project is encrypted, follow the steps discussed below.

Step 1: Crete new workspce using the options, File New workspce.

Step 2: Now SOPUI will prompt to enter workspce nme nd sve ll the projects in the current workspce. Click yes to sve ll the projects.

Step 3: Now switch from the new workspce to the old workspce using the either of the options below,

File Switch workspce nd select the workspce from the folder loction

(OR)

Click on File Recent Workspces Choose Old workspce nme from the dropdown menu.

Step 4: While switching the workspces, SOPUI prompts for the encrypted project vilble in the old workspce s shown below.

Step 5: Enter the vlid pssword nd click OK to open the encrypted projects.

Note: n encrypted project creted in workspce cn be opened in tht workspce without providing pssword.

Thus projects cn be encrypted in SOPUI tool both in bet nd Pro versions. Import Projects into SOPUI

In this tutoril, we will see how to import existing projects into sopui. To crete project in sopui, go through how to crete new project in sopui tutoril. Follow the steps in detil below to import projects into sopui.

Step 1: Right click on Projects in Nvigtor pne nd select Import Project from the dropdown menu or press Ctrl+I s shown below.

Step 2: Selecting Import project will llow you to select project from folder loction.

Step 3: Select project (*.xml) nd click Open.

Thus project is imported successfully.

RESOLVE PROJECTS:

Note: fter importing, SopUI does check of the project to see tht it is consistent nd hs ll necessry externl dependencies vilble ( process clled resolving ). If errors re found Resolve dilog is displyed with ll errors nd giving you options to resolve them s shown below:

Functionl Testing Getting Strted

SopUI is the Swiss-rmy knife of utomted Functionl nd Regression Testing. Powerful nd innovtive fetures help you vlidte nd improve the qulity of your services nd pplictions. Best of ll, you dont hve to be developer to write Functionl Tests in SopUI. So whether youre creting new TestSuites, dding TestCses, or dding ssertions to your TestCses, its ll mzingly simple nd esy. In this tutoril, let s see how to dd request to the test suite nd test cse nd run the request from within the test suite. Before strting this tutoril, crete new project using WSDL in SOPUI s discussed in the previous tutorils. Follow the steps below to run the request using test suite. Step 1: In the project creted click on the request nme s shown in the imge below.

Step 2: Click on

(dd request to test cse) icon s shown in the imge bove in the request window.

Step 3: Crete TestSuite window ppers s shown below.

Step 4: Enter test suite nme of your choice nd click on OK.

Step 5: Enter user defined test cse nme in the Crete TestCse window s shown in the imge below nd click on OK.

Step 6: In the dd request to test cse enter user defined nme nd click on OK.

Step 7: Thus the request is successfully dded to the testcse in testsuite s shown in the imge below.

DD SSERTION: Follow the steps below to dd ssertion to request. Step 1: Click on the icon window. (dd ssertion to the request) s shown below to dd n ssertion in your request

Step 2: This will disply dd ssertion window s shown below.

s you cn see in the bove imge, there re vrious types of ssertions tht cn be dded to vlidte your response.

The vrious types of ssertions re discussed in detil in types of ssertions tutoril. Let s dd SL ssertion for the request in this tutoril using the step by step procedure mentioned below.

Step 3: Click on SL ssertion nd select Response SL option to vlidte the response time for the request sent.

Step 4: Thus SL ssertion is dded successfully s shown in the imge below. To see the ssertions, vilble for request click ssertions tb t the bottom of the request window.

Note: Before running the request for SL ssertion, set the response time limit for the ssertion by double clicking on the ssertion s shown in the imge below. RUN Request: Note: There re mny wys of running request. In this tutoril, we will see

How to run the request directly? How to run t testcse level?

Run the request directly: Step 1: Now tht n ssertion is dded, you cn vlidte your response using the ssertion by running the request directly clicking on RUN.

ssertion- VLID:

ssertion FILED:

Run the request t TestCse level:

Step 1: Click on the TestCse nme to open the testcse window nd click on RUN to run the testcse request s shown below.

VLID ssertion:

Invlid ssertion:

RETE nd RUN TestSuites

Before we crete testsuites in SOPUI, let s see some of the key terms involved in structuring the tests in functionl testing. SopUI structures functionl tests into three levels.

TestSuite is collection of TestCses tht cn be used for grouping functionl tests into logicl units. ny number of TestSuites cn be creted inside sopUI project to support mssive testing scenrios.

TestCse is collection of TestSteps tht re ssembled to test some specific spect of your service(s). You cn dd ny number of TestCses to contining TestSuite nd even modulrize them to cll ech other for complex testing scenrios.

TestSteps re the building blocks of functionl tests in sopUI. They re dded to TestCse nd used control the flow of execution nd vlidte the functionlity of the service(s) to be tested.

Let s see how to crete nd run test suites for project in SOPUI using the steps given below.

TestSuites cn be dded/creted to project in 2 wys.

TestSuites cn be creted from project level. TestSuites cn be generted for binding in project.

Let s see both the wys one by one.

CRETE TestSuites from project level:

Note: This cn be done in 3 wys s shown in steps below.

Step 1: Method 1: Right click on project nme nd select New TestSuite or press Ctrl + T s shown in the imge below.

Method 2:

You cn lso crete testsuite by double clicking on Project nme nd choose testsuites tb s shown in the imge below.

Click on icon

(Crete new TestSuite in this project) to dd new test suite.

Step 2: In the New TestSuite window, enter testsuite of your choice nd Click OK s shown below.

Thus testsuite is creted successfully s shown below. Method 3: Step 1: TestSuites cn be dded in project when creting new project in SOPUI by checking the option Crete testsuite for the imported WSDL or WDL nd Click OK s shown in the imge below.

Step 2: Generte TestSuite window ppers s shown in the imge below.

Step 3: Enter nme for the testsuite generted nd click OK.

Thus testsuite is creted successfully s shown below with the testsuite window.

Testsuite Window:

GENERTE TESTSUITE USING BINDING:

Step 1: Right Click on the binding nme nd select Generte TestSuite option from the drop down menu s shown in the imge below.

Step 2: Generte TestSuite window ppers s shown in the imge below.

Step 3: Enter nme for the testsuite generted nd click OK.

Thus testsuite is creted successfully s shown below with the testsuite window.

Testsuite window:

RUN REQUEST IN TESTSUITE:

So fr, you hve seen how to crete test suites using the bove methods. Now, let s see how to run request in testsuite using the steps below.

Step 1: Double click on the TestSuite nme in the nvigtor pne to open the testsuite editor.

There re 3 different wys of running testcses in TestSuites.

Run selected testcses in sequence Run selected testcses in prllel

Run selected testcses in sequence: To run testcses in sequence click on below. icon nd click on Run in the testcse editor s shown in the imge

Run selected testcses in prllel:

To run testcses in prllel, click on RETE nd RUN TestSuites

icon nd click on

Run in the testcse editor s shown in the imge below.

Before we crete testsuites in SOPUI, let s see some of the key terms involved in structuring the tests in functionl testing. SopUI structures functionl tests into three levels.

TestSuite is collection of TestCses tht cn be used for grouping functionl tests into logicl units. ny number of TestSuites cn be creted inside sopUI project to support mssive testing scenrios.

TestCse is collection of TestSteps tht re ssembled to test some specific spect of your service(s). You cn dd ny number of TestCses to contining TestSuite nd even modulrize them to cll ech other for complex testing scenrios.

TestSteps re the building blocks of functionl tests in sopUI. They re dded to TestCse nd used control the flow of execution nd vlidte the functionlity of the service(s) to be tested.

Let s see how to crete nd run test suites for project in SOPUI using the steps given below.

TestSuites cn be dded/creted to project in 2 wys.

TestSuites cn be creted from project level. TestSuites cn be generted for binding in project.

Let s see both the wys one by one.

CRETE TestSuites from project level:

Note: This cn be done in 3 wys s shown in steps below.

Step 1: Method 1: Right click on project nme nd select New TestSuite or press Ctrl + T s shown in the imge below.

Method 2:

You cn lso crete testsuite by double clicking on Project nme nd choose testsuites tb s shown in the imge below.

Click on icon

(Crete new TestSuite in this project) to dd new test suite.

Step 2: In the New TestSuite window, enter testsuite of your choice nd Click OK s shown below.

Thus testsuite is creted successfully s shown below. Method 3: Step 1: TestSuites cn be dded in project when creting new project in SOPUI by checking the option Crete testsuite for the imported WSDL or WDL nd Click OK s shown in the imge below.

Step 2: Generte TestSuite window ppers s shown in the imge below.

Step 3: Enter nme for the testsuite generted nd click OK.

Thus testsuite is creted successfully s shown below with the testsuite window.

Testsuite Window:

GENERTE TESTSUITE USING BINDING:

Step 1: Right Click on the binding nme nd select Generte TestSuite option from the drop down menu s shown in the imge below.

Step 2: Generte TestSuite window ppers s shown in the imge below.

Step 3: Enter nme for the testsuite generted nd click OK.

Thus testsuite is creted successfully s shown below with the testsuite window.

Testsuite window:

RUN REQUEST IN TESTSUITE:

So fr, you hve seen how to crete test suites using the bove methods. Now, let s see how to run request in testsuite using the steps below.

Step 1: Double click on the TestSuite nme in the nvigtor pne to open the testsuite editor.

There re 3 different wys of running testcses in TestSuites.

Run selected testcses in sequence Run selected testcses in prllel

Run selected testcses in sequence: To run testcses in sequence click on below. icon nd click on Run in the testcse editor s shown in the imge

Run selected testcses in prllel:

To run testcses in prllel, click on nsfer property

icon nd click on

Run in the testcse editor s shown in the imge below.

Property Trnsfer TestSteps re used to trnsfer properties between TestSteps(Requests) nd their contining TestCse, TestSuite nd Project. They re extremely useful in number of situtions, especilly when properties contining XML re involved.

This tutoril involves,


Extrcting vlue from n XML messge Write vlue into n XML messge Trnsfer complex XML content between properties

Follow the steps below to trnsfer properties between TestSteps inside testsuite.

Step 1: To trnsfer property within the request, right click on teststep nd select Insert step Property Trnsfer from the dropdown menu.

Step 2: In the Insert Step window, enter userdefined nme for the property trnsfer teststep nd click OK.

Step 3: Click on

icon to dd new property trnsfer to the property trnsfer editor window.

Step 4: Enter property trnsfer nme nd click OK in the dd trnsfer to dd the property to the property trnsfer editor window s shown in the imge below.

The vrious tbs nd options vilble in the property trnsfer editor window re s follows.

The Source re t the top specifies the source property nd optionl XPth for the trnsfer The Trget re under tht specifies the trget property nd optionl XPth for the trnsfer The re below tht holds different configurtion options set on trnsfer to trnsfer level. The Trnsfer Log t the bottom shows the ltest executed trnsfers while the window ws open nd their ctul trnsferred vlues.

The vilble configurtion options cn drsticlly chnge wht is trnsferred nd their respective is defined s:

Fil trnsfer on error The trnsfer step will fil in cse ny errors hppen while ttempting to perform the trnsfer Trnsfer text content Only text content will be trnsferred. No structurl elements will be preserved Trnsfer to ll The mtched vlues will be trnsferred to ll the trget loctions in cse there re severl tht mtches Entitize trnsferred vlues The vlues will hve certin chrcters for exmple mpersnd (&) replced with its corresponding chrcter entity vlue (&) Set null on missing source The trget will be set to null in cse the source resource is missing. This mens tht if the trget lredy hs vlue it will be lost

Ignore empty/missing vlues This mens tht if the mtched vlue of the source is empty or missing it will be ignored nd the trget vlue left untouched Use XQuery SopUI will ssume tht the source is XQuery rther thn the defult XPth when trying to extrct the source vlues Trnsfer child nodes SopUI will not ttempt ny textul extrction from the mtched source node but rther pick the children of the mtched node nd thus preserving the subtree XML structure

Step 4: Now in the property trnsfer teststep editor window, choose the source property nd the trget property by providing the xpth s shown in the imge below.

Step 5: Now click on run icon to test whether the property is getting trnsferred successfully. The result cn be viewed in the trnsfer log s shown in the imge below. Note: Before running the property trnsfer editor, check if the source property (xpth) is not empty/null. Otherwise the property vlue while property trnsfer will be null (since Set null for missing source option is checked).

Running the testcse to check property trnsfer: Now, let s run the testcse to check whether the property is getting trnsferred successfully between the requests. Follow the steps discussed below to verify property trnsfer is successful. Step 1: Now click on the testcse nme to run the teststeps vilble in the testcse in the editor window s shown in the imge below.

Step 2: Click on run

icon to execute the property trnsfer in the testcse.

Thus properties cn be trnsferred between requests (from xml content) t testcse level. nsfer property

Property Trnsfer TestSteps re used to trnsfer properties between TestSteps(Requests) nd their contining TestCse, TestSuite nd Project. They re extremely useful in number of situtions, especilly when properties contining XML re involved.

This tutoril involves,


Extrcting vlue from n XML messge Write vlue into n XML messge Trnsfer complex XML content between properties

Follow the steps below to trnsfer properties between TestSteps inside testsuite. Step 1: To trnsfer property within the request, right click on teststep nd select Insert step Property Trnsfer from the dropdown menu.

Step 2: In the Insert Step window, enter userdefined nme for the property trnsfer teststep nd click OK.

Step 3: Click on

icon to dd new property trnsfer to the property trnsfer editor window.

Step 4: Enter property trnsfer nme nd click OK in the dd trnsfer to dd the property to the property trnsfer editor window s shown in the imge below.

The vrious tbs nd options vilble in the property trnsfer editor window re s follows.

The Source re t the top specifies the source property nd optionl XPth for the trnsfer The Trget re under tht specifies the trget property nd optionl XPth for the trnsfer The re below tht holds different configurtion options set on trnsfer to trnsfer level. The Trnsfer Log t the bottom shows the ltest executed trnsfers while the window ws open nd their ctul trnsferred vlues.

The vilble configurtion options cn drsticlly chnge wht is trnsferred nd their respective is defined s:

Fil trnsfer on error The trnsfer step will fil in cse ny errors hppen while ttempting to perform the trnsfer Trnsfer text content Only text content will be trnsferred. No structurl elements will be preserved Trnsfer to ll The mtched vlues will be trnsferred to ll the trget loctions in cse there re severl tht mtches Entitize trnsferred vlues The vlues will hve certin chrcters for exmple mpersnd (&) replced with its corresponding chrcter entity vlue (&) Set null on missing source The trget will be set to null in cse the source resource is missing. This mens tht if the trget lredy hs vlue it will be lost

Ignore empty/missing vlues This mens tht if the mtched vlue of the source is empty or missing it will be ignored nd the trget vlue left untouched Use XQuery SopUI will ssume tht the source is XQuery rther thn the defult XPth when trying to extrct the source vlues Trnsfer child nodes SopUI will not ttempt ny textul extrction from the mtched source node but rther pick the children of the mtched node nd thus preserving the subtree XML structure

Step 4: Now in the property trnsfer teststep editor window, choose the source property nd the trget property by providing the xpth s shown in the imge below.

Step 5: Now click on run icon to test whether the property is getting trnsferred successfully. The result cn be viewed in the trnsfer log s shown in the imge below. Note: Before running the property trnsfer editor, check if the source property (xpth) is not empty/null. Otherwise the property vlue while property trnsfer will be null (since Set null for missing source option is checked).

Running the testcse to check property trnsfer: Now, let s run the testcse to check whether the property is getting trnsferred successfully between the requests. Follow the steps discussed below to verify property trnsfer is successful. Step 1: Now click on the testcse nme to run the teststeps vilble in the testcse in the editor window s shown in the imge below.

Step 2: Click on run

icon to execute the property trnsfer in the testcse.

Thus properties cn be trnsferred between requests (from xml content) t testcse level. Working with properties

Properties re centrl spect of more dvnced testing with sopUI ( generl overview of property-mngement is vilble t ..). In regrd to Functionl Testing properties re used to prmeterize the execution nd functionlity of your tests.

Some scenrios where properties cn be used nd customized re s follows.

Properties cn be used to hold the endpoints of your services, mking it esy to chnge the ctul endpoints used during test.

Properties cn be used to hold uthentiction credentils, mking it esy to mnge these in centrl plce or externl file. Properties cn be used to trnsfer nd shre session ids during test execution, so multiple teststeps or testcses cn shre the sme sessions.

In this tutoril, let s see some of the bsics bout properties involved t ll levels like project, testsuite, testcse, test requests level in SOPUI. DEFINE PROPERTIES: Properties cn be defined t vrious levels in SOPUI s follows:

t the Project, TestSuite nd TestCse level in the corresponding Properties tb In Properties TestStep

Let s see how these properties re defined t vrious levels in the tutoril below. t the Project, TestSuite nd TestCse: Project level: Step 1: To view the properties defined t testsuite level, click on testsuite nme s shown in the imge below.

Step 2: s shown in the imge, properties cn be dded in the project level by clicking on the properties pne nd the overview tb shown in the bove imge.

icon vilble in the

Step 3: In the dd Property window, enter property nme nd click OK.

Step 4: Now enter vlue for this property dded nd thus property is successfully dded to the project s shown below.

TestSuite Level: Step 1: To view the properties defined t project level, click on Project nme s shown in the imge below.

Step 2: s shown in the imge, properties cn be dded in the testsuite level by clicking on the properties pne nd the overview tb shown in the bove imge.

icon vilble in the

Step 3: In the dd Property window, enter property nme nd click OK.

Step 4: Now enter vlue for this property dded nd thus property is successfully dded to the project s shown below.

TestCse: Follow the sme steps discussed for dding properties in testsuites nd project to dd properties t testcse level s shown in the imge below.

Note:

Properties dded t project level cn be used nywhere in tht project. Properties dded t testsuite level nd testcse level cn be used within their respective child components. o For eg: property creted in testsuite level cn be used within tht testsuite nd not in ny other testsuites in tht project.

In Properties TestStep The Properties step is used for defining custom properties to be used within TestCse. Its min dvntges over defining properties t the TestCse level or ny other levels re:

You cn orgnize properties into multiple Properties TestSteps (if you hve mny of them) You cn specify source nd trget filenmes which will be used to red nd write the contined properties when the TestStep is executed.

We cn define properties t TestStep level using the steps discussed below. Step 1: Right click on TestSteps inside testsuite nd dd step Properties s shown in the imge.

Step 2: In the dd Step window, specify the nme for the Properties step dded nd Click OK.

Step 3: Click on the

icon vilble in the properties editor window to dd new property.

Step 4: In the dd Property window, enter property nme nd click OK.

Now properties re dded successfully to the Properties TestStep s shown in the imge below.

Lern more bout importing nd exporting properties, property trnsfer, etc., in other tutorils. Generte reports for your projects

Now we hve executed ll our teststeps in the testcses. Next, is to hve totl summry bout the project execution. This is possible in SOPUI.

SOPUI provides three types of reports which cn be generted from inside the UI t Project, TestSuite, TestCse nd LodTest level:

Printble Reports Cn be printed or sved s PDF, HTML, RTF, Word, Excel, etc nd re fully customizble on both globl nd project level, llowing you to crete nd customize ny kind of report you my require.

Dt Export llows export of underlying report-dt in XML nd csv formt. This is useful if you wnt to import report dt into other tools for custom reporting or integrtions. HTML Reports Give simplified overview of functionl test results in HTML formt (not vilble t LodTest level).

Note: The Open Source version of sopUI (Bet version) only supports cretion of the bsic HTML reports when running from the Commnd Line. The bove 3 types of reports re supported in Pro version. Let s see how to crete or generte report for the project WSDL file in SOPUI using the steps discussed below. Before strting this tutoril, lern how to crete project using WSDL in the previous tutorils. Step 1: Click on the project binding nme s shown in the imge to view the WSDL content of the project.

Step 2: In the WSDL content tb shown below, click on the WSDL file in the project.

icon to generte the HTML documenttion (report) for

Step 3: Clicking on the icon will prompt to choose the loction to sve the document.

Step 4: Clicking on OK will generte the document in the defult browser vilble in your system s shown in the imge below.

Note: when generting HTML document for the WSDL, the wsdl file lso gets sved in the sme folder loction. The HTML document generted for the bove WSDL file is shown below.

wsdl-report

The other types of reporting will be supported only in SOPUI Pro. MockServices Getting Strted Before we ctully go into how to mock service, lets get to know some bsic concepts of mocking.

You would hve few questions in your mind such s,


Wht is mocking ll bout? When should I mock service? Wht re the dvntges in mocking service? Best prctices involved in mocking?

Lets find the nswers for the bove questions.

First of ll, wht is mocking service?

definition from book cn be given s Service Mocking, or simultion, is the prctice of creting fcsimile environment tht works similr to the environment you re fcsimileing .

In simple words, mocking is nothing but Isoltion, Simultion, or Virtuliztion, but those re term bsiclly creted to move the lowly prctice of mocking higher into the vlue chin. So, for ll purposes Isoltion, Simultion, nd Virtuliztion re the sme s mocking, just much more expensive.

Now we know wht is mocking.

Next, when should I use mock service? The nswer to the bove question is simple. You should use mocks when you cn t use the rel thing. Of course it s not tht esy when you look into it more crefully. The detiled nswer for this question is vilble in the next question.

Wht re the uses of mock services?

You cn crete tests in dvnce Tems cn work in prllel Crete proof of concepts or demos Write test for resource not ccessible Mock cn be delivered to the customer Sve yourself from the money pit Isolte systems Test the Live Environments before you hve the service in it

Not tht it hs the bove dvntges; there re lso few disdvntges tht you need to know when you re mocking service.

Double work Deployment constrints Mocks gets bugs It s not live Enter the Uncnny Vlley

The drwbcks bove side, Mocking is extremely powerful used correctly, nd cn sve lot of time nd money for you. Lets see some of the best prctices of the mock services.

Strt smll nd expnd. Only Deep Mock wht you need to Deep Mock. gree on wht the scope is nd how rel it should be Think of reuse Get buy in.

Go deep. Relly deep! Consider the cloud Skunk it! WR Deploy

Create Mock Services

Lets see how to mock service in SOPUI Bet (Open source version). Services cn lso be mocked in SOPUI Pro using the sme procedure. Before you crete mock service, lern to crete project in SOPUI using the previous tutorils. Follow the steps to mock service. Step 1: You cn crete mock service while creting new project in SOPUI using File New SOPUI project s shown below in the imge.

Step2: Check Crete MockService checkbox to crete mock service during the project cretion nd click OK. (Or) Step 1: You cn lso generte mockservice for n lredy creted project by right clicking on the project binding nme nd choosing Generte MockService s shown in the imge below.

Step 2: Clicking on tht will open the Generte MockService dilog box s shown in step 3. Step 3: In the Generte MockService window, choose the opertions in the WSDL to be mocked nd click OK.

Note:

The Pth nd Port for the mockservice will be specified utomticlly by SOPUI. If you wish to edit the port nd pth, you cn do it in this window. If you check on Strt MockService, it will strt the mockservice when you click OK.

Step 4: Clicking OK will prompt to specify the mockservice nme. Enter nme nd click OK s shown below.

Thus mock service is creted successfully s shown below.

Note: In mockservice you will find response insted of request which needs to hrd-coded. This response will be used in nother request. Run Mock Services

Now you hve creted mock service for your project using the previous tutoril. Let s see how to run the services in SOPUI.

But before tht s sid, you need to hrd-code your response to run your mockservices. Let s see how to hrd-code your mockservice response. Step 1: To hrd-code your mockservice opertion click on mock service nd this opens the editor s shown in the imge below.

Step 2: Click on the opertion nme in the mockservice editor nd gin the response nme in the opertion window to hrdcode the response.

Step 3: The response editor window is shown below. Hrd-code the tg vlues to run the mock service.

Note: You hve to know the output prior to hrd-code the response. Thus the output is hrd-coded s shown below.

Run your mock services: Follow the steps to run your mockservice. Step 1: Click on the Mockservice nme nd in the editor window click on SOPUI. (run icon) to run the mockservice in

Step 2: Now mockservice runs successfully on the port s shown below.

Now using the endpoint of the mockservice you cn run your request.

mponents of SOPUI project window

In this tutoril, you will see the vrious components of the SOPUI window when you crete project re explined in detil using screenshots.

1. Click on Project Nme. In the previous tutoril, we hve creted project, Test Project. You cn see window s shown below when you click on Overview Tb in the right pne.

Overview tb Displys the Generl informtion of ll the components vilble in project.

Testsuites tb- Describes the informtion bout the test suites creted by the user in project nd used to run the test suites nd shows the log for executed test suites.

2. Bindings - This will hve the WSDL definition detils, opertions/services vilble in WSDL file. Click on Binding nme to view the detils s shown in the imge below.

Overview tb Displys the Generl informtion such s wsdl definition nd opertions.

Service Endpoints Endpoints in wsdl describes where the service needs to hit when request is sent. The Service endpoints tb displys the endpoints used in project.

WSDL Content: This tb displys the rw form of wsdl nd its binding components involved. Clicking on WSDL tb displys the window s shown below.

Note: You cn lso see the rw form of WSDL by psting the WSDL URL in browser s shown below.

3. Request - Click on Request nme to disply the window s shown below.

how to run your project in SOPUI Pro???

So fr, we hve seen how to crete project in sopui pro. Now in this tutoril, let s see how to run request vilble in project. In order to run project, crete project s explined the previous tutorils. Follow the below steps to run project in SOPUI PRO. Step 1: Click on Request nme. This will disply the defult requests s shown in the imge below.

Step 2: In the request, fill the vlue for the tgs with ? if you hve.

Step 3: Check for the service endpoint before clicking in Run button.

Step 4: Click on Run button s shown in the below imge

fter clicking on RUN,

Step 5: Now you cn find the response for the bove requests in the Response window.

Thus the response for the sop request is obtined s shown in the bove imge. Thus sopui project is run successfully. Cmponents of SOPUI project window

In this tutoril, you will see the vrious components of the SOPUI window when you crete project re explined in detil using screenshots.

1. Click on Project Nme. In the previous tutoril, we hve creted project, Test Project. You cn see window s shown below when you click on Overview Tb in the right pne.

Overview tb Displys the Generl informtion of ll the components vilble in project.

Testsuites tb- Describes the informtion bout the test suites creted by the user in project nd used to run the test suites nd shows the log for executed test suites.

2. Bindings - This will hve the WSDL definition detils, opertions/services vilble in WSDL file. Click on Binding nme to view the detils s shown in the imge below.

Overview tb Displys the Generl informtion such s wsdl definition nd opertions.

Service Endpoints Endpoints in wsdl describes where the service needs to hit when request is sent. The Service endpoints tb displys the endpoints used in project.

WSDL Content: This tb displys the rw form of wsdl nd its binding components involved. Clicking on WSDL tb displys the window s shown below.

Note: You cn lso see the rw form of WSDL by psting the WSDL URL in browser s shown below.

3. Request - Click on Request nme to disply the window s shown below.

iport nd export your properties Now you must be fmilir bout creting properties t vrious levels such s Project level, testsuite level, testcse level, etc., Lets see how to import nd export these properties t vrious levels in this tutoril one by one. IMPORT PROPERTIES Project Level: Step 1: Click on Project nme. In the properties pne click on Custom properties or Click on Properties tb in the Overview tb of the project in the Editor window to view the defined properties s shown in the imge below.

Step 2: Click on

icon to import the properties from n externl file.

Step 3: In the Lod Property window, choose the property file from n externl file loction by clicking on Browse nd click OK.

Loding property file tht is not vilble in the project,

Step 4: Clicking on OK will updte the properties in the custom properties pne.

TestSuite: Step 1: Click on Testsuite nme. In the properties pne click on Custom properties or Click on Properties tb in the Editor window to view the defined properties s shown in the imge below.

Step 2: Click on

icon to import the properties from n externl file.

Step 3: In the Lod Property window, choose the property file from n externl file loction by clicking on Browse nd click OK.

Loding property file tht is not vilble in the project,

Step 4: Clicking on OK will updte the properties in the custom properties pne.

TestCse Level: Follow the sme steps discussed while importing properties in testsuites nd project to import properties t testcse level s shown in the imge below.

EXPORT PROPERTIES Project Level:

Step 1: Click on Project nme. In the properties pne click on Custom properties or Click on Properties tb in the Overview tb of the project in the Editor window to view the defined properties s shown in the imge below.

Step 2: Clicking on

icon prompts to sve the file in loction s shown in the imge below.

Step 3: Enter file nme for the exported properties nd click on Sve. Import nd export your properties Now you must be fmilir bout creting properties t vrious levels such s Project level, testsuite level, testcse level, etc., Lets see how to import nd export these properties t vrious levels in this tutoril one by one. IMPORT PROPERTIES Project Level:

Step 1: Click on Project nme. In the properties pne click on Custom properties or Click on Properties tb in the Overview tb of the project in the Editor window to view the defined properties s shown in the imge below.

Step 2: Click on

icon to import the properties from n externl file.

Step 3: In the Lod Property window, choose the property file from n externl file loction by clicking on Browse nd click OK.

Loding property file tht is not vilble in the project,

Step 4: Clicking on OK will updte the properties in the custom properties pne.

TestSuite: Step 1: Click on Testsuite nme. In the properties pne click on Custom properties or Click on Properties tb in the Editor window to view the defined properties s shown in the imge below.

Step 2: Click on

icon to import the properties from n externl file.

Step 3: In the Lod Property window, choose the property file from n externl file loction by clicking on Browse nd click OK.

Loding property file tht is not vilble in the project,

Step 4: Clicking on OK will updte the properties in the custom properties pne.

TestCse Level: Follow the sme steps discussed while importing properties in testsuites nd project to import properties t testcse level s shown in the imge below.

EXPORT PROPERTIES Project Level:

Step 1: Click on Project nme. In the properties pne click on Custom properties or Click on Properties tb in the Overview tb of the project in the Editor window to view the defined properties s shown in the imge below.

Step 2: Clicking on

icon prompts to sve the file in loction s shown in the imge below.

Step 3: Enter file nme for the exported properties nd click on Sve.

Thus properties re successfully exported.

TestSuites:

Follow the sme steps discussed while exporting from project to export properties from testsuite level s shown in the imge below.

TestCse: Follow the sme steps discussed while exporting from project, testsuite to export properties from testcse level s shown in the imge below.

Thus properties re successfully exported.

TestSuites:

Follow the sme steps discussed while exporting from project to export properties from testsuite level s shown in the imge below.

TestCse: Follow the sme steps discussed while exporting from project, testsuite to export properties from testcse level s shown in the imge below.

Wht is the difference between HTTP nd REST and SOAP in web services? SOAP SOAP uses WSDL for communiction btw consumer nd provider, wheres REST just uses XML or JSON to send nd receive dt WSDL defines contrct between client nd service nd is sttic by its nture. In cse of REST contrct is somewht complicted nd is defined by HTTP, URI, Medi Formts nd ppliction Specific Coordintion Protocol. Its highly dynmic unlike WSDL. SOP doesnt return humn redble result, whilst REST result is redble with is just plin XML or JSON This is not true. Plin XML or JSON re not RESTful t ll. None of them define ny controls(i.e. links nd link reltions, method informtion, encoding informtion etc) which is ginst REST s fr s messges must be self contined nd coordinte interction between gent/client nd service. With links + semntic link reltions clients should be ble to determine wht is next interction step nd follow these links nd continue communiction with service. It is not necessry tht messges be humn redble, its possible to use cryptic formt nd build perfectly vlid REST pplictions. It doesnt mtter whether messge is humn redble or not. Thus, plin XML(ppliction/xml) or JSON(ppliction/json) re not sufficient formts for building REST pplictions. Its lwys resonble to use subset of these generic medi types which hve strong semntic mening nd offer enough control informtion(links etc) to coordinte interctions between client nd server. REST: REST is over only HTTP. HTTP is most widely used nd when we tlk bout REST web services we just ssume HTTP. HTTP defines interfce with its methods(GET, POST, PUT, DELETE, PTCH etc) nd vrious heders

which cn be used uniformly for intercting with resources. This uniformity cn be chieved with other protocols s well. REST permits mny different dt formts where s SOP only permits XML. While this my seem like it dds complexity to REST becuse you need to hndle multiple formts, in my experience it hs ctully been quite beneficil. JSON usully is better fit for dt nd prses much fster. REST llows better support for browser clients due to it s support for JSON. REST doesnt dd ny specific functionlity to HTTP but is n rchitecturl style tht ws developed longside HTTP nd most commonly uses HTTP for its ppliction lyer protocol. HTTP:

HTTP is n ppliction protocol. REST is set of rules, tht when followed, enble you to build distributed ppliction tht hs specific set of desirble constrints. If you re looking for the most significnt constrints of REST tht distinguish RESTful ppliction from just ny HTTP ppliction, I would sy the self-description constrint nd the hypermedi constrint (k Hypermedi s the Engine of ppliction Stte (HTEOS)) re the most importnt. The self-description constrint requires RESTful request to be completely self descriptive in the users intent. This llows intermediries (proxies nd cches) to ct on the messge sfely. The HTEOS constrint is bout turning your ppliction into web of links where the clients current stte is bsed on its plce in tht web. It is tricky concept nd requires more time to explin thn I hve right now. Estblish JDBC connection in SOPUI PRO

To estblish JDBC connection ll you need is 3 simple things,


OJDBC 14 Jr File Dtbse Connection String Dtbse detils

Now I m gonn tell you how to estblish JDBC connection in PRO using Orcle XE (eXpress Edition). Before you strt this, you hve to downlod OJDBC 14 Jr file from orcle site nd plce it in the pth specified. SmrtBer\sopUI-Pro-4.5.1\bin\ext Now you cn proceed with the below steps to work with the connection. Step 1: Open ur SOPUI Pro by clicking on SOPUIPro.exe Step 2: Now choose project nd double click on it. Step 3: In the Project editor window we hve mny tbs. Choose JDBC connections tb. Step 4: Click on dd New Dt Connection icon. Step 5: Specify nme for your connection. Step 6: Now configure your dtbse connection by providing the following detils. Driver : Choose the driver bsed on the type of Dtbse (Eg: Orcle, MySql, MSccess, etc.,) User : Your Dtbse usernme Pssword : Your Dtbse pssword

Dtbse : Dtbse Nme Note: For some of the dtbses like Orcle, it will prompt for nother field clled SID (System Identifiction) The query to find the bove detils is s follows: select or_dtbse_nme from dul; select * from v$dtbse; select * from globl_nme;

Step 7: Now test your connection by clicking on the run button. The connection will be estblished successfully.

Running functionl tests from the commnd-line

Running functionl tests from the commnd-line is strightforwrd nd simple using the included testrunner.bt/.sh script, which tkes number of rguments to control which tests to run, output, etc:

e : The endpoint to use when invoking test-requests, overrides the endpoint set in the project file h : The host:port to use when invoking test-requests, overrides only the host prt of the endpoint set in the project file s : The TestSuite to run, used to nrrow down the tests to run c : The TestCse to run, used to nrrow down the tests to run u : The usernme to use in ny uthentictions, overrides ny usernme set for ny TestRequests p : The pssword to use in ny uthentictions, overrides ny pssword set for ny TestRequests w : Sets the WSS pssword type, either Text or Digest d : The domin to use in ny uthentictions, overrides ny domin set for ny TestRequests r : Turns on printing of smll summry report (see below) f : Specifies the root folder to which test results should be exported (see below) j : Turns on exporting of JUnit-comptible reports, see below : Turns on exporting of ll test results, not only errors : Opens the generted report in browser (SopUI Pro only) i : Enbles SopUI UI-relted components, required if you use the UISupport clss for prompting or displying informtion t : Sets the sopui-settings.xml file to use, required if you hve custom proxy, ssl, http, etc setting x : Sets project pssword for decryption if project is encrypted v : Sets pssword for sopui-settings.xml file D : Sets system property with nme=vlue G : Sets globl property with nme=vlue P : Sets project property with nme=vlue, e.g. -Pendpoint=Vlue1 -PsomeOtherProperty=vlue2 S : Sets to sve the project file fter tests hve been run I : Do not stop if error occurs, ignore them

R : Selects which report to generte for the test objects executed, for exmple if running the entire project, this could specify the nme of testsuite-level report tht would be generted for ech TestSuite. The report is sved s specified with the -F option to the folder specified with the -f option. (SopUI Pro only) F : Sets the formt of the report specified with the -R option, for Printble reports this is one of PDF, XLS, HTML, RTF, CSV, TXT, nd XML. For Dt Export this is either XML or CSV (SopUI Pro only) g : Sets the output to include Coverge HTML reports ( SopUI Pro only ) E : Sets which environment to use (SopUI Pro only)