Snake's Home

Jmetertestmobileapi

The Apache JMeter™ application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance.

What does it do?

Apache JMeter features include:
Ability to load and performance test many different server/protocol types:

Web - HTTP, HTTPS
SOAP / REST
FTP
Database via JDBC
LDAP
Message-oriented middleware (MOM) via JMS
Mail - SMTP(S), POP3(S) and IMAP(S)
Native commands or shell scripts
TCP
Complete portability and 100% Java purity.

How to build a test plan?

Add “Test Plan” –>”Threads”–>”Thread Group”.

Add “Thread”–>”Sampler”–>”HTTP Request”.
Then configure the request.
image

Add “User Defined Variables” and define global variables.

Add “HTTP Header Manager” to define Json type:
Content-Type : application/json; charset=utf-8

How to get Token and sessionId:

Add “Post Processors”–>”Regular Expression Extractor”
configure like this:
image

How to add stress

configure like this:
stress = threads * loop count
image

Check Result: Under listener
image
image
image

Run as command:
jmeter -n -t test.jmx -l test.jtl

So can run in Jenkins.
Run Jmeter on Jenkins