Integrate Testing Framework Tests with TeamCity

4 posts, 0 answers
  1. David
    David avatar
    21 posts
    Member since:
    Sep 2016

    Posted 13 Dec 2016 Link to this post


    We are trying to integrate our tests that we have in our Local machines with our TeamCity server. Whenever we run the tests we get a null reference error "System.NullReferenceException: Object reference not set to an instance of an object". This happens for all the lines of tests in the tests. The tests run from local (and on others local machines), so I am not sure why they do not run from TeamCity Server. I am accessing the server as a normal admin user and executing the tests using MSTest.


    Things to note:

    • Telerik testingframework is installed on the server
    • When we first tried to do the MSTest server complained about the fact that the .dlls that we were using (ArtOfTest.WebAii.dll, Telerik.TestingFramework.Hosts.Common.dll, Telerik.TestingFramework.Interop.dll etc) where not recognosed so we copied the local versions over to the server (as dependencies of a compiled project). When we tried to use the .dll that are on the server (either from Teleriks Bin folder or from the GAC/MSIL folder) they either failed or there was an errorstating that the  manifest definition does not match the assembly reference.
    • The versions of telerik testing framework are different on the local machine to the server (local machine: v4.0.30319, server:  3.928.5)
    • There are no issues with the user or the VM locking


    Any help on this would be great. I think the problem is probably located in the way telerik is using the .dlls/libraries in the server machine, but I am nt sure how to fix this. We have looked at the instructions for setting the Framework up on a CI, but they do not seem to go into this level of detail.


    Many thanks in advance for your help on this.











  2. David
    David avatar
    21 posts
    Member since:
    Sep 2016

    Posted 13 Dec 2016 in reply to David Link to this post

    Sorry the versionon the local machine is 2016.2.630.0.
  3. Peshito
    Peshito avatar
    500 posts

    Posted 16 Dec 2016 Link to this post

    Hi David,

    Do you have a log file from the build with the steps performed and the error so I could take a look at it? We have an article on TeamCity Test execution here that might help you in setting up the test execution.

    This issue might be related with different assembly versions. You said that the versions are different on your local machine and on the server. Did you try updating the one on the server? Do you reference your assemblies from the GAC? If not, try referencing them from the GAC and use the same version as the one on your local machine. The test project might be looking for a specific version of the dll. Also if you somehow have external assembly that has been built with a version of the test framework that is different then the one on the server, this will also lead to an issue in finding the proper assembly.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. David
    David avatar
    21 posts
    Member since:
    Sep 2016

    Posted 11 hours ago Link to this post

    Hi Peshito,

    Many thanks for your reply. I can now run the tests manually on the server.

    When I try and run these tests from TC they hang on "Starting execution..." in MSTest. I installed the most up to date Testing Framework onthe server machine, and I used the command line option (of TC) to start the agent before running the tests.

    Is there anything that I am missing? This is the output of the TC build log:

    [08:40:46]Step 3/3: e2e tests (Command Line) (10m:32s)
    [08:40:46][Step 3/3] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script6976348642683642979.cmd
    [08:40:46][Step 3/3] in directory: C:\TeamCity\buildAgent\work\9f95003f0ce79403
    [08:40:46][Step 3/3] Looking for installed Java...
    [08:40:46][Step 3/3] Java executable is found: 'C:\TeamCity\jre\bin\java.exe'.
    [08:40:46][Step 3/3] Starting TeamCity Build Agent Launcher...
    [08:40:46][Step 3/3] Agent home directory is C:\TeamCity\buildAgent
    [08:40:47][Step 3/3] Current Java runtime version is 1.8
    [08:40:47][Step 3/3] Lock file: C:\TeamCity\buildAgent\logs\
    [08:40:47][Step 3/3] Using no lock
    [08:40:47][Step 3/3] Done Adding Additional Store
    [08:40:48][Step 3/3] Microsoft (R) Test Execution Command Line Tool Version 14.0.23107.0
    [08:40:48][Step 3/3] Copyright (c) Microsoft Corporation. All rights reserved.
    [08:40:48][Step 3/3]    
    [08:40:48][Step 3/3] Loading C:\TeamCity\buildAgent\work\9f95003f0ce79403\PokeMoon.e2e.tests\bin\Release\All_e2e.orderedtest...
    [08:40:48][Step 3/3] Starting execution...


    Best regards,



Back to Top