This is a migrated thread and some comments may be shown as answers.

setting the base url when running tests from the command line

1 Answer 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Flynn
Top achievements
Rank 1
Michael Flynn asked on 02 Dec 2010, 08:25 PM
I created the tests in visual studio and set the base url there.  However, when I run the test from the command line, I get an error about the url.  Is there anyway to use the base url function when running the tests from the command line?

1 Answer, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 08 Dec 2010, 01:11 AM

Hello Michael Flynn,

If you are using the ArtOfTest.Runner.exe to run your tests, they should look for the baseURL within the project/solution settings. You can implement the baseURL, it only depends on what type of file you are running (aii or a test list).

If you are using ArtOfTest.Runner.exe to run the test file itself (the .aii file), then you will need to make sure that the settings within the line items are correct (individual element properties). The "Base URL" function within the test settings file for the project is only active if you are running the test as part of a TestList.

The easiest way to do this is to open a command prompt (as admin) and first navigate to the folder that contains your .aii and/or your test list (only test lists made through QA edition will accept the following command for ArtOfTest.Runner.exe):

"C:\Program Files\Telerik\WebUI Test Studio 2010.3\Bin\ArtOfTest.Runner.exe" aii=yourtestfile.aii


For a test list made in QA edition, it is 

"C:\Program Files\Telerik\WebUI Test Studio 2010.3\Bin\ArtOfTest.Runner.exe" list=yourtestlist.aiilist


Remember to navigate to the project folder that contains the test/test list you are trying to run. Alternatively, you can use MStest.exe (C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe) to run the test/test list. If you created everything for the test within visual studio, this is most likely the method you are using.

If you want to use MSTest, first create the test list to be used. Once you have, you can target the .vsmdi file using the following syntax (still navigate to the Solution folder within command prompt):

"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" /testmetadata:mytestproject.vsmdi


If the above does not help, please let us know where you set the baseURL setting within Visual Studio?

Best wishes,
Keaegan
the Telerik team

Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Michael Flynn
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Share this question
or