locked
Adding SQL query at datasource - data driven web tests

回答

  • hi Vicki,

    thanks for the reply. 

    the reason why i want to use the query is because the data in the database will be evolving - it's like the data will be updated and the next step relies on the updated data. i want the web test gets the updated data in time before every test iteration takes place. from my understanding, vs2010 will "use" the data as it was bind - it won't get updated data (if we using database). please correct me if my understanding is wrong.

    i've tried using reload plugin in the link that you gave in above post, but i hits error which i've asked in this thread: http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/be53d6c3-5abf-40c9-90c8-0ad9774301ab/#be53d6c3-5abf-40c9-90c8-0ad9774301ab


    2012年3月8日 2:53

すべての返信

  • Hello syueda,

    For your issue as far as I know that you are not allowed to use the SQL script directly in the web test to get the appropriate data.

    Instead you need to first get them, via ADO.NET or create a stored procedure just as the thread you offered above, and then to save them to one new file (maybe a .csv, .xml or a View.sql file). And then in the web test, you use these new saved files as the data sources.

    Update: apart from the above approach I mentioned above, you can also consider creating a web test plug-in which you can call the void WebTest.MoveDatatableCursor(string dataSourceName, string dataTableName, int newRowIndex) method to get the appropriate data for you. Please take a look at the third part of this blog for further information:

    http://blogs.msdn.com/b/slumley/archive/2010/01/04/vsts-2010-feature-data-source-enhancements.aspx

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us


    2012年3月7日 2:28
  • hi Vicki,

    thanks for the reply. 

    the reason why i want to use the query is because the data in the database will be evolving - it's like the data will be updated and the next step relies on the updated data. i want the web test gets the updated data in time before every test iteration takes place. from my understanding, vs2010 will "use" the data as it was bind - it won't get updated data (if we using database). please correct me if my understanding is wrong.

    i've tried using reload plugin in the link that you gave in above post, but i hits error which i've asked in this thread: http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/be53d6c3-5abf-40c9-90c8-0ad9774301ab/#be53d6c3-5abf-40c9-90c8-0ad9774301ab


    2012年3月8日 2:53
  • Hello syueda,

    I noticed that you have had your issue resolved in your another case: http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/be53d6c3-5abf-40c9-90c8-0ad9774301ab/#be53d6c3-5abf-40c9-90c8-0ad9774301ab

    And if you have any further questions, welcome back.

    Thanks,


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    2012年3月9日 8:30