2013年1月18日 星期五

Study Note : JMeter


Introduction

Concept
if you want to set the pressure exam for your web, you can build a test case by yourself(maybe java, python or other language). but some way can let you easy to build the professional testing exam easily. jmeter is the best choose.
Features
Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by seperate thread groups. also you can see
Can load and performance test many different server types:
  • Web - HTTP, HTTPS
  • SOAP
  • Database via JDBC
  • LDAP
  • JMS
  • Mail - POP3(S) and IMAP(S)
Project structure
Elements
ThreadGroup
Controller
Config
Sampler
Listener
Timers
Pre-Processor Elements
Post-Processor Elements
Assertions
Executing order
Configuration elements
Pre-Processors
Timers
Sampler
Post-Processors (unless SampleResult is null)
Assertions (unless SampleResult is null)
Listeners (unless SampleResult is null)
Sample
-TestPlan
--ThreadGroup
---Config 1
---Config 2
---If Controller
----Sampler 1
---While Controller
----Sampler 2
----Sampler 3
----Summary Report Listener 1 (only log Sampler2/3)
---Spline Listener 2 (log Sampler1/2/3)
---Diversion Listener 3 (log Sampler1/2/3)

Installation

  1. download it at here
  2. unzip it in anywhere you like
  3. running the jmeter by executing JMETER_FLOADER\bin\jmeter.bat (windows use), and then you can see the GUI as follow:
  4. open the jmeter project from JMETER_FLOADER\printable_docs\demos\official site\SimpleTestPlan.jmx
  5. start the project by Menu->Run->Start or press Ctrl+R
  6. see the result as follow:
  7. done

The Record Tool - Badboy

Badboy makes web testing and development easier with dozens of features
Installation
  1. download it in here or here
  2. install it by normal way(click ok always)
  3. launching it, you can see the screen as follow:
  4. start to record the test case, we use the google, type the website in the tool
  5. you can control the webpage, and you can see a lot of records
  6. running your record in the badboy. you can click project by right button, and choose "Play Whole Suite"
  7. export the badboy project into the jmeter project. click Menu->File->Export to Jmeter ...
  8. you can open it on the Jmeter GUI
  9. done

Future work

Setting the distribution testing

Reference

沒有留言:

張貼留言