locked
Running code ui test out of an other winform window RRS feed

  • Question

  • I wrote a small WinForm-Application which should execute the codedui-test, as mentioned at

    http://blogs.microsoft.co.il/blogs/shair/archive/2010/07/15/running-codedui-test-from-another-application.aspx

    If I create it with VS2010 the test will be executed without errors. All UITestcontrols like WinButton, WinComboBox will be found.

    I created the same application and testcases (same settings, dlls) with VS 2012. Now I get an error-message which tells me:

    "The following is not a valid technology name: MSAA."

    No WinButton and so on will be found on my WinForm.

    But, if I execute the testcase from VS2012 directly it works and all buttons will be found.

    Anybody any suggestions for me?

    Tuesday, December 11, 2012 10:55 AM

Answers

  • Hello zsoltgraz,

    Glad to receive your reply.

    I'm working on two different PCs on one PC VS2012 Ultimate ist installed and on the other PC VS2012 Premium.

    So if I start the testcase from the WinForm-Application where VS2010 is installed, the test will be run correct, without Error,

    I would like to know which computer the VS2010 installed on. Do you have VS2010 and VS2012 on one machine? Or VS2010 and VS2012 install on that two different machines? PC A has VS2010 and PC  B has VS2012? Please clarify.

    I assume that you have just installed VS2010 on one PC and there are both VS2010 and VS2012 on another PC, and you get the error when you run test on the machine where both VS2010 and VS2012 install. Sometimes some strange issues may occur when installing VS2010 and VS2012 on the same machine. They may interfere with each other.

    For example:

    http://social.msdn.microsoft.com/Forums/en-US/vsautotest/thread/fd69b091-dd4c-4721-95f0-9ef381596134

    http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1cfda153-e817-4911-b657-9da20cc5940f

    So please provide us more detailed error messages so that we can further look at this issue.

    I loaded the dlls as references and than I call the Testmethod if I click on the startbutton.

    What is the meaning of “call the Testmethod if I click on the startbutton”? Which startbutton?

    I think that you should run test through right clicking the Test Method in Test Explorer and then selecting “Run selected tests” in VS2012.

    If I have misunderstood anything, please feel free to let me know.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 9:08 AM
    Moderator

All replies

  • Hello Zsolgraz,

    Thank you for your post.

    I created the same application and testcases (same settings, dlls) with VS 2012. Now I get an error-message which tells me:

    "The following is not a valid technology name: MSAA."

    if I execute the testcase from VS2012 directly it works and all buttons will be found.

    I would like to know how you run the test case with VS2012 when you get the error. And what do you specify about “execute test from VS2012 directly”? Whether do you have VS2010 and VS2012 install on the same machine? Please clarify.

    If possible, you could Enable Tracing for UI Test Components (How To: Enable Tracing for “UI Test” Components) to find more useful error messages and provide it for us, so we can make sure whether it is related to the test we record.

    If you have other Environment, I suggest that you record the same Coded UI Test for the same application and check the result.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 1:48 AM
    Moderator
  • Hello,

    I'm working on two different PCs on one PC VS2012 Ultimate ist installed and on the other PC VS2012 Premium. I wrote on both the same testcase and the same WinForm-Application to execute the test.

    So if I start the testcase from the WinForm-Application where VS2010 is installed, the test will be run correct, without Error, but if I start the testcase on the machine where VS2012 is installed. I get the errormessage "The following is not a valid technology name: MSAA."

    The tested application is a Loginwindow written in C# where i have two WinButtons an Ok and a Cancel Button.

    If I run the test with VS2012 "Run selected tests" all buttons will be found, and the buttons are MSAA-Technology. It is a bit difficul to explain the problem.

    The WinForm-Application does nothing else as execute a testmethod. I loaded the dlls as references and than I call the Testmethod if I click on the startbutton. I have done as written their:

    http://blogs.microsoft.co.il/blogs/shair/archive/2010/07/15/running-codedui-test-from-another-application.aspx

    in VS2010 it works but in VS2012 not.

    I does not use recorded actions, because I wrote a repository with methods how to find a button and so so, because that is faster and more robust for the testcases as a recorded one.

    Wednesday, December 12, 2012 8:07 AM
  • Hello zsoltgraz,

    Glad to receive your reply.

    I'm working on two different PCs on one PC VS2012 Ultimate ist installed and on the other PC VS2012 Premium.

    So if I start the testcase from the WinForm-Application where VS2010 is installed, the test will be run correct, without Error,

    I would like to know which computer the VS2010 installed on. Do you have VS2010 and VS2012 on one machine? Or VS2010 and VS2012 install on that two different machines? PC A has VS2010 and PC  B has VS2012? Please clarify.

    I assume that you have just installed VS2010 on one PC and there are both VS2010 and VS2012 on another PC, and you get the error when you run test on the machine where both VS2010 and VS2012 install. Sometimes some strange issues may occur when installing VS2010 and VS2012 on the same machine. They may interfere with each other.

    For example:

    http://social.msdn.microsoft.com/Forums/en-US/vsautotest/thread/fd69b091-dd4c-4721-95f0-9ef381596134

    http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1cfda153-e817-4911-b657-9da20cc5940f

    So please provide us more detailed error messages so that we can further look at this issue.

    I loaded the dlls as references and than I call the Testmethod if I click on the startbutton.

    What is the meaning of “call the Testmethod if I click on the startbutton”? Which startbutton?

    I think that you should run test through right clicking the Test Method in Test Explorer and then selecting “Run selected tests” in VS2012.

    If I have misunderstood anything, please feel free to let me know.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 9:08 AM
    Moderator
  • Hello Zsoltgraz,

    What about your issue now? Could you get useful information from our reply?

    Would you mind letting us know the result of the suggestion?

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 13, 2012 9:17 AM
    Moderator