tags:

views:

8

answers:

1

We have RESTfull web-application. And we need to make the following test:

create 1000 students view 1000 students delete 1000 sudents create 1000 students view 1000 students

We can view object through the following URL: /students/#id# And for do this we should to known IDs of created objects. We create students via CSV-files and expect that they are begining from 1, but if the batabase isn't clear in begans from bigger number.

How can we read IDs of created students.

A: 

I believe this is what you're trying to do:

  • Create students from data in a CSV file
  • View those newly created users
  • Delete those users
  • Start Over

To get the Student IDs, you need to do a POST-PROCESSOR called Regular Expression Extractor. It reads the source code and can store specific information into a variable name.

You then pass the variable into the View and Delete Calls.

Link: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor

Your Jmeter Script would look something like this:

  • CSV File Configuration
  • Request to Create new Students --- Regular Expression to grab Student IDS
  • Request to view Students
  • Request to Delete Students
BlackGaff