locked
Launch Dialog from within CodedUI Test VS 2012 RRS feed

  • Question

  • Hi,

    i use an FormsDialog for interaction with the Test. These Dialog configure  the testruns a run time (Sets Server Information, ect.)

    In VS 2010 everything works fine.

    In VS 2012 the dialog does not pop up. These happens when i start an Test with CTRL R, CTRL T (Debug Test)

    When i start with Run Test it works.

    Looks like an Bug for me. 

    Are there any known workarounds for these.

    Kind Regards 

    Markus

    Friday, November 23, 2012 8:53 AM

Answers

  • Hi Jack,

    it is a little bit different.

    In my [AssemblyInit] i do somthing like this

    #if DEGBUG

    var myCustomdialog = new myCustomdialog ();

    myCustomdialog.ShowDialog();

    if (Dialogresult == .....  (Here i set a lot of TestParameters like DB Server Connection String etc.) so that the Testers are able to choose on wich Enviroment they want to Develop their Tests.

    #else

    //Will be set for automated Tests depending on the testserver

    #endif

    I have solved the Problem on my own. 

    You need to set the ShowInTaskbar to false for the Customdialog and everything works as expected. You can close this Case..

    For your Information.

    The Testproject was converted from VS 2010 to VS 2012

    Kind Regards

    Markus


    Monday, November 26, 2012 12:21 PM

All replies

  • Hi Markus,

    Thank you for posting in the MSDN forum.

    Just to make this issue clearly, do you create a new FormsDialog/test project in VS2012? Or you just run the same test project created in VS2010? As far as I know, the VS2012 would support the test project created in VS2010.

    In VS 2012 the dialog does not pop up. These happens when i start an Test with CTRL R, CTRL T (Debug Test)

    How about running your test in the Test Explorer or the command line with MSTest?

    If you have other VS2012 Environment, does it work well? Since we couldn’t repro this project, could you share us your project? So I could run it in the same Environment.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Monday, November 26, 2012 11:08 AM
    Moderator
  • Hi Jack,

    it is a little bit different.

    In my [AssemblyInit] i do somthing like this

    #if DEGBUG

    var myCustomdialog = new myCustomdialog ();

    myCustomdialog.ShowDialog();

    if (Dialogresult == .....  (Here i set a lot of TestParameters like DB Server Connection String etc.) so that the Testers are able to choose on wich Enviroment they want to Develop their Tests.

    #else

    //Will be set for automated Tests depending on the testserver

    #endif

    I have solved the Problem on my own. 

    You need to set the ShowInTaskbar to false for the Customdialog and everything works as expected. You can close this Case..

    For your Information.

    The Testproject was converted from VS 2010 to VS 2012

    Kind Regards

    Markus


    Monday, November 26, 2012 12:21 PM
  • Hi Markus,

    Thank you for sharing your solutions here. It will be very beneficial for other community members who have similar questions.

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 27, 2012 2:17 AM
    Moderator