locked
Automation testing using coded ui RRS feed

  • Question

  • HI

        What is the difference between designing test cases in coded ui test automation using C# .net and VB.net?

    which language is mostly preferable for doing test automation in both Record & Playback and through Hard coding?

    Thanks & Regards

    Gousiya Sultana Shaik

    Friday, September 19, 2014 10:33 AM

Answers

  • The difference between using C# or VB is just syntax. Coded UI will work with both. From the usage perspective, I see a lot more examples using C#, but if you know VB.NET they are readily translatable since both run on top of the .NET Framework.

    When you create Record and play tests, you are pretty much just recording the actions in the UI with no automated validation/verification of the results, and storing it within MTM using an internal p-code, neither C# nor VB.

    If later you would want to create a new Coded UI Test (using either C# or VB.NET) you can use these pre-recorded manual test actions as the baseline, and Visual Studio will generate the code for you, but you will have to edit it to add assertions.

    Which language should you choose? They one you are more comfortable with, and for which you team might already be using as this allows for better peer support and team reuse. If you are coming from VBScript then VB.NET might be a good choice while you get used to the C# syntax.


    Clementino de Mendonça ALM Ranger

    Friday, September 19, 2014 3:37 PM

All replies

  • The difference between using C# or VB is just syntax. Coded UI will work with both. From the usage perspective, I see a lot more examples using C#, but if you know VB.NET they are readily translatable since both run on top of the .NET Framework.

    When you create Record and play tests, you are pretty much just recording the actions in the UI with no automated validation/verification of the results, and storing it within MTM using an internal p-code, neither C# nor VB.

    If later you would want to create a new Coded UI Test (using either C# or VB.NET) you can use these pre-recorded manual test actions as the baseline, and Visual Studio will generate the code for you, but you will have to edit it to add assertions.

    Which language should you choose? They one you are more comfortable with, and for which you team might already be using as this allows for better peer support and team reuse. If you are coming from VBScript then VB.NET might be a good choice while you get used to the C# syntax.


    Clementino de Mendonça ALM Ranger

    Friday, September 19, 2014 3:37 PM
  • Thank you for giving reply
    Sunday, September 21, 2014 4:03 AM