locked
data driven test with csv not reopening RRS feed

  • Question

  • I have a data driven test using a csv file. I've made changes to the file and rerun the test. But the test is still using the old data.

    How can I get the test to re-open my csv file?

    Sunday, November 1, 2015 8:35 PM

Answers

  • Thank you for your answer. I had not realized its part of the build and I must re-build after changing the file. It helps if I update the file within Visual Studio rather than in note pad.

    Thanks again.

    • Marked as answer by DavidSherwood Monday, November 2, 2015 6:43 PM
    Monday, November 2, 2015 6:43 PM

All replies

  • Hi David,

    Thank you for posting in MSDN forum.

    I have encountered this problem a few times before. The root cause of the problem might be you haven’t changed the .CSV file in correct directory.

    To solve this problem. I suggest you can set the properties of the .CSV file. Right click the .CSV file and open the properties. Choose ‘Copy always’.

    Then you can change your .CSV file again. After you changed your .CSV file. I suggest you to check the directory of your test project and then you will find a .CSV file. Double click the ‘bin file and double click ‘Debug’ file.

    In this directory, you will see another .CSV file. Our data-driven operation will read the .CSV file in this directory. So confirm this .CSV file has been updated to new data. Then try to rerun your test and check if the test will use the new data.

    See below screenshot, you will find the .CSV file in two directory.

    Thanks,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 2, 2015 9:26 AM
  • Thank you for your answer. I had not realized its part of the build and I must re-build after changing the file. It helps if I update the file within Visual Studio rather than in note pad.

    Thanks again.

    • Marked as answer by DavidSherwood Monday, November 2, 2015 6:43 PM
    Monday, November 2, 2015 6:43 PM