title: Login test using Taurus
body: <p>Test login action using Taurus</p>
  
  <p></p>
  
  <pre><code>execution:
    -
      concurrency: 5
      ramp-up: 5
      hold-for: 1m
      scenario: Buyer-logs-in
  
  
  scenarios:
    Buyer-logs-in:
      variables:
        baseurl: http://localhost:3000
      default-address: ${baseurl}
      data-sources:
        - path: './login.csv'
          delimeter: ','
          variable-names: userName, password
      keepalive: true
      retrieve-resources: false
  
      requests:
        - url: 'http://localhost:3000/login'
          label: login
          method: POST
          body:
            user[email]: {userName}
            user[password]:  {password}
          assert:
            - contains:
                - 200
              subject: http-code
  
        - url: 'http://localhost:3000/action'
          label: page1
          method: GET
          assert:
            - contains:
                - 200
              subject: http-code 
  
  </code></pre>
  
  <p>This is my sample Taurus code to simulate login and measure peformance. </p>
  
  <ol>
  <li><p>In my app, only one user can login at a time and my csv file has 2 users. The test still works when I set a concurrency of 5 and Taurus says 5 users logged in. How is that possible. When the same user logs in again he will be kicked out of the first browser where he logged in. So with 2 user logins, how does Tuarus simulate 5 users?</p></li>
  <li><p>With that asked, does taurus really login using the credentials i give in the csv file? Or should I use selenium/Taurus to simulate it?</p></li>
  <li><p>What really confused me was when I deleted all users in csv file, the test still did not gave me 200 for the login and page1.</p></li>
  </ol>
  
  <p>TIA</p>