NBi
NBi copied to clipboard
GenBI: Unhandled exception when creating new catagory
Hi,
When creating a new catagory for a just loaded test from an .nbits file, I received the following unhandled exception:
Source: NBi.Service
Type: System.InvalidCastException
Description:
----------------------------------------
System.InvalidCastException: Unable to cast object of type 'NBi.Xml.TestXml' to type 'NBi.Xml.TestStandaloneXml'.
at NBi.Service.TestListManager.AddCategory(Test test, String categoryName) in c:\Program Files (x86)\TeamCity\buildAgent\work\19aec03c8d880134\NBi.Services\TestListManager.cs:line 156
at NBi.UI.Genbi.Presenter.TestListPresenter.AddCategory(String categoryName) in c:\Program Files (x86)\TeamCity\buildAgent\work\19aec03c8d880134\NBi.UI.Genbi\Presenter\TestListPresenter.cs:line 193
at NBi.UI.Genbi.Command.Test.AddCategoryTestCommand.Invoke() in c:\Program Files (x86)\TeamCity\buildAgent\work\19aec03c8d880134\NBi.UI.Genbi\Command\Test\AddCategoryTestCommand.cs:line 38
at NBi.UI.Genbi.Command.ToolStripCommandBinding.OnItemClick(Object sender, EventArgs e) in c:\Program Files (x86)\TeamCity\buildAgent\work\19aec03c8d880134\NBi.UI.Genbi\Command\ToolStripCommandBinding.cs:line 49
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Steps to replicate:
- Right click on loaded test and click on "add catagory"
- Type in a new catagory name and click on Add:
- Unhandled exception is prompted:
Quick note for myself: only when loading an existing testSuite, not when creating a new one