Click here to Skip to main content
15,887,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting a Type initialization exception at the place where static class's method is getting used when I run the test case with other test cases. However, when I run the test case alone I am not getting the exception and the test case is passing. I am unable to find any solution. Please guide me on how to resolve this!

What I have tried:

Tried searching but couldnt find any solution
Posted
Updated 20-Jul-16 3:32am
Comments
F-ES Sitecore 20-Jul-16 9:30am    
The solution is to fix your code. You haven't supplied any code so no-one can help you. Use debugging to see what it is about your tests that stop them working together, it could be an initialisation issue, that the tests are updating shared resources....it could be anything.

1 solution

Looks like a threading / concurrency issue. Make sure that your code (especially in that static class) is thread-safe.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900