Manage Learn to apply best practices and optimize your operations.

How to learn Python, Ruby and other scripting languages

Join the ranks of software QA pros that have learned Python, Ruby or other scripting languages to code scripts for software automation projects.

What is the best way to learn Python, Ruby and other scripting languages?

More than a few readers posed that question in response to a recent column I wrote about how scripting skills are no longer optional for software test pros.  Others were kind enough to answer the questions, offering their fellow testers suggestions for learning Python or other scripting languages that work well for them. To round out the advice, I reached out to Lisa Crispin and Matthew Heusser--two experts--to see what they had to say about the best way to meet this challenge.

Tip #1: Attitude is everythingLearning Python might be scarey at first

A key theme that emerged from the suggestions is that learning languages to write scripts for test automation is a do-it-yourself project. No matter where you work, it's unlikely the boss will make this happen for you. In other words, no one is going say:  "Take this class. Do it on our time. The company will pay."

In the real world, software test pros need to take the initiative to learn on their own time, and often on their own dime, as well. (The options offered here are free or low cost.)  Learning a scripting language is easier for software testers when they take on the challenge willingly, with the mindset they are investing in their own professional development.  Enthusiasm helps, too. One reader who responded to my column on scripting languages took the initiative to learn Python. I loved his/her comment because it's a great example of the assuming the right attitude.

"I started taking online Python courses. I love it. Looking to increase my skills… using Python. Will try to incorporate Python skills at work. Will see where this leads. I do find Python exciting."

Tip # 2: Get this book

There's no shortage of books available to learn scripting languages like Ruby, but as many have noted, most aren't geared to software testers. Here's one that is, and the title says it all:  Everyday Scripting with Ruby: For Teams, Testers and You, by Brian Marick.

Crispin recommended this book for learning Ruby, and Heusser gave it a nod as well. "It was a huge help to me when I wanted to get better with scripting. I worked through all the examples in the book and it gave me a lot of confidence," Crispin said.

Although she has a background in programming, she recommends Marick's book to those who don't. "For a newbie, working through a book like Brian's is a good way to go," she said.

Tip # 3:  Learn Python and Ruby at

Heusser's top suggestion for do-it-yourself students of scripting languages is to take advantage of  It's a no-cost option for those with little or no programming experience to learn Python, Ruby, PHP, JavaScript, and more.  One reader commenting on my piece about learning scripting noted that while is not geared solely to testers, it's still a good fit.  "Not as targeted [as a lesson geared only to testers] but it's a fairly quick way to learn the basics…"  The reader recommended checking out the Ruby lesson, in particular.

Tip #4:  Team up with a developer

"Try to choose a scripting language with which programmers on the team are familiar."

Lisa Crispin, Agile testing coach

I talked about learning the language your developers work with in a recent column on automated software testing, and Crispin suggested the same approach. "One tip I give testers is to try to choose a scripting language with which programmers on the team are familiar."  She related the following story—with the caveat that she is not recommending today’s testers learn TCL.

"Back in the day, I worked at a company where the Web app was coded in TCL. I had heard that TCL was a good scripting language for automating tests, so I bought myself a book and taught myself enough to write test scripts. Whenever I had a problem, the programmers were happy to help me, because they were experts with TCL. If I'd used something different, they wouldn't have been any help."

Final words of wisdom come from another reader weighing in on the need to learn scripting languages: "Countless skills are self-taught. Change is a constant state."  Well said.

Are you teaching yourself a scripting language? Let me know.

Next Steps

Here are the three BI dashboard best practices you need to know


Dig Deeper on Topics Archive

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

In addition to Codecademy, I would also suggest taking a look at NetTuts+ ( Codecademy is a good interactive seen and interact environment. netTuts is a screen cast model, but allows the user to see a number of methods applied, and can be watched/rewatched. NetTuts also covers more than the basics, whereas the Codecademy modules are better for beginners. Use both to maximize your learning :).
I learned Ruby from Brian Marick's Everyday scripting with Ruby book.  That was enough to get me started, and then I found tutorials and discussions online.  There are many ruby sites that have tutorials, and some even with videos on youtube.

I'm not as familiar with Python though, so i can't really make a big suggestion there.

The best way to learn is find a book, article, or tutorial and work along with it at home.  You will learn much better if you try a language along with reading about how its done.
Thanks for the tip. Will have to check those site out a little later. I have seen some Python code and was curious as to what it did. I have yet to run across any Ruby code as far as I know. Where is Ruby used most often ?
I'd question the premise.
  • For Unit testing, the proven approach is to use the same language as the main code.
  • For API testing, no scripting is necessary.
  • And GUI automation.. Well, "look and feel" can't be checked with a script.
I'd question your reply :)
- We can use scripting for API testing: simulating thousand users, interacting with a complex process that takes several API calls to complete, the scenarios are countless.
- GUI automation can be done with scripts too. Ok, "look and feel" can't, but one can use scripts to test GUI.