• damonluck

    damonluck - 2006-04-25

    I have been trying to use the MenuItemTester but keep getting a NoSuchControlException. The menu has been created using a MenuStrip object in Visual Studio 2005. I am using the following code to select Tools->Options from the menu.

       MenuItemTester myTester = new MenuItemTester("Tools");

       MenuItemTester myTester2 = new MenuItemTester("Options");

    Could you tell me how to use the MenuItemTester correctly.



    • Earl B

      Earl B - 2006-04-25

      I don't have any actual experience, so take my feedback with a little salt...

      Is your menu item.Name property set to "Tools" or "Options"?  I believe the first parameter to the testers should match the .Name property of the control to test.

    • Bart De Boeck

      Bart De Boeck - 2006-04-26

      Hi Damon,

        Anders is writing support for toolstrip items. Alpha 3 does not support this functionality, yet. Please watch out for alpha 4.

      Sorry for the delay,

    • Kai

      Kai - 2006-05-03

      When can we expect a version with proper support for ToolStrip elements?

      • Bart De Boeck

        Bart De Boeck - 2006-05-03


          There is a version in test now. The next beta with toolstrip support will probably be online next week.


    • Anders Lillrank

      Anders Lillrank - 2006-05-03

      To use the new ToolStripMenuItems you should use the ToolStripMenuItemTester instead of MenuItemTester.
      look for alpha 4 relase.

      Best Regards
      Anders Lillrank

    • Kai

      Kai - 2006-08-04


      I try to find the ToolStripTester Class in NUnitForms 2.0 alpha 5 to test several ToolStrip element. Can someone tell me (piece of Sourcecode) how to test those elements?




    • Kai

      Kai - 2006-08-04

      Excuse me, please. I had the old NUnitForms.dll in my References. Everything is okay! ;-)

    • Kai

      Kai - 2006-08-04

      Ok! Now I have another problem: I can start the MainForm of my app in NUnitForms without problems. But when I try to import a data file (inside the app), NUnit is crashing. With the Just-In-Time-Debugger I get the following StackTrace:

         at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle waitHandle)
         at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
         at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)

      and some more...

      I think the reason is, that I start a new Thread to import the data. Has someone an idea, to resolve this problem?

      Best regards,


      • Kai

        Kai - 2006-08-04

        The message is:

        System.NullReferenceException was unhandled
          Message="Object reference not set to an instance of an object."

  • Mark Freedman

    Mark Freedman - 2010-05-11

    are you testing something, expecting the data file to be read, but it hasn't because the thread is stlil going off?


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks