title: Run same cucumber scenario multiple times
body: <p>I am trying to run same scenario for like 1000 times. What i want to test is whether application is stable if I login and logout for n number of times. I have come up with a way but that doesn't look neat and clean. I want to generate a report as well for the 1000 executions in same HTML.</p>
  
  <p>This is what I've done</p>
  
  <p>Cucumber Step:</p>
  
  <pre><code>    When I login "1000" number of times  
  </code></pre>
  
  <p>And in my step definition is :</p>
  
  <pre><code>    successful_attempts = 0
      unsuccessful_attempts = 0
      attempt_login = attempt_login.to_i
  
      attempt_login.times do 
  
        visit_page(Login)
  
        on_page Login do |page|
          page.login_with username, password
          page.logout? ? (page.logout;successful_attempts+= 1) : unsuccessful_attempts+= 1
        end
  
      end
  
      puts "Total Attempts :  #{attempt_login}"
      puts "Successful Attempts : #{successful_attempts}"
      puts "Unsuccessful Attempts : #{unsuccessful_attempts}"
  
      fail if unsuccessful_attempts &gt; 0
  </code></pre>