nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #02377
[Bug 907270] Re: Clicking run button causes exception if no test loaded
Strangely, I get the error but with a different stacktrace. In addition,
the menu items Run All and Run Selected are also enabled and (naturally)
cause a failure as well. This occurs with or without the user of the
/run option. I'm changing the description, since the main problem is
that these UI elements should not be enabled at all.
** Summary changed:
- Clicking run button causes exception if no test loaded
+ Gui enables run when the assembly specified on the command line is not found
** Changed in: nunitv2
Status: New => Triaged
** Changed in: nunitv2
Importance: Undecided => High
** Changed in: nunitv2
Assignee: (unassigned) => Charlie Poole (charlie.poole)
** Changed in: nunitv2
Milestone: None => 2.6.0
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/907270
Title:
Gui enables run when the assembly specified on the command line is not
found
Status in NUnit V2 Test Framework:
Triaged
Bug description:
Belongs to: NUnit 2.5.10
If you start nunit for example like this:
nunit.exe /run x:\doesnt_exists
and then click the "Run" button (which is enabled after the error message that states that the file could not be loaded), an exception is thrown:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei NUnit.Util.TestLoader.RunTests(ITestFilter filter)
It seems that the error is in file TestLoader.cs in line 618: Perhaps
Services or Services.UserSettings is null. All other calls in
RunTests(ITestFilter) don't look suspicious to me to raise that
exception or would cause to happen the exception in a different place
(like if filter was null - exception would be thrown somewhere in
BeginRun or afterwards).
Full strack trace:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei NUnit.Util.TestLoader.RunTests(ITestFilter filter)
bei NUnit.UiKit.TestSuiteTreeView.RunTests(ITest[] tests, Boolean ignoreCategories)
bei NUnit.UiKit.TestSuiteTreeView.RunSelectedTests()
bei NUnit.UiKit.TestTree.RunSelectedTests()
bei NUnit.Gui.NUnitForm.runButton_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/907270/+subscriptions
References