| || |
Jmeter WebService Test Plan
I am new at using Jmeter. I need to create a Test Plan for webservice and have to add positive and negative test cases to the plan. Can anyone please help? I have no idea how to start and where to proceed..google doesn't really help.
when you launch the jmeter GUI, there will already be a Test Plan node by default. i would recommend watching some videos on youtube to get the basics. once you have a basic undertstanding, you should use HTTP Requests to test the web services. some HTTP requests should have good data, and also have a few with bad data for your negative testcases. if you are creating POST requests with data in XML or JSON format, you can just paste it in the Body tab of the HTTP request
Pass / Fail is more of a concept for functional testing. In Jmeter and other load testing tool, the main metric that gives are are a) requests/second, b) transactions/second. And generally, you'll have a resource monitoring tool to on the side measure CPU usage and memory usage, and in some cases database transactions per second.
Originally Posted by MansiDesai
In load testing you're looking more for ranges and comparisons.
Questions you're answering is...
* Can it handle more or less users than before?
* What is the slowdown point?
* What is the breaking point?
* How much more hardware will you need to improve X to reach production levels?
Web Services testing isn't very different from websites testing, given underlying transport is HTTP - all the main metrics will be the same.
Positive tests - just check that web service endpoints correctly do what they need to do.
Negative tests - checking that service endpoints correctly handle incorrect requests and nothing brakes. Few examples:
- Send not-supported request to an endpoint. I.e. if GET method is expected - send POST, PUT, DELETE
- If web service assumes authorization - check that unauthorized user isn't allowed to do anything
- Try sending malformed XML or JSON
On JMeter side - you can get a Web Service test plan in few clicks from File -> Templates -> Building a SOAP Webservice Test Plan -> Create