0

I was wondering if this is even possible. I just set up Grinder and ran some base test but what if I want to have each thread be a different user? I see this line of code in the file that is generated (I am not a python developer)-could I somehow pass the username/password as a variable?

    # Expecting 302 'Found'
result = request10501.POST('/site/home' +
  '?p_p_id=' +
  self.token_p_p_id +
  '&p_p_lifecycle=' +
  self.token_p_p_lifecycle +
  '&p_p_state=' +
  self.token_p_p_state +
  '&p_p_mode=' +
  self.token_p_p_mode +
  '&p_p_col_id=' +
  self.token_p_p_col_id +
  '&p_p_col_count=' +
  self.token_p_p_col_count +
  '&_58_doActionAfterLogin=' +
  self.token__58_doActionAfterLogin +
  '&_58_struts_action=' +
  self.token__58_struts_action +
  '&saveLastPath=' +
  self.token_saveLastPath,
  ( NVPair('_58_formDate', '1466168922083'),
    NVPair('_58_login', 'user1'),
    NVPair('_58_password', 'pass1'), ),
  ( NVPair('Content-Type', 'application/x-www-form-urlencoded'), ))

Thanks

Jym
  • 21
  • 3

1 Answers1

0

So what I have done is maintain the users in a csv file and read them into an array . Now for eg there are 3 threads you can use a multiple of grinder.getRunNumber& grinder.getThreadNumber(check the exact api name) and extract that record dynamically . Move the user1 & pass1 to a global scope and perform all the logic there. See the API Link

user666
  • 1,104
  • 12
  • 20