JMETER - WEBSERVICE TEST PLAN



Similar documents
JMETER - MONITOR TEST PLAN

WEB SERVICES. Sam Guinea

Module 13 Implementing Java EE Web Services with JAX-WS

Supplemental Material - Deployment.pdf

Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat

Hello World RESTful web service tutorial

Building and Using Web Services With JDeveloper 11g

Connecting Custom Services to the YAWL Engine. Beta 7 Release

Web Service Development Using CXF. - Praveen Kumar Jayaram

Apache JMeter HTTP(S) Test Script Recorder

Creating Web Services Applications with IntelliJ IDEA

Web Application Testing. Web Performance Testing

Oracle WebLogic Server

Performance Analysis of webmethods Integrations using Apache JMeter Information Guide for JMeter Adoption

Overview of Web Services API

Author: Gennaro Frazzingaro Universidad Rey Juan Carlos campus de Mostòles (Madrid) GIA Grupo de Inteligencia Artificial

JBoss SOAP Web Services User Guide. Version: M5

LDAPLogin Module Configuration. LDAPLogin Module Configuration for Tomcat 5.x on Linux & Windows

soapui Client Testing ecrv Web Services with soapui 1 9/20/2012 First edition soapui-x ecrv Development Team

SSO Plugin. Integration for BMC MyIT and SmartIT. J System Solutions. Version 4.0

How To Test A Load Test On A Java Testnet 2.5 (For A Testnet) On A Test Server On A Microsoft Web Server On An Ipad Or Ipad (For An Ipa) On Your Computer Or Ipa

In this chapter, we lay the foundation for all our further discussions. We start

RemoteTM LAN Server User Guide

TP JSP : déployer chaque TP sous forme d'archive war

Web Services using Tomcat and Eclipse

My IC Customizer: Descriptors of Skins and Webapps for third party User Guide

JAVA API FOR XML WEB SERVICES (JAX-WS)

U of S Course Tools. Working with the Syllabus Tool For Instructors

BusinessObjects Enterprise XI Release 2

How to add your Weebly website to a TotalCloud hosted Server

Customer Tips. Configuring Color Access on the WorkCentre 7328/7335/7345 using Windows Active Directory. for the user. Overview

Installing Java. Table of contents

LabTech Remote Tray. Overview. Accessing the Tray. LabTech

Creating XML Report Web Services

Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer

JAX-WS Developer's Guide

Terms and Definitions for CMS Administrators, Architects, and Developers

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

Implementing SQI via SOAP Web-Services

KC Data Integration Web Service Developer Guide

SETUP SSL IN SHAREPOINT 2013 (USING SELF-SIGNED CERTIFICATE)

CHAPTER 10: WEB SERVICES

Using Internet or Windows Explorer to Upload Your Site

Developing Web Services with Apache CXF and Axis2

Configuring Tomcat for a Web Application

A SharePoint Developer Introduction

Endpoint Security Console. Version 3.0 User Guide

RemoteTM Web Server User Guide. Copyright Maxprograms

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2

5- Web application deployment

Advertiser Campaign SDK Your How-to Guide

How to use the Eclipse IDE for Java Application Development

Using IIS and UltraDev Locally page 1

JMeter Testing. Identify Preformance acceptance criteria: Identfy throughput,response time and resource utilization goals and constraints.

Configuring Active Directory with AD FS and SAML for Brainloop Secure Dataroom Setup Guide

T320 E-business technologies: foundations and practice

Introduction to Testing Webservices

Java Software Development Kit (JDK 5.0 Update 14) Installation Step by Step Instructions

Event Based Interface

Installing Globodox Web Client on Windows 7 (64 bit)

MIS Export via the FEM transfer software

R i o L i n x s u p p o r r i o l i n x. c o m 1 / 3 0 /

SQL Desktop Application For WebService in C# dr inż. Tomasz Tatoń

Document Digital Signature

8.7. NET SatisFAXtion Gateway Installation Guide. For NET SatisFAXtion 8.7. Contents

Configuring the LCDS Load Test Tool

T320 E-business technologies: foundations and practice

Web Proxy Auto Discovery (WPAD) Configuration Guide. Revision Warning and Disclaimer

Bentley CONNECT Dynamic Rights Management Service

Basic Exchange Setup Guide

Configuring Color Access on the WorkCentre 7120 Using Microsoft Active Directory Customer Tip

Lab 1A. Create a simple Java application using JBuilder. Part 1: make the simplest Java application Hello World 1. Start Jbuilder. 2.

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Web Services API Developer Guide

NetBeans IDE Field Guide

Lab Introduction to Web Services

The Adyen Magento Manual

WA2087 Programming Java SOAP and REST Web Services - WebSphere 8.0 / RAD 8.0. Student Labs. Web Age Solutions Inc.

SSO Plugin. J System Solutions. Upgrading SSO Plugin 3x to 4x - BMC AR System & Mid Tier.

Summer Internship 2013

SHIPSTATION / MIVA MERCHANT SETUP GUIDE

PRODUCT WHITE PAPER LABEL ARCHIVE. Adding and Configuring Active Directory Users in LABEL ARCHIVE

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

Integrate Cisco IronPort Web Security Appliance (WSA)

Automatic updates for Websense data endpoints

ZeroTurnaround License Server User Manual 1.4.0

Consuming a Web Service(SOAP and RESTful) in Java. Cheat Sheet For Consuming Services in Java

Creating Java EE Applications and Servlets with IntelliJ IDEA

Service Oriented Architecture using JAVA

Using Group Policies to Install AutoCAD. CMMU 5405 Nate Bartley 9/22/2005

Java Access to Oracle CRM On Demand. By: Joerg Wallmueller Melbourne, Australia

AXIS 70U - Using Scan-to-File

Basic Exchange Setup Guide

One Bing Maps application ID was used to make requests to two different sets of URLs, one for staging and one for production.

HTTP Reverse Proxy Scenarios

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Transcription:

http://www.tutorialspoint.com JMETER - WEBSERVICE TEST PLAN Copyright tutorialspoint.com In this chapter, we will learn how to create a Test Plan to test a WebService. For our test purpose, we have created a simple webservice project and deployed it on the Tomcat server locally. Create Webservice Project To create a webservice project, we have used Eclipse IDE. First write the Service Endpoint Interface HelloWorld under the package com.tutorialspoint.ws. The contents of the HelloWorld.java are as follows package com.tutorialspoint.ws; import javax.jws.webmethod; import javax.jws.webservice; import javax.jws.soap.soapbinding; import javax.jws.soap.soapbinding.style; //Service Endpoint Interface @ WebService @ SOAPBinding(style = Style.RPC) public interface HelloWorld{ @ WebMethod String gethelloworldmessage(string string); This service has a method gethelloworldmessage which takes a String parameter. Next, create the implementation class HelloWorldImpl.java under the package com.tutorialspoint.ws. package com.tutorialspoint.ws; import javax.jws.webservice; @ WebService(endpointInterface="com.tutorialspoint.ws.HelloWorld") public class HelloWorldImpl implements HelloWorld { @Override public String gethelloworldmessage(string myname){ return("hello "+myname+" to JAX WS world"); Let us now publish this web service locally by creating the Endpoint publisher and expose the service on the server. The publish method takes two parameters Endpoint URL String. Implementor object, in this case the HelloWorld implementation class, which is exposed as a Web Service at the endpoint identified by the URL mentioned in the parameter above. The contents of HelloWorldPublisher.java are as follows package com.tutorialspoint.endpoint; import javax.xml.ws.endpoint; import com.tutorialspoint.ws.helloworldimpl;

public class HelloWorldPublisher { public static void main(string[] args){ Endpoint.publish("http://localhost:9000/ws/hello", new HelloWorldImpl()); Modify the web.xml contents as shown below <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> <web-app> <listener> <listener-class> com.sun.xml.ws.transport.http.servlet.wsservletcontextlistener </listener-class> </listener> <servlet> <servlet-name>hello</servlet-name> <servlet-class> com.sun.xml.ws.transport.http.servlet.wsservlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>hello</servlet-name> <url-pattern>/hello</url-pattern> </servlet-mapping> <session-config> <session-timeout>120</session-timeout> </session-config> </web-app> To deploy this application as a webservice, we would need another configuration file sunjaxws.xml. The contents of this file are as follows <?xml version="1.0" encoding="utf-8"?> <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0"> <endpoint name="helloworld" implementation="com.tutorialspoint.ws.helloworldimpl" url-pattern="/hello"/> </endpoints> Now that all the files are ready, the directory structure would look as shown in the following screenshot

Now create a WAR file of this application. Choose the project > right click > Export > WAR file. Save this as hello.war file under the webapps folder of Tomcat server. Now start the Tomcat server. Once the server is started, you should be able to access the webservice with the URL http://localhost:8080/hello/hello Create JMeter Test plan Now let us create a test plan to test the above webservice. Rename the Test Plan Open the JMeter window by clicking /home/manisha/apache-jmeter2.9/bin/jmeter.sh. Click the Test Plan node. Rename this Test Plan node as WebserviceTest. Add Thread Group Add one Thread Group, which is placeholder for all other elements like Samplers, Controllers, and Listeners. Right click on WebserviceTest ourtestplan > Add > Threads Users > Thread Group. Thread Group will get added under the Test Plan WebserviceTest node. Next, let us modify the default properties of the Thread Group to suit our testing. Following properties are changed Name webservice user Number of Threads Users 2

Ramp-Up Period leave the the default value of 0 seconds. Loop Count 2 Add Sampler - SOAP/XML-RPC Request Now that we have defined the users, it is time to define the tasks that they will be performing. We will add SOAP/XML-RPC Request element Right-click mouse button to get the Add menu. Select Add > Sampler > SOAP/XML-RPC Request. Select the SOAP/XML-RPC Request element in the tree Edit the following properties as in the image below The following details are entered in this element Name SOAP/XML-RPC Request URL http://localhost:8080/hello/hello?wsdl Soap/XML-RPC Data Enter the below contents <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://ws.tutorialspoint.com/"> <soapenv:header/> <soapenv:body> <web:gethelloworldmessage> <arg0>manisha</arg0> </web:gethelloworldmessage> </soapenv:body> </soapenv:envelope>

Add Listener The final element you need to add to your Test Plan is a Listener. This element is responsible for storing all of the results of your HTTP requests in a file and presenting a visual model of the data. Select the webservice user element. Add a View Results Tree listener by selecting Add > Listener > View Results Tree. Run the Test Plan Now save the above test plan as test_webservice.jmx. Execute this test plan using Run > Start option. View the Output The following output can be seen in the listener.

In the last image, you can see the response message "Hello Manisha to JAX WS world". Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js