 |
|
 |
So, I really like your tool, thanks.
My question is, is there a way to do keybindings or build tasks for it? I'd like to either run/debug tests with a key combo (like I can w/ MSTest, e.g. CTRL+R,T), or else be able to just have them automatically run or debug whenever my test project does. Any way for me to set that up?
Thanks again, awesome work.
|
|
|
|
 |
|
 |
hello
It's the first time I'm using visual NUnit. And it seams that it can't find my test. I can select the project but nothing appears in the namespace drop down nor in the tests drop down.
here is the code doe C#//
<pre>namespace C_sharp__test_for_visual_NUnit
{
public class Class1
{
public void f()
{
}
}
}</pre>
<pre>namespace TestProject1
{
[TestClass]
public class UnitTest1
{
public UnitTest1()
{
}
private TestContext testContextInstance;
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
[TestMethod]
public void TestMethod1()
{
}
}
}</pre>
and here is the code from managed c++
<pre>namespace NunitTests
{
[TestFixture]
ref class ExampleTestFixture
{
public:
[Test]
void TestSuccess()
{
Assert::AreEqual(1,2);
}
[Test]
void TestException()
{
throw gcnew Exception("Test Exception");
}
[Test]
void TestAssert()
{
Assert::Fail("Test Assert");
}
[Test]
void TestHang()
{
Thread::Sleep(10000);
}
};
}</pre>
|
|
|
|
 |
|
 |
Hi Tommi,
When I try to run my tests through the Visual Nunit window they instantly fail. Here are the exception details:
Failure: System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
System.RuntimeMethodHandle.InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct signature, RuntimeType declaringType)
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
NUnit.Core.Reflect.Construct(Type type)
NUnit.Core.TestMethod.Run(TestResult testResult)
This is with Visual Studio 2010 Pro, NUnit 2.5.8, Visual Nunit 1.1.7 (as reported by VS Extension Manager, which is how I installed it - your SourceForge page lists the latest version as 1.1.3 while the download button on the summary page links to 1.0.3 ???)
The references for my test project (that's also the project type) are all set to copy local, except for all of the refs to the System namespace and Microsoft.VisualStudio.QualityTools.UnitTestFramework. I've tried setting copy local to true on Microsoft.VisualStudio.QualityTools.UnitTestFramework, without success. nunit.framework.dll is definitely being copied.
How can I figure out what's going wrong?
|
|
|
|
 |
|
 |
Released Visual Nunit 2010 bug fix release to remove crashes related to viewing empty test messages.
-Tommi
|
|
|
|
 |
|
|
 |
|
 |
I put a breakpoint in the method that is being called by the test project (i.e the thing being tested). However that breakpoint is not hit when I run Visual NUnit tests? Why?
|
|
|
|
 |
|
 |
Please use the red arrow in the row to start the test in debug mode.
|
|
|
|
 |
|
 |
Hi folks!
I have installed VisualNunit_2010_1_1_6.vsix, which provided me with the Visual NUnit v. 1.1.6 extension for VS 2010.
Visual NUnit v. 1.1.6 runs and allows me to debug the test and other code, but there is an issue.
For example, the following test statement fails by throwing NullReferenceException (Object reference not set to an instance of an object.) when I try to debug my test code (using debug F10 key in particular):
Assert.IsInstanceOf<String>(ConfigurationManager.ConnectionStrings["MyTestConnInfo"].ConnectionString, "Assert.IsInstanceOf<String>");
It happens because Visual NUnit does not see my project's config file (and I have just one project under my Web application solution) and therefore ConfigurationManager.ConnectionStrings collection works with machine.config file which is the only one found at that moment.
Please note that I do not have any problem related to the use/read of project's config file(s) when I use NUnit 2.5.7 GUI application and when I attach my tests to that running process. For that I copied my web.config file as MyTestProject.config file which matches MyTestProject.cproj file by name.
So, how can I make the Visual NUnit to find and read configuration key values from the project's config file(s) under VS 2010? E.g. Web.config file located at the root of my web application?
Please advise.
Thank you,
levenyu
|
|
|
|
 |
|
 |
Hi,
Did anyone sort this issue out? I'm getting the same problem with ConfigurationManager.AppSettings["XXXX"] in a test case.
Cheers
SRM
|
|
|
|
 |
|
 |
As a workaround you can place VisualNunitRunner.exe.config to the project root.
|
|
|
|
 |
|
 |
Could you make a VS 2010 version please?
(regards) => "Omar AL Zabir"
+ "C#, ASP.NET MVP"
+ "http://omaralzabir.com";
|
|
|
|
 |
|
 |
Hi
You can find Visual Nunit from Visual Studio 2010 addons gallery.
Regards,
Tommi
|
|
|
|
 |
|
 |
Hi
Visual Nunit is now released for Visual Studio 2010 with .NET 4.0 support. It can be installed using the Online Gallery from Visual Studio Extension Manager.
Visual Nunit 2008 version received also bug fix release.
-tommi
|
|
|
|
 |
|
 |
I can run my web tests with Resharper, but not Visual NUnit? It sees the assembly in the drop down list, but when I click on it, no tests show up?
I'm trying to use it to run web tests with selenium.
|
|
|
|
 |
|
 |
Bernard O'Flynn wrote: It sees the assembly in the drop down list, but when I click on it, no tests show up?
I'm having the same problem; did you ever find a solution?
3x12=36
2x12=24
1x12=12
0x12=18
|
|
|
|
 |
|
 |
Same here - I can select the assembly in the "Project" dropdown, but the "Namespace" and "Fixture" dropdowns are empty. Tried typing in the values directly with no luck.
|
|
|
|
 |
|
 |
Exactly the same here - did anyone solve this issue? I'm just running the test provided in Visual Studio 2008 Standard edition.... Can only select the Project, nothing shows in the Namespace or Fixture dropdowns and none of the tests show in the Visual NUnit window. Any help would be greatly appreciated..... Thanks
|
|
|
|
 |
|
 |
Visual Nunit 2010 Beta has been released. It is directed to visual studio 2010 Beta 2. This beta version does not yet support .NET 4.0 as NUnit is currently lacking .NET 4.0 support.
-tommi
|
|
|
|
 |
|
 |
This is a bug fix release.
Bugs fixed:
2832709 If Copy Local is false then visual nunit crashes
2833764 VisualNunitRunner stops working with Silverlight 3.0 project
2854361 x86 project on x64 windows
-tommi
|
|
|
|
 |
|
 |
After loading solution, there is an exception 'Visual Nunit Runner' stopped working' and it's impossible to use this plugin.
I'm running VS 2008 SP1 on Vista x64.
Is there any log somewhere which will help you to solve this issue?
|
|
|
|
 |
|
 |
Hi
Better login support has to be added to the plugin but currently the only way to debug this issue would be you to install Visual Studio 2008 SDK and download the sources. Alternatively you could send me a solution which I can use to reproduce the problem.
I am using Windows Vista 64 myself so its more likely to be an issue related to some difference in solution content.
-Tommi
|
|
|
|
 |
|
 |
My solution contains a lot of different types of projects. There is MVC webapp, Silverligt 3.0 and a few plain libraries.
I suspect that Silverlight can be a problem. Can you investigate it or recommend a workaround?
|
|
|
|
 |
|
 |
Could you try unloading projects from solution to find out which one of them is causing the problem and let me know the project type so I can try to repeat the situation in my own environment.
|
|
|
|
 |
|
 |
It's Silverlight 3.0 project
|
|
|
|
 |
|
|
 |