+ All Categories

Grinder

Date post: 27-Nov-2014
Category:
Upload: subhjit
View: 143 times
Download: 1 times
Share this document with a friend
Popular Tags:
24
Grinder and soapUI Java based testing tools
Transcript
Page 1: Grinder

Grinder and soapUI

Java based testing tools

Page 2: Grinder
Page 3: Grinder

What is Grinder?• The Grinder, a Java Load Testing Framework• It easy to run a distributed test using many load injector

machines• It is a open source and easily available

Page 4: Grinder

•Originally developed by Paco Gómez and Peter Zadrozny•Philip Aston took ownership of the code, reworked it to create The Grinder 2•Shortly after began work on The Grinder 3

Page 5: Grinder

Key features•Generic Approach•Flexible Scripting Tests•Distributed Framework•Mature HTTP Support

lokesh
Load test anything that has a Java API. This includes commoncases such as HTTP web servers, SOAP and REST web services, and applicationservers (CORBA, RMI, JMS, EJBs), as well as custom protocols.
lokesh
Tests are written in the powerful Jython scripting language.
lokesh
A graphical console allows multiple load injectors to bemonitored and controlled, and provides centralised script editing and distribution.
lokesh
Automatic management of client connections and cookies.SSL. Proxy aware. Connection throttling. Sophisticated record and replay of theinteraction between a browser and a web site.
Page 6: Grinder

Capabilities

• Load Testing • Capacity Testing• Functional Testing • Stress Testing

lokesh
Load Testing determines if an application cansupport a specified load (for example, 500concurrent users) with specified response times.Load Testing is used to create benchmarks.
lokesh
lokesh5/15/2010Capacity Testing determines the maximum loadthat an application can sustain before systemfailure.
lokesh
Functional Testing proves the correct behaviourof an application.
lokesh
Stress Testing is load testing over an extendedperiod of time. Stress Testing determines if anapplication can meet specified goals for stabilityand reliability, under a specified load, for aspecified time period.
Page 7: Grinder

Getting started

• The Grinder processes • Tests and test scripts • Network communication • Output

lokesh
Each worker process sets up a network connection to the console to report statistics. Each agent process sets up a connection to the console to receive commands, which it passes on to its worker processes. The console listens for both types of connection on a particular address and port. By default, the console listens on port 6372 on all local network interfaces of the machine running the console.
Page 8: Grinder

The Grinder processes

Page 9: Grinder

The Grinder processes (cont…)– Worker processes

• Interpret Jython test scripts and perform tests using a number of worker threads

– Agent processes • Manage worker processes

– The console • Coordinate the other processes • Collate and display statistics • Script editing and distribution

Page 10: Grinder

Buzz Words Used• Test – is a unit of work against which statistics are

recorded. Tests are uniquely defined by a test number and also have a description

• Thread – Each worker process has a number of worker threads we can define thread as number simultaneous instances requesting the server.

• Run – A single execution of a test script is called a run.

Page 11: Grinder

How do I start The Grinder?• Create a grinder.properties file• Start the console• Start the agent process• Set the Script directory in Console• Distribute Script files across agent processes• Run the test• Analyze the results

lokesh
This file specifies general control information (how the worker processes should contact the console,how many worker processes to use, ..), as well as the name of the Jython script that will be used to run the tests.
Page 12: Grinder

Demonstration and code walk through

Page 13: Grinder
Page 14: Grinder

What is soapUI?• soapUI is a free and open source desktop

application.• Used for inspecting, invoking, developing,

simulating/mocking and functional/load/compliance testing of web services over HTTP.

Page 15: Grinder

•soapUI was initially released to Sourceforge during September 2005.•Since the initial release, soapUI has been downloaded more than 950,000 times •The soapUI project is currently headed by a Swedish company Eviware Software AB since 2006

Page 16: Grinder

Key features• inspecting Web Services• invoking Web Services• developing Web Services• Web Services Simulation and Mocking• Functional, Load and Compliance testing of Web Services• Uses Groovy as scripting language

Page 17: Grinder

Capabilities• Functional Testing• Load testing• Web service mocking

Page 18: Grinder

What is mocking?• Rapid Web Services Prototyping• Client testing/development• Test Driven Development

lokesh
generate a complete static mock implementation from a WSDL in seconds and add dynamic functionality using Groovy.
lokesh
create mock implementations of desired operations and set up a number of alternative responses (including scripts, attachments and custom http headers). Clients can be developed and tested without access to the "live" services. Responses can be cycled, randomized or selected with XPath expression from incoming request
lokesh
Create soapUI TestSuites and TestCases against MockServices before or during the actual services being implemented
Page 19: Grinder

Getting Started

• Download the latest soapUI tool from http://www.soapui.org• Install it according to the instructions on your system. • Create WSDL file describing the service• Create and Run the test case with different steps

Page 20: Grinder

Groovy• Agile and Dynamic model• Builds upon strengths of Java• Inspired by languages like Python, Ruby and Smalltalk• Almost zero-learning curve for Java developers• Increases developer productivity• Simplifies testing • Integrated with java • Generates Java bytecode

lokesh
for the JVM
lokesh
Builds upon strengths of Java but has Addition power features
lokesh
by reducing scaffolding code when developing web, GUI, database or console applications
lokesh
by supporting unit testing and mocking out-of-the-box
lokesh
seamlessly integrates with all existing Java objects and libraries
lokesh
compiles straight to Java bytecode so you can use it anywhere you can use Java
Page 21: Grinder

Groovy and soapUI• Groovy is an essential part of soapUI• Groovy is used in soapUI primarily as a control step• Groovy can access test steps through the testRunner instance.

def request = testRunner.testCase.getTestStepByName( “LoginProperties" );def property = request.getProperty( “UserName" );println property.value

lokesh
, getting results from other steps and passing them to other steps. It can even be used to create new test steps, restart old ones or decide which steps to start based on the results of the old ones.
Page 22: Grinder

Demonstration and code walk through

Page 23: Grinder

Q&A

Thanks for your attention!

Page 24: Grinder

References• http://grinder.sourceforge.net• http://www.soapui.org/ • http://www.soapui.org/features.html • http://www.soapui.org/comparison.html • http://groovy.codehaus.org/

Getting+Started+Guide


Recommended