2

I will switch to CodedUI from UFT for test automation and don't want to stay with VB any more. I am learning C# from Pluralsight currently and wondering how much and what level I should complete to be able to comfortably start CodedUI test development?

Any suggestion will be appreciated, especially someone has come from the similar situation.

5

If you are concerned about learning too much, you are doing it WRONG.

The more you learn, the easier it will be for you to solve common problems.

We are getting questions DAILY here which would be solved trivially by having some (very little) programming experience - which is very obviously missing. And in some cases, even willingness to learn is missing. Possibly not in your case, so I decided to write an answer.

Common "rule of thumb" says it takes 10K hours to master something.

But also Pareto principle says 80% of anything is irrelevant.

To be competent programmer, you need to learn few very different languages. Blub Paradox is term describing how less-skilled programmer looks at more advanced languages, and why.

If learning Lisp is too much for you, try Python AND JavaScript. Hint: JavaScript is Lisp with C syntax.

So if you apply both 10K hours rule and Pareto principle: You can learn new language much faster, if you have the experience to tell which parts of the new language are same or can be ignored. But to gain this experience, you need to learn few languages before that, so...

I have no experience with CodedUI, but IMHO all the attempts to replace programmers and creating some magical UI allowing users to generate code are doomed for failure. I have personal experience with one such system/framework: Fit/FitNesse. Idea was to provide users with table-like language so they can write tests. It never happened, so programmers ended up writing code is bad limited DSL (domain-specific language) instead of the one they already mastered. Why Fit failed - and yes, we still have to maintain many test written in bad DSL.

Avoid that, use real language, they are free and make you more productive beyond first learning curve. At minimum, allow you to use Page Object design pattern, increasing QA test engineer productivity immensely.

See also Greenspun's tenth rule:

Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp

So instead of such half-implemented DSL (CodedUI, FitNesse), programmers prefer to have full (Turing-complete) language, which they can enhance as requirements evolve.

| improve this answer | |
  • Thank you @PeterMasiar for the answer. That encourages me to be not afraid of spending too much time on learning C#. I have learned a few languages, including Basic, Pascal, C, COBOL, VBScript, Python, etc. but definitely not reaching 10K hours with only possible exception of COBOL. – hxin Mar 15 '17 at 15:28
  • You have decent programming background to see the semantics beyond syntax sugar. Learning C# will require you to learn new concept - OOP, Object-Oriented programming. Another hint: Python does it easier. – Peter M. - stands for Monica Mar 15 '17 at 15:48
  • I can't find anywhere that mentions CodedUI Test with Python though. – hxin Mar 15 '17 at 16:32
  • I was talking about how to become more competent programmer, regardless of CodedUI or other tools/frameworks. Python is good tool to have in your toolbox for various text file processing and file management/scripting. – Peter M. - stands for Monica Mar 15 '17 at 16:40
  • 1
    @dzieciou - exactly. Instead of having hall-assed DSL, give me full flexible language and I will add helper functions as I need (not as some developer thought should be enough), and I could change them as my needs evolve. – Peter M. - stands for Monica Jul 17 '17 at 18:38
2

I think the basic level of coding skills will be sufficient however, I would completely avoid the record-and-playback/generated code approach in Coded UI. I also recently switched from UFT (VB Scripting) to Coded UI (C#). Not sure if you are planning to convert your existing UFT scripts to Coded UI or will be developing the hand coding framework from the start. I bought the following book from Amazon which used hand coding framework for the Web and Windows based applications.

Hand Coding Coded UI by G.Suden

Later on found out that if you buy from this link and use code U85UWTGF, you will get a 20% discount!

I personally think I you go through this book, you will need to learn a very basic level of C#. Moreover, the book has complete code for Web and Windows applications (Forms and WPF) which will be a great help.

| improve this answer | |
1

CodedUI generates code with record and playback. Most C# you will need is to change that code. I would handcode CodedUI tests and use the recorded as a helper for ideas how you can reach and interact with elements. Also if you are testing web-applications I would research if Selenium is not a better pick, as CodedUI is badly documented and not many people are using it, making it harder to get help on StackExchange.

I think programming fundamentals are more important than deep knowledge of C#. How you structure your code to be readable/understandable, maintainable and extendable will be of more value. Most of this is not language dependent.

Still do keep learning, here some books I would read about code structure

These will also help you to teach developers better coding practises as a QA engineer in a team.

| improve this answer | |
  • hand codedui test is very helpful. That aligns with the approach I have been using as descriptive programming with UFT. – hxin Mar 17 '17 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.