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

Integrate Testing Framework Tests with TeamCity

4 Answers 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 13 Dec 2016, 04:59 PM

Hi,

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.

 

David

 

 

 

 

 

 

 

 

4 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 13 Dec 2016, 05:03 PM
Sorry the versionon the local machine is 2016.2.630.0.
0
Peshito
Telerik team
answered on 16 Dec 2016, 03:08 PM
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.

Regards,
Peshito
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.
0
David
Top achievements
Rank 1
answered on 16 Jan 2017, 07:57 AM

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\buildAgent.properties.lock
[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,

 

David

0
Peshito
Telerik team
answered on 18 Jan 2017, 09:40 AM
Hi David,

I am glad you managed to run the tests manually on the server. In order for you to be able to run TeamCity tests with Test Studio your agent should be installed not as a service. More information about this specific rule can be found here.

Hope this helps.

Regards,
Peshito
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Peshito
Telerik team
Share this question
or