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

Breaking all tests

4 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rush
Top achievements
Rank 1
Rush asked on 18 Oct 2013, 06:23 PM
For 11/140 tests we are using JusMock. I just installed the latest version. When I enable the profiler and run all test though, they all break.  I have VS2010 ultimate and VS2013 ultimate. This is the error I am getting.

Test Name:  BackButtonTest
Test FullName:  BBA.POS.Test.NewTransactionViewModelTest.BackButtonTest
Test Source:    c:\TFS\POS\POSApp\v3-Phase2\Source\BBA.POS.Test\NewTransactionViewModelTest.cs : line 995
Test Outcome:   Failed
Test Duration:  0:00:00.7688022
 
Result Message:
Test method BBA.POS.Test.NewTransactionViewModelTest.BackButtonTest threw exception:
System.TypeInitializationException: The type initializer for '“•.’•' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: field
TestCleanup method BBA.POS.Test.NewTransactionViewModelTest.MyTestCleanup threw exception. System.TypeInitializationException: System.TypeInitializationException: The type initializer for '“•.’•' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: field.
Result StackTrace: 
at System.Dynamic.Utils.ContractUtils.RequiresNotNull(Object value, String paramName)
   at System.Linq.Expressions.Expression.Field(Expression expression, FieldInfo field)
   at “•.’•.[](String •, Func`1& , Action`1& ™)
   at “•.’•..cctor()
 --- End of inner exception stack trace ---
    at “•.’•.Š•(Action ‹•)
   at Telerik.JustMock.Mock.Reset()
   at BBA.POS.Test.NewTransactionViewModelTest.BackButtonTest() in c:\TFS\POS\POSApp\v3-Phase2\Source\BBA.POS.Test\NewTransactionViewModelTest.cs:line 241
 
TestCleanup Stack Trace
    at System.Dynamic.Utils.ContractUtils.RequiresNotNull(Object value, String paramName)
   at System.Linq.Expressions.Expression.Field(Expression expression, FieldInfo field)
   at “•.’•.[](String •, Func`1& , Action`1& ™)
   at “•.’•..cctor()
 --- End of inner exception stack trace ---
    at “•.’•.Š•(Action ‹•)
   at Telerik.JustMock.Mock.Reset()
   at BBA.POS.Test.NewTransactionViewModelTest.MyTestCleanup() in c:\TFS\POS\POSApp\v3-Phase2\Source\BBA.POS.Test\NewTransactionViewModelTest.cs:line 99

When i disable the profiler, all of the non-justmock tests pass but the 11 fail. When I check in my code the build server says all tests pass, so I know it's just something on my machine causing the problem. Does anyone know how to fix this?



4 Answers, 1 is accepted

Sort by
0
Adiel
Top achievements
Rank 2
answered on 21 Oct 2013, 10:12 AM
Hi 
I've encounter the same issue. 
Thanks
Adiel
0
Kaloyan
Telerik team
answered on 21 Oct 2013, 03:31 PM
Hi Rush,

When you say that on the build server everything is green, can you confirm that JustMock is updated to its latest version there?

Further, please check if all of the JustMock references are updated accordingly inside your test projects. If this does not happen to be the case, I will require a sample project so I can reproduce the issue on our side. You should be able to attach it with your next reply.

Thank you for the patience and the understanding in advance.

Regards,
Kaloyan
Telerik
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
0
Rush
Top achievements
Rank 1
answered on 21 Oct 2013, 03:51 PM
Version installed on the server is 2013.2.724.0

Locally I have version 2013.3.1015.0

The test project was referencing the older version. This seems like a problem. There couldn't have been that much that changed in between the two versions. Why isn't there a nuget package to keep projects and this extension up-to-date?

0
Kaloyan
Telerik team
answered on 21 Oct 2013, 04:19 PM
Hi Rush,

I am glad the issue is solved now.

There is a JustMock NuGet package. However, it contains only the free version of JustMock. The reason for not having NuGet package for the commercial version of JustMock is that you will still need to manually register the profiler upon acquiring or updating it. This is something that the JustMock installer does automatically. However, we have plans to improve our products distribution during the upcoming development quarter. So, please visit our Ideas and Feedback portal in order to add your suggestions and feature requests there. It will help us a lot in finding the best possible approach for this.

Let me know if there is more I can help you with.

Regards,
Kaloyan
Telerik
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
Tags
General Discussions
Asked by
Rush
Top achievements
Rank 1
Answers by
Adiel
Top achievements
Rank 2
Kaloyan
Telerik team
Rush
Top achievements
Rank 1
Share this question
or