Home page

Showing posts with label Jmeter. Show all posts
Showing posts with label Jmeter. Show all posts

Saturday, October 5, 2019

Highly used Jmeter assetion

Assertions in Jmeter
  1. Response Assertion
  2. XML Assertion
  3. Duration Assertion
  4. Size Assertion
  5. HTML Assertion
If you are using any other Jmeter assertion then write that in the comment and if you have any query in understanding Jmeter assertion then also write your query in the comment.

Wednesday, December 12, 2018

Jmeter: How to generate new number like Data1, Data2, Data3... in Jmeter?

1. Add Config Element > User Defined variable under Test Plan
2. Add 2 variables like i) Name = counter & Value = 0 ii) Name = test
3. Add loop counter under Thread
4. Add BeanShell preprocessor
5. Add following code in BeanShell preprocessor


String s = "Data";
//Read value of user-defined variable "counter" > convert to int > increment by 1.
int counter = Integer.parseInt(vars.get("counter")) + 1; 

//convert counter to string and change value of user-defined variable.
vars.put("counter",Integer.toString(counter));

//Change value of user-defined variable "test"
vars.put("test",s.concat(Integer.toString(counter)));

Note: Use user-defined variable "test" in HTTP request sampler as ${test}