Unable to execute test as step on execution server

3 posts, 0 answers
  1. sonal
    sonal avatar
    6 posts
    Member since:
    Jun 2011

    Posted 22 Sep 2011 Link to this post

    Hi,
    I am getting following Exception while execution test as step on execution server. Note : It works fine on local machine...

    '9/22/2011 4:42:04 PM' - 'Pass' : 4. Wait for '2000' msec.
    '9/22/2011 4:42:04 PM' - 'Fail' : 5. Execute test 'ADD_AP_PaymentTerm'

    >>> Test-as-Step 'AP\DATA\Add AP Payment Term\ADD_AP_PaymentTerm.tstest' log starts:

    ------------------------------------------------------------
    '9/22/2011 4:42:04 PM' - Detected custom code in test. Locating test assembly: Automation.dll.
    ------------------------------------------------------------
    '9/22/2011 4:42:04 PM' - Error attempting to execute a Test As Step. Details:
    '9/22/2011 4:42:04 PM' - System.BadImageFormatException: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. (Exception from HRESULT: 0x8013101B)
       at System.Reflection.Assembly.nLoadFile(String path, Evidence evidence)
       at System.Reflection.Assembly.LoadFile(String path)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(String assembly, String folder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTestInCurrentContext(Test test)

    <<< Test-as-Step 'AP\DATA\Add AP Payment Term\ADD_AP_PaymentTerm.tstest' log ends.

    ------------------------------------------------------------
    '9/22/2011 4:42:04 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    ------------------------------------------------------------
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 23 Sep 2011 Link to this post

    Hi Sonal,

    This means that the project is built against .NET 4.0, but the Execution Server is running by default on .NET 2.0 (and thus cannot load 4.0 assemblies). To overcome this you'll need to change the service and the Execution Server runtime version to .NET 4.0 on the problematic machine.

    For the Scheduling Service:
    1. Open the "(install folder) \Bin
    2. Create a config file named "Telerik.TestStudio.Scheduling.WindowsService.exe.Config" containing the code below. 
    3. Restart the Service.

    <?xmlversion="1.0"encoding="utf-8"?>

    <configuration>

      <startup>

        <supportedRuntimeversion="v4.0"sku=".NETFramework,Version=v4.0"/>

      </startup>

    </configuration>


    For the Execution Server:
    1. Open the "(install folder) \Bin
    2. Find the "Telerik.TestStudio.Scheduling.Client.exe.config"
    3. Open it with a text editor (Notepad)
    4. Edit it to match the code below.
    5. Restart the Execution Server.

    <?xmlversion="1.0"encoding="utf-8"?>

    <configuration>

      <startup>

        <supportedRuntimeversion="v4.0"sku=".NETFramework,Version=v4.0"/>

      </startup>  

      <appSettings>

        <addkey="ConfigServiceUrl"value="http://localhost:8008/TestStudio/ConfigurationService"/>

        <addkey="x"value="100"/>

        <addkey="y"value="100"/>

        <addkey="WaitForService"value="10000"/>

        <addkey="Tracing"value="True"/>

      </appSettings>    

    </configuration>



    All the best,
    Stoich
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. sonal
    sonal avatar
    6 posts
    Member since:
    Jun 2011

    Posted 26 Sep 2011 Link to this post

    Hi Stoich,

    Thanks for instant response, It works fine now.

    Thanks,
    sOnal
Back to Top