Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NUnit fail to build test - No Tests discovered

Tags:

c#

selenium

nunit

I am working on selenium web driver project. I was able to built tests in Test Explorer and execute.

At once I am getting following errors when rebuilding the solution.

Unit Adapter 3.2.0.0: Test discovery starting
NUnit VS Adapter 2.0.0.0 discovering tests is started
NUnit Adapter 3.2.0.0: Test discovery starting
NUnit VS Adapter 2.0.0.0 discovering tests is started
Attempt to load assembly with unsupported test framework in  C:\..\CustomerTest.exe
NUnit VS Adapter 2.0.0.0 discovering test is finished
Attempt to load assembly with unsupported test framework in  C:\..\LoginTest.exe
NUnit VS Adapter 2.0.0.0 discovering test is finished
Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in C:\..\CustomerTest.exe
Cannot run tests in process - a 32 bit process is required.
NUnit Adapter 3.2.0.0: Test discovery complete
Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in C:\..\LoginTest.exe
Cannot run tests in process - a 32 bit process is required.
NUnit Adapter 3.2.0.0: Test discovery complete
========== Discover test finished: 0 found (0:00:02.5558095) ==========

I have changed the default processor architecture in to X64, but issue not resolved.

Please help me to resolve this issue.

Thank you.

like image 568
ChinS Avatar asked Dec 18 '22 16:12

ChinS


1 Answers

I had this problem just today for some odd reason, because I didnt change anything in the meantime and it worked before.

Fixed it by: Project-> [YourProjectName].properties -> Build -> Platform target: "Any CPU" -> Untick "Prefer 32-Bit"

like image 57
Tentano Avatar answered Jan 02 '23 10:01

Tentano