System.MissingMethodException Method not found: 'NUnit.Framework.Interfaces No tests found - nunit

I have just installed NUnit v3.5.0 and when I try to run existing tests I get the error below:
System.MissingMethodException
Method not found: 'NUnit.Framework.Interfaces.ITest NUnit.Framework.Api.NUnitTestAssemblyRunner.Load(System.Reflection.Assembly, System.Collections.IDictionary)'.
No tests found.
any ideas more than welcome!! :)

just found the problem, I was missing an extension, you need to install "NUnit 3 Test Adapter", by going to tools>>Extensions and Updates >> Online >> Search for : "NUnit 3 Test Adapter"

Related

Update from Qt 5.5.1 to Qt 5.6 leads to linking errors

I just try to update a project from Qt5.5.1 to Qt5.6 and now it fails during linking.
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Core.a
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Sql.a
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Gui.a
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Widgets.a
collect2.exe: error: ld returned 1 exit status
The programm compiled fine with QT5.5.1 using qbs.
Now I added the new QT Version and I get these errors.
I have no idea, why qbs adding two time the "lib" prefix, nor why qbs is trying to use it at all. This program should use the shared libraries of Qt.
Could someone give me a hint, how I can fix this? Or what the cause of the problem might be?
This issue was resolved in qbs 1.5.0.

PHPUnit not working on netbeans "--ansi" is not registered

When generating the Test with Netbeans I got the following ouput message error:
"C:\wamp\bin\php\php5.4.3\php.exe" "C:\wamp\bin\php\php5.4.3\phpunit-skelgen" "--ansi" "generate-test" "newPHPClass" "C:\Users\Alfonso\Documents\NetBeansProjects\PHPUnit_Test\newPHPClass.php" "newPHPClassTest" "C:\Users\Alfonso\Documents\NetBeansProjects\PHPUnit_Test\Tests\newPHPClassTest.php"
The referenced parameter '--ansi' is not registered.
Done.
However when I run,in the commandline, the following command:
phpunit-skelgen --test newPHPClass
it works.
It seems netbeans does not run the proper command. How to correct this problem?
Thanks

Teamcity not DLL's for some NUnit Test projects

I get this error when running my Moq tests through Teamcity 5
Test(s) failed.
System.IO.FileNotFoundException :
Could not load file or assembly 'Moq,
Version=3.1.416.3, Culture=neutral,
PublicKeyToken=69f491c39445e920' or
one of its dependencies. The system
cannot find the file specified. at
MyCode.Tests.SomeHandlerTests.Setup()
The tests run fine on my local; they just fail on the build server.
I made sure the assemblies are in the Bin (looking at them now over RDP just be double sure).
So the issue was to do with the Test DLL search path under the nunit settings
It was:
..\Tests\**\*Test*.dll
But is now:
..\Tests\*\bin\Debug\*Test*.dll
And things work nicely
UPDATE
http://confluence.jetbrains.com/display/TCD8/NUnit
You can use this pattern
**\*.dll
as long as you add this pattern in the "Do not run tests from" field
**\obj\**\*.dll
I had a similar issue, but found that I had different version's of Moq between my 2 Test projects.
The issue that I had was that the correct version was not available.
Just do
Update-Package Moq
From the Package Manager command line

Xcode Testing - Followed Code from Docs but Getting Errors

I am new to XCode and testing, and have followed the steps outlined in the iPhone Development Guide under "Unit Testing Applications".
I added a unit-test bundle to my project, named it "LogicTests", set it as the active target, then added a sample "LogicTests" unit-test class under a new group called "Tests". I wrote the simple one-line test from the doc (STFail(#"Must fail to succeed");), then tried to build my project.
I keep getting the errors: Command /bin/sh failed with exit code 1 and /Developer/Tools/RunPlatformUnitTests.include:448: error: Failed tests for architecture 'i386' (GC OFF).
The second error looks like the test is being run and failing properly, but the first error I am completely clueless about... What could the problem be here?
Thanks,
-Greta
Well this behavior is totally normal. If the unit test failed it will produce a return code of 1. Test the opposite with STTrue(1,#"some message") and it should not return 1 and finish sucessfully.
The test thinks your compiling for Intel not ARM architecture. Unfortunately, I can't remember off the top of my head how to set up the target properly.

GWT Junit - error='no compilation unit for that type was seen'

I'm trying to run a GWT unit test in a sample app. I ran
cmd /c /java/gwt-windows-1.6.4/webAppCreator.cmd -out gwttasks com.gwttasks.GwtTasks
Copied in junit-4.5.jar into a lib directory, and added that to the classpath.
Ran:
cmd /c /java/gwt-windows-1.6.4/junitCreator.cmd -junit lib/junit-4.5.jar -module com.gwttasks.GwtTasks -eclipse GwtTasks com.gwt
tasks.unit.GwtJunit
When I try to run any of the generated cmd file (such as GwtJunit-hosted.cmd) or any of the launch files, I get the following error. All the web pages I've seen say to add the test source to the classpath, but it's already there, so that's not the problem. Anyone else seen this?
com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.gwttasks.unit.GwtJunit' was not found in module 'com.gwttasks.GwtTasks'; no compilation unit for that type was seen
at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:390)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:626)
...
The answer could be found here :
http://raibledesigns.com/rd/entry/testing_gwt_applications
In netbeans I added the src/java and test to the class path and debugging worked!!!!!
THANKS
I just want to add that I had the same problem, because I did the (very silly) mistake to not put the GWTTestCase class into the "client" directory, but into another one. No wonder it wasn't found ;)