ArtOfTest.Runner

The ArtOfTest.Runner.exe is installed in your Test Studio installation directory. The default location is:

  • C:\Program Files (x86)\Telerik\Test Studio\Bin

When working with the execution engine in the command prompt always make sure you have started it as Administrator and have the root directory in context as shown below so that you can call the runner directly.

cmd

Options

Here is the Help Screen for ArtOfTest.Runner.exe:

Options

Execution Options

Execution options modify command line test execution behavior. The help screen (displayed by inputting ArtOfTest.Runner.exe -help from the command line) provides a brief explanation of each option. Here are some further notes about specific options.

Several execution options use file paths as values. When using file paths in the command prompt:

  • Enclose the file path in double quotes.
  • To prevent typing mistakes, use the clipboard paste option within the command prompt window. To find the paste option after copying the path to the clipboard, right mouse click on the top left corner of the command prompt and choose Edit > Paste.

Edit>Paste

  • The test option takes the full path to an individual test file with the .tstest file extension. This file will be located in your main project directory and under any folder structure you have created to organize your tests. You can use the test option by itself. By default results will be stored in the Results folder under the project’s root directory.

Test Execution Syntax
ArtOfTest.Runner Test Execution syntax
Test Execution Result
ArtOfTest.Runner Test Execution result
  • The list option takes the full path to a test list file with the .aiilist file extension. This option will execute a test list which has multiple tests included. All test lists for your project can be found in the test list folder under your project root folder. You can use the test option by itself. By default results will be stored in the Results folder under the project’s root directory. For more information about test lists, see Test Lists.

Test List Execution Syntax
ArtOfTest.Runner Test List Execution syntax
Test List Execution Result
ArtOfTest.Runner Test List Execution result
  • The out option allows choice of an alternative folder to store the results to and takes a full path value to the respective folder.
  • The result option allows change of the default result file name and takes file name (including the file extension and in double quotes).
  • If any of the xml or html options are used the respective alternative result file will be stored to the default location if an output folder is not specified.
  • The PesistOnEachStep option could be set to true in case explicitly the results are required. This option will save the results after each executed step.
  • The settings option takes the full path to a settings file with the .xml file extension. The format of this file is similar to the app.config file, and overrides the settings contained in that file.

Here is an example of a complete app.config file that contains all of Telerik's configuration settings:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <configSections>
 <section type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings"/>
 <section type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings.Web"/>
 <section type="ArtOfTest.WebAii.Core.WpfSettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings.Wpf"/> 
 </configSections>
 <WebAii.Settings elementWaitTimeout="10000" xMultiMgr="false" unexpectedDialogAction="HandleAndFailTest" createLogFile="true" waitCheckInterval="500" logAnnotations="false" annotationMode="All" annotateExecution="true" executionDelay="0" queryEventLogErrorsOnExit="false" clientReadyTimeout="20000" executionTimeout="30000" logLocation="F:\Log\"></WebAii.Settings>
 <WebAii.Settings.Web verboseHttpProxy="false" enableSilverlight="true" useHttpProxy="false" enableUILessRequestViewing="false" aspNetDevServerPort="-1" webAppPhysicalPath="" localWebServer="None" silverlightApplicationPath="" silverlightConnectTimeout="30000" enableScriptLogging="false" defaultBrowser="InternetExplorer" killBrowserProcessOnClose="false" baseUrl="http://www.telerik.com"> </WebAii.Settings.Web>
<WebAii.Settings.Wpf defaultApplicationPath="E:\Users\Dad\Documents\visual studio 2010\Projects\TelerikWpfApp1\TelerikWpfApp1\bin\Debug\TelerikWpfApp1.exe" />
</configuration>

In addition that can be leveraged on the execution extension level (in the appSettings section):

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <configSections>
        <section type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings"/>
        <section type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings.Web"/>
    </configSections>
    <WebAii.Settings elementWaitTimeout="10000" xMultiMgr="false" unexpectedDialogAction="HandleAndFailTest" createLogFile="true" waitCheckInterval="500" logAnnotations="false" annotationMode="All" annotateExecution="true" executionDelay="0" queryEventLogErrorsOnExit="false" clientReadyTimeout="20000" executionTimeout="30000" logLocation="F:\Log\"></WebAii.Settings>
    <appSettings>
        <add key="publishResult" value="True"/>
    </appSettings>
</configuration>

Here is how you can access it in the extesion:

namespace PublishResultExecutionExtension
{
    public class PublishResultExtension : IExecutionExtension
    {
        private bool _publishResult = false;

        public void OnAfterTestListCompleted(RunResult result)
        {
            if (_publishResult)
            {
                //Debugger.Launch();
                //Implement your custom code here
            }
        }
...

Publish Results To TFS

Note: All options listed in the help screen in relation to results publishing to TFS are mandatory. Below are some additional notes to each of the options.

  • The server option takes the TFS server name with its full path in double quotes like this "http://myTFS.myDomain.com:8080/tfs".
  • The build option takes the respective build which the results could be associated to.
  • The project option takes the name of the current team project which the build belongs to.
  • The platform option takes the respective platform which is usually Windows and thus the option takes value "win".
  • The flavor defines if the build is Debug or Release (defaults to "Debug").

Below is a sample command to publish results to TFS from a test list execution.

Publish Results to TFS

Exit Codes

ArtOfTest.Runner returns an exit code so the Build Server can check for it on process exit in case of an exception:

Code Title Summary
0 RUN_TESTS_SUCCESS Run is processed and all tests passed.
1 RUN_TESTS_ERROR Run is processed and some tests failed.
2 NOT_RUN_UNEXPECTED_ERROR Run is not processed due to unexpected error.
3 NOT_RUN_COMPILATION_ERROR Run is not processed due to compilation errors.
10 NOT_RUN_USAGE_INFO No run to process, requested usage info.
11 NOT_RUN_INVALID_COMMAND_ARGS No run to process due to general invalid arguments error.
12 NOT_RUN_TEST_NOT_FOUND Run is not processed due to invalid test path argument.
13 NOT_RUN_TESTLIST_NOT_FOUND Run is not processed due to invalid test list path argument.