John, Roy

Hello,

I created a Web Test. I just want to run automatically this test in every 1 hour . How can I do that

If anyone know, Please help me.

Thanks,



Re: Visual Studio Team System - Web and Load Testing Web Test Execution in Time Interval

Bill Barnett - MSFT

You can run the Web test using the mstest command line. You could invoke the mstest command line once per hour by a number of different techniques including a .bat file or a .NET console application that uses the System.Process object to start the mstest command once per hour.





Re: Visual Studio Team System - Web and Load Testing Web Test Execution in Time Interval

John, Roy

Thanks for the feedback.

I created a *.bat file and a new scheduler. Every 1 hour gap scheduler will call the *.bat file and execute my test. Actually I connected my web test with a data source and it¡¯s supposed to run around 69 times. When I checked the test result, it seems that results show only the first run.

If I run manually (Not using the scheduler), getting full (69) test run results.

Why it¡¯s happening





Re: Visual Studio Team System - Web and Load Testing Web Test Execution in Time Interval

Bill Barnett - MSFT

I assume you mean that the Web test is supposed to run 69 times because your data source has 69 rows and in the Test Run Configuration you have chosen the option "One run per data source row". Is that correct

If so, when your .bat file invokes the mstest command line, does the mstest command include the /runconfig option to specify the Test Run Configuration file to use





Re: Visual Studio Team System - Web and Load Testing Web Test Execution in Time Interval

John, Roy

My data source has 69 rows and in the Test Run configuration option what I selected is "One run per data source row".

Can you please give me the command that I supposed to add in *.bat file

At present I used the following commands

cd "C:\VS Project\Visual Studio 2005\Projects\WebService\WebService"

"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\mstest.exe" /testcontainer:WebServiceExistance.webtest

[where path = "C:\VS Project\Visual Studio 2005\Projects\WebService\WebService¡± and File name = WebServiceExistance.webtest]





Re: Visual Studio Team System - Web and Load Testing Web Test Execution in Time Interval

Bill Barnett - MSFT

You should just need to add the following to the mstest command line after /testcontainer:WebServiceExistance.webtest :

/runconfig:<path to your .testrunconfig file>

To check the path to use, you can find your .testrunconfig file in your test solution (under Solution Items in the Solution explorer), go to Properties and look at the File path property to get the full path, but it is probably something like:

"C:\VS Project\Visual Studio 2005\Projects\WebService\LocalTestRun.testrunconfig".





Re: Visual Studio Team System - Web and Load Testing Web Test Execution in Time Interval

John, Roy

Thanks,Its working now.