NBi icon indicating copy to clipboard operation
NBi copied to clipboard

GenBI: Unhandled exception when creating new catagory

Open rvdpluijm opened this issue 9 years ago • 1 comments

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" 2015-12-09 09_19_01-genbi
  • Type in a new catagory name and click on Add: 2015-12-09 09_21_55-genbi
  • Unhandled exception is prompted: 2015-12-09 09_22_41-genbi

rvdpluijm avatar Dec 09 '15 08:12 rvdpluijm

Quick note for myself: only when loading an existing testSuite, not when creating a new one

Seddryck avatar Dec 23 '15 13:12 Seddryck