title: Data driven using Robot framework - How to create PASS/FAIL in reports for each testcase read from file
body: <p>I am new to Robot, and trying to implement a data-driven test case, where I read data from a file. The data looks like this:</p>
  
  <pre><code>TC1,user1,password1
  TC2,user2,password2
  TC3,user3,password3
  TC4,user4,password4
  </code></pre>
  
  <p>My test case and keywords are as below: </p>
  
  <pre><code>*** Test Cases ***
  Login TestCase
      ${data}=    Read Data From File    ${testFile}
      Process Test Data    ${data}
  
  *** Keywords ***
  Process Test Data
      [Arguments]    ${data}
      : FOR    ${row}    IN    @{data}
      \    ${status}=    Run Keyword And Return Status    Perform Login ${row}
  
  Perform Login
      [Arguments]    ${row}
      Login using    ${row[1]}   ${row[2]}
  </code></pre>
  
  <p>Now while running the 'Login Testcase', the report generated shows</p>
  
  <pre><code>'Total 1 Pass 1 Fail 0'. 
  </code></pre>
  
  <p>My question is how can I get the report the generate Pass/Fail for each row, ie </p>
  
  <pre><code>'Total N Pass X Fail Y' , where N=number of rows in data file and X+Y=N
  </code></pre>
  
  <p>I tried putting the For loop inside 'Login Testcase', but still getting the same result. Any ideas/help is highly appreciated!</p>
  
  <p>Update:
  So, I tried modifying the tests (without reading the data file) as below:</p>
  
  <pre><code>*** Settings ***
  Test Template     Perform Login
  
  *** Test Cases ***
  Login TestCase
      TC1    user1    password1
      TC2    user2    password2
      TC3    user3    password3
      TC4    user4    password4
  
  *** Keywords ***
  Perform Login
      [Arguments]    ${tc#}    ${username}    ${password}
      Login using    ${username}    ${password}
  </code></pre>
  
  <p>While doing so, Perform Login is run 4 times, but the report output still shows<br>
     'Total 1 Pass 1 Fail 0'.</p>
  
  <p>I am not sure if I am using the test template the correct way, and also how to read data from file and use that for each test case iteration.</p>
  
  <p>Update2:</p>
  
  <pre><code>*** Settings ***
  Test Template     Perform Login
  
  *** Test Cases ***
  TC1    user1    password1
  TC2    user2    password2
  TC3    user3    password3
  TC4    user4    password4
  
  *** Keywords ***
  Perform Login
      [Arguments]    ${username}    ${password}
      Login using    ${username}    ${password}
  </code></pre>
  
  <p>When I modify the testcases this way, I get</p>
  
  <pre><code>'Total 4 Pass 3 Fail 1', which is what I expect.
  </code></pre>
  
  <p>But in this case, I am not sure how to use the data read from file. Please help/share your ideas on how I could use data file to feed my testcases!!</p>