Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I'm looking for a programming language to recommend to a friend considering teaching herself software testing. I have a friend who is interested in learning software testing, and I believe strongly that today's testers absolutely have to have automation skills if they don't want to hit a glass ceiling after a few years (or become super-star exploratory testers . . . but not everyone wants the stress of having to be a super-star).

I can't look to my own experiences, because I did a 4-year CSE degree that was geared toward developers, and my education isn't light-weight enough. I want something relatively easy to learn that will give the tester the greatest bang for their buck in developing good, maintainable automation.

I know Ruby is used for a couple of test tools - Watir and Cucumber - and something that works with Selenium, WatiN, or Watir would be good. The two favorite languages locally for developers seem to be Java and C#, and she will be working locally. Whatever she learns needs to have good resources for novices at programming to self-teach, whether those be books, online tutorials, or online communities. Something that isn't too expensive to learn would probably be preferred ('free IDEs are available and there are good free tutorials and information to learn from' is ideal). Also, something that is harder to write bad code in would be good, since I want her to be able to avoid brittle, unmaintainable tests. She is highly motivated to learn, so a very useful language that will take 6 months of hard work to get a usable level of skill is preferable to a slightly useful language that she could use in a single month. At the same time, any time she spends learning to program is time she could be spending practicing exploratory testing or learning other great test skills - so ease of learning does matter.

Also - I do realize that programming is one very small piece of being a good tester. I just have a better handle on self-teaching the rest of the testing skills, since I self-taught myself those areas and can pass on what worked for me or what I wish I'd known. I don't want anyone to think I believe you can learn to be a good tester by just learning to program; rather, I just don't have a good handle on the easiest way to start programming as a tester since I started testing as a programmer.

share|improve this question
1  
Thanks for the answers so far! I'm leaning towards a combination of Java and Python right now. Java will prepare her well to work with both Java and C#, which are the languages most developers here will be using, and Python sounds like a good 'utility' language with a number of testing tools. I'll start hunting around for some good tutorials :) –  Ethel Evans Aug 23 '11 at 18:14

14 Answers 14

up vote 6 down vote accepted

I kind of have the opposite experience: I learned some coding first then became a tester. My advice is that any programming/coding experience is beneficial for testing. Any way you can better understand what the application is doing in front of you, the better you can test it. Plus, specific tools and languages come and go in use and popularity: learning the fundamentals will age quite well in the long run.

Programming languages comes in all shapes and sizes, but have some main things in common (usually) so seeing more is good. Plus if she's willing to learn, then larger ideas such as Object Oriented Programming, web and command scripting, programming style and code reuse will be helpful overall. Definitely look at scripting languages like Python or Perl: they can be indispensable for daily testing tasks.

As for specific suggestions, Python is a good language to start with. It's easily available and platform independent, which is great in the long run. It also has some mature testing tools (nose, unittest) and a large range of other libraries and tools (BeautifulSoup for HTML processing, Selenium tools). It also has a good community for help, and straightforward syntax. I've also heard good things about Ruby for similar reasons, and maybe the testing tools (Watir in particular) are more mature. I've recently learned a small bit of C#, and it's good as well.

share|improve this answer
1  
I agree that any programming language experience would be beneficial. I also agree that Python might be a good place to start. I have a Python expert on my team, and he is able to use it in a wide variety of test contexts. –  Joe Strazzere Aug 23 '11 at 14:48
2  
Python entered my head w/ Ruby, and it looks like it works w/ Selenium (both RC and IDE). I'm definitely biased towards a language that can be used to teach OOP. I'll have to look into its testing tools. Thanks, this looks promising. –  Ethel Evans Aug 23 '11 at 18:05
    
"I'm definitely biased towards a language that can be used to teach OOP." Why? –  Joe Strazzere Aug 24 '11 at 11:41
1  
Hi Joe, a couple of reasons. Because understanding OOP makes understanding developer code easier, and that opens up possibilities for white-box testing and enhances debugging abilities. Because writing maintainable automated tests is often made easier if the tester understands even basic OOP (e.g., Page Objects for UI testing). And there's probably an unreasoning bias mixed in from my own dev-heavy background :p –  Ethel Evans Aug 24 '11 at 17:27
    
Another vote for Python (+ Selenium bindings) and Shell scripting. –  Sperk Feb 19 '13 at 8:08

I would recommend to start from JavaScript

This language is not too complicated for beginners to start writing some very basic code. From the other hand it is a powerfull language that is used not only for client side but also for server side development. This language has a hidden potential and the popularity of its still growing, see http://langpop.com/

Also person knowing JavaScript can learn Java or C# , but in this case good understanding of OOO concept will be required

As a language it is used in different automation tools, like Selenium and there are a tone of tutorials (just google for 'JavaScript tutorial' and select what you want)

share|improve this answer

Get the OOPS concept first, Start with Java Script, VB Script. Before that it is good to know HTML, CSS styles. Once you are expert on these then go to Ruby Scripts, C#, later on to PERL scripts if you want to learn Security testing.

share|improve this answer

There's a good argument for trying to use whatever language the devs are using, so to that end I'd suggest C#.

I don't think that I really subscribe to the idea that you should start out with a 'gateway' language and work your way up - at the beginning learning programming you can tend to be very hung up on the syntax, rather than concepts, so trying to learn more than one language is a complication.

C# has the free express visual studio IDEs, which are going to be packed with auto-completion and help files. I think there is some decent context for automated testing in C# from some of the microsoft testing blogs also.

share|improve this answer

The language's utility depends upon the type of automation. For driving applications from the outside, or for interacting with a command line interface, a scripting language like Bash or PERL is hard to beat. For interacting with an API, the API's own language is never a bad choice, especially if one has well-documented examples to learn from. (I personally think Clojure is a better language than Java for testing a Java API, but I am not sure I would recommend this to a beginner.) For testing web interfaces, JavaScript might the right language, or it might be a "bigger" language environment like Java or C#, assuming there are well-documented examples (or willing teachers) to learn from.

share|improve this answer
    
Thanks, the point about interacting w/ APIs is a good point. That hints strongly at Java or C#, then, since those languages are heavily used around here (and moving from Java to C# is really pretty easy, IME). Java plus some scripting in Python or Perl might be a pretty potent combination. –  Ethel Evans Aug 23 '11 at 18:08

I don't think any specific language is better or worse than any other, although I will say (from experience) that going from Java or any other "pointerless" language to one that does have pointers is not a pleasant experience.

Apart from that - the important parts of automation and coding are recognizing the problem that the code needs to solve, and being able to express the solution in a way that can be handled with a logical series of steps.

Object-oriented and data-driven are nice ways to handle the data that drives the steps, but the core is finding the bits the automation has to interact with, and the logic processing.

My recommendation here would be to pick something that's got a lot of support and wide application, make sure the logical structures are learned (if-else, case statements, the various looping types and so forth), and it won't matter past what's currently most practiced what the language is.

I learned programming this way, and I've never had much difficulty picking up new languages (I first learned Java, then Javascript with HTML, various other scripting languages, VBScript with ASP.NET, and I'm currently working with a script flavor of Delphi)

share|improve this answer
1  
Definitely a good tip on languages with/without pointers. Of course, going the other way (C++ to C# for example) is awesome! –  joshin4colours Aug 23 '11 at 19:21
    
joshin4colours - yes! Starting with Java and then trying to work in C++ was not a pleasant experience. If I had to do that professionally, I'd have to sit down and learn pointers and how they work. –  Kate Paulk Aug 24 '11 at 15:18

I've mostly used Ruby and Python languages recently in my role as a tester, also would recommend learning command line scripting both on Unix/Linux and Windows machines.

share|improve this answer

I would recommend starting with a scripting language. It could be Perl, Python, Ruby. It’s easy to start with this languages and they allows to easily solve many standard problems, like HTML report generation, sending emails, generate test data etc. Those languages could be used with Selenium RC to create the automated Web tests. First of all, a beginner need to understand what he can do with programming language. The dynamic languages shows a lot of advantages for daily work.

Only than I would recommend to start with strongly typed languages, like C# or Java. There are a lot of important details in that languages that makes it hard to understand.

By default, tester must know the Windows Batch Files scripting.

share|improve this answer
    
(note: this comment is from @mohammed-sameeh - it was added as an answer because a new user doesn't have enough points to comment yet. I think it's a good question, I wondered that too!) "dmitry Zhariy why Windows Batch Files scripting is important for tester" –  testerab Feb 29 '12 at 20:14
1  
The Windows Batch scripting saves a lot of time. I am installing my application under test using the msiexec, copying the predefined config files automatically after the installation, downloading the recent builds from the overseas servers, backuping and restoring the oracle DB in one click. Why should I do all this routine operations manually? I am automating them with batch files and command line tools. Instead of Batch files you also can use Powershell, JScript etc. but I prefer to automate my tasks using batch.And it saves my working hours each day. –  Dmytro Zharii Mar 13 '12 at 16:03

I would recommend 3 that iconic of how bugs are created: C# - this will show a modern object oriented approach, hard to have bugs that are pure typos. Objective C, managing resources and the unique C syntax, so easy to mess up and wonderful bugs are easily created JavaScript - this or some variant of will be useful in automated testing tools as well has understanding loosely typed languages.

Overall I think it helpful to have some knowledge of the language you AUT is written in.

share|improve this answer

If you want your friend to start one option is the Head First Programming book, it uses Python to teach programming and some design. I did it a little while ago to sort of strengthen some basics I wanted to have in programming, although considering I had been doing it in a testing capacity on my own for awhile I got a few good things from it. For someone who has not programmed it looked to me like a good introduction.

share|improve this answer

I would recommend a slightly different approach. Rather than initially focusing on a particular language, I would recommend focusing on programming concepts.

Some good books include Programming Langugae Concepts by Carlo Ghezzi, or Prelude to Programming: Concepts and Design by Elizabeth Drake. (Another great book is Programming in the Key of C Sharp by Charles Petzold. It uses C# to teach programming concepts.)

If someone learns the semantics of basic operations, and the basics of data types, control structures, program design, and data structures then learning a particular language is reduced to learning the syntax for that language.

You don't learn to think or rationalize ideas by simply learning how to repeat words in another language.

share|improve this answer
1  
Basically I agree, although there's more than just "learning the syntax for that language" –  Rsf Sep 5 '11 at 7:49

I like Everyday Scripting with Ruby: for Teams, Testers, and You by Brian Marick

It teaches Ruby but also shows how it can be used to help in testing - so instead of reading theory and going through exercises there is the chance to actually put some of the code into use.

share|improve this answer

I am fairly new in Software Testing and been trying to self study automated testing too. I've been using this free software testing course at Udacity.com. It has notes and forums which are really helpful as well. It uses Python. Hope this helps!

share|improve this answer

I started out as as tester with no programming skills whatsoever.

I started to make use of a tool called "Autoit" for my automation. it is a slight deviation of VB and the user codes in SCITE. That being said, 100% opensource.

The major benefit is the community/Forum. Whenever a question is asked there, no answers are given unless the user actually pasted a piece of the code that they have struggled with, thus forcing the user to learn. It's also VERY WELL documented so the need to ask questions is kept down to a minimum if you are prepared to do some research first.

If I have not said this before, If you can click on it or use you keyboard, the Autoit can automate it!..

I currently use it to run a series of tests on each deployment we have, If something fails, then the deployment stops and All devs are notified. (we run nightly deployments..)

Ill gladly supply more information and assistance if needed and deem this the best to give access to both worlds, (programming and Testing)

share|improve this answer
    
AutoIT is a good tool. I've used it in the past. However, I'm pretty sure that AutoIT is freeware, but not open source. See: autoitscript.com/autoit3/docs/license.htm –  Joe Strazzere Feb 22 '13 at 12:51

protected by user246 Feb 22 '13 at 15:11

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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