open script (oats)

16
OATS An Alternative to SOAPUI Anurag Deb HUB4TECHIE.COM

Upload: anurag-deb

Post on 28-Jan-2018

27 views

Category:

Software


1 download

TRANSCRIPT

OATS

An Alternative to SOAPUI

Anurag Deb HUB4TECHIE.COM

1 Introduction Here we have quick tutorial about how to use OATS as alternative to SOAP UI.

1.1 Start OpenScript Application

Open your directory where you installed open script l ike (D:\OpenScript\openScript\OpenScript.exe).

2 Functional testing through OATS Tool. 2.1 Creating Script

1. We will now create the web services

Go to File -> New -> General -> Web Services

2. Select the samples workspace -> name it and click Finish

“Treeapi” script is ready with 3 methods Initialize, Run, Finish

treeapi

3. Open WSDL Manager and click add wsdl file.

4. Select your wsdl file.

5. Click next and check the requests available in your wsdl file if you want. Then click Finish

6. Uploaded Wsdl file appears in the WSDL Manager window.

7. Follow below steps to Add the wsdl file to the script “treeapi” you created .

8. Click on the Run button to expand.

All the requests will be listed.

1. Click on wsdl file which you added.

2. Right click and Add to script.

3. It will be added under Run method

9. Click on any request to expand further, in this case clicking on “Create” request.

10. Change your endpoint.

Click here to open “Ws Post Navigation” Window. Edit the URL(Endpoint)

11. To view Details Click on View > Details.

12. Click on XML Post data to edit the request like provisioning the data.

13. To view it in readable format Right click on “Details” Tab and Click on “Format”.

14. Now if you want to execute just the first request then skip the remaining requests as below . Else other requests which might not have been corrected/provisioned will also get executed.

This whole Run method implements If loop.

Requests which are skipped comes under if(false) condition.

In this example we will be running only “getECNTree”

request.

15. To Execute we have two options.

16. After executing we can check the response as below

1. Playback

2. Iterate

Detailed Response

Also clicking here will open the result

3 Load Testing For load we need bulk inputs so we have options:

1) Csv file 2) Database

3.1 How to Add Databank for bulk execution

1. Click on endpoint and select “Get Database Record”.

2. Which record you want the tool to take.

Record means row of input in your excel(csv) sheet/database.

Save your excel in csv format.

3. Select CSV or Database Databank

4. In this example we have selected CSV databank. Now select your csv file.

5. After that Databank will be added to your request.

Now we will substitute values with real values from excel.

Select the value to replace like here I want to substitute treename value from excel.

In this example selecting treename value and right click and select “Substitute variable” option.

Databank added here.

Tree is the name of file 2 represents the no. of rows

present in csv file. Select value

of the tag

6. You can create new databank or use the existing(created in above steps).

7. Choosing a new databank. Click “Add new Databank” option as in Step 6.

Choose “CSV File” option.

Create new Databank

Existing one which we created in

above steps

8. Selecting csv file “tree.csv” and name an alias.

9. Clicking Next button will give you the rows present in the csv file.

Click Finish .

Mapping

with the excel

10. Going back to Step 5(substitute variable)

11. Substitute Variable Dialogue will appear.

12. Original value will be replaced by substituted value.

Select tag value (site2 in my case)

and right click and click “Substitute

Variable” option.

Select column

containing the

value

Original value Site2

changed to

For results