How to show a form in your test projects

[Test]
[Category("Windows.Forms")]
public ShowControlModal()
{
     Control control = new myTestControl();
     //this show a control on your developer box and show it shortly on the build server
     WindowsFormsTestHelper.ShowModal(control);
}

Dont use blocking show calls in your tests since it will stop the server. Use can use
WindowsFormsTestHelper.IsBuildServer to find out if you're running on the buildserver

  • No labels