Lets say, I have a date picker that shows current month only. If user has to select past year/month, it shows left and right arrow to navigate as required. But, since we have to select Date of birth, it requires manual effort to click on arrow and navigate to past year.

I want to know, how can we achieve this goal in jmeter. Lets say, we have to select random date(dd/mm/yyyy) from range 1950 to 1990.

Note: Date picker field is readonly and date cannot be entered manually.

2 Answers

0
Rahul On

In almost all cases, Date Time picker is a client side activity and not a server side one, which means that it is being performed using javaScript and not via HTTP requests. Hence, picking up date from date time picker would not be recorded as an HTTP request.

Now, regarding your question of how to select the random date, you can use random number function for date (1-28), month(1-12) and Year(1950-1990) independently.

0
Arjun Dev On

Jmeter can only trigger the request that your system is sending to server. The steps you need to do:

  1. Open your URL in any browser.
  2. Inspect the page or tap f12 on keyboard.
  3. Go to network tab.
  4. Now click on the date picker you have in your web page and click on submit or whatever post button you have.
  5. check if there is any request being passed to server when navigating through tabs. If the system is passing any http requests, replicate the same request by adding a HTTP Request in jmeter and provide the request headers and parameters same as that of the request being passed.

If you need to give date data dynamically, use CSV DATA SET CONFIG to fetch the date from a csv file and send the requests with random date to the server

And if you need