biju m
biju m

Reputation: 79

Intellitest 2015 is failing where as the Unit test is getting passed

I am using Visual Studio 2015 IntelliTest to do the data driven test execution which is very useful tool for data driven testing. Visual Studio 2015 Intelli test is getting failed when I am running the intellitest from a project created by intellitest. But the same is passing when running the test from a test explorer window. We have implemented repository pattern and using Entity Framework 6.0 to carry out the database operations. Please find the stack trace below for more information. Can anyone help me on this?

  System.NullReferenceException: Object reference not set to an instance of an object.     
  at System.Void MyFramework.Persistence.Entity.EF1Repository..ctor(System.String connectionStringName, System.String objContextName) 
 at System.Void MyFramework.Persistence.PersistenceManager..ctor(System.String schema, System.String module) 
at System.Collections.Generic.List`1<MyDTO> BusinessLogic.ListedPassenger.Passengers(MyDTO entity) 
at System.Collections.Generic.List`1<MyDTO> BusinessLogic.Tests.ListedPassengerTest.PassengersTest(BusinessLogic.ListedPassenger target, MyDTO entity)

Upvotes: 0

Views: 175

Answers (1)

pvlakshm
pvlakshm

Reputation: 1385

Please ensure that your test is isolated from the environment using appropriate mock implementations (using Fakes, etc.). Take a look here for a hands-on example: https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/14/intellitest-hands-on/.

Upvotes: 0

Related Questions