title: Apache JMeter : Add random data in body for request
body: <p>I'm working on stress testing our application in Apache JMeter.</p>
  
  <p>I thought of calling register user method which will add users in the database. But if the email already exists, then the database action does not take place.</p>
  
  <p>How can I add a random number in body data? Or is there some other way I can stress test my application connected with database? </p>
  
  <p>Here are some screenshots :
  <a href="https://i.stack.imgur.com/lYr2r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lYr2r.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/O1JhP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/O1JhP.png" alt="enter image description here"></a></p>
  
  <p>Controller code :</p>
  
  <pre><code>@RequestMapping(value = "/person/add", method = RequestMethod.POST)
  public String addPerson(@ModelAttribute("person") Person person, BindingResult bindingResult) {
      System.out.println("Person add called"+person.getUsername());
      person.setUsername(this.stripHTML(person.getUsername()));
      int personId = this.personService.addPerson(person);
      if (!(personId == 0)) {
          Person person1 = this.personService.getPersonById(personId);
          Collection&lt;GrantedAuthority&gt; authorities = new ArrayList&lt;&gt;();
          authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
          Authentication authentication = new UsernamePasswordAuthenticationToken(person1, null, authorities);
          SecurityContextHolder.getContext().setAuthentication(authentication);
          return "redirect:/canvaslisting";
      } else {
          return "redirect:/";
      }
  }
  </code></pre>