How to create scripts in coded UI RRS feed

  • Question

  • Hi,

    Last year, I implemented Data Driven test for one product (similar to Eclipse) through AutoIt.  I created one driver script. It will load all the scripts, take script’s input from excel sheet, create a exe file and run all scripts one by one and stored result in specific location. I have 200 scripts which are created in basic (supported by AutoIt). I am facing issue in maintain all the scripts. So, Now, I want to use Coded UI tool.

                 Can anyone suggest me, how can I achieve same scenario through coded UI?  will I create separate project for every scripts(test cases)? Confused…..


    Tuesday, August 5, 2014 2:47 PM


  • Hi vikash,

    (1)If you want to load the script before you run the coded UI test, you could load the script in testsettings file from Coded UI Test project solution.

    In testsettings file, I find that it only could load a script file. So I think that you may need to create separate project for every scripts (test cases).

    (a)You need to add a testsettings file in solution. Right click the solution->Add->New Item->Test Settings->Add

    (b)Double click the testsettings file, and then choose the Setup and Cleanup Scripts page in the Test Settings dialog box.



          (c)You could run the test project after you selected the testsettings file from Test menu bar.

    In addition, if you want to know more detail information about setup script in testsettings file.



    (2)If you want to load the script when the coded UI test is running, you could deployment your script (such as some data scripts) before your every test method. The way don’t need to create separate project for every scripts (test cases), you just need to deployment your every script before your every corresponding test method.

    About how to deploy the script for tests, you could refer to the following link: http://msdn.microsoft.com/en-us/library/ms182475.aspx

    Best Regards,

    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.

    • Edited by Tina-Shi Wednesday, August 6, 2014 7:24 AM
    • Marked as answer by Tina-Shi Monday, August 11, 2014 5:31 AM
    Wednesday, August 6, 2014 7:23 AM