Thursday, March 30, 2017

Why I cant see my Nunit test methods at Test Explorer

Recently i create a Unit test project with VS 2015.
Then i remove the MSTest references and add Nunit references in order to change the test framework to Nunit.
After adding the correct 
[TestFixture] notation and  [Test] notation i Build the project.
But my test method is not available at the Test Explorer window.


And this is how it looks like my references.


So the Solution was adding NUnitTestAdapter tooo as on the below image.




Wednesday, March 29, 2017

Some one faced this when execute the Test.Dll in some other Server/PC-Error 0x80131515

At the actual environment we always have to build all our test methods or the classes to a one single DLL file and have to execute on a different server.
Below is an error i got when executing the DLL using MSTEST command line tool.


So the error message says 

"Could not load file or assembly 'file://XXXXXXXXXXXXXXx.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).

The solution will be unblocking the DLL which you are trying to execute using MSTEST.
Simply right click on the DLL and select property .
The locate the bottom of the property window and locate the "Unblock" text.
Click on it to unblock the DLL.

Your are done.