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 have seen people commenting that Python is a very handy language in everyday's testing. I wonder what makes it such a good tool, or what testing tasks are easier to achieve with Python than with other scripting languages (e.g. Powershell) ?

share|improve this question

3 Answers 3

I suspect Powershell's design center is tight integration with Windows services. Python is probably less tightly integrated with Windows, but may have a more substantial set of libraries, e.g. NumPy and SciPy for manipulating numeric data. An indication of its popularity is that a lot of college programming classes taught with Python now; I don't know how many college classes do their assignments in Powershell.

Whether Python is very handy for your own testing depends on what you do. If you only work with Windows, and your software testing is mostly centered on the client, Powershell might be all you need. If you also need to test on non-Windows platforms, Python may be helpful for you. Ultimately, I think it will boil down to the available libraries and platform support rather than the language itself.

share|improve this answer
3  
Advantage of Python is that most *Nix distributions have Python 2.4 installed by default (Java, Groovy, etc are not). So you are still able to execute your test scripts on such machine. Other languages would often require right to install on that machine. –  dzieciou Jul 6 '13 at 17:17

The resources available online for Python are more numerous than those for PowerShell. This can be a significant factor.

On stackoverflow, the number of questions for python and powershell (at time of this writing):

python : 215,177

powershell : 11,690

share|improve this answer
    
+1 for good argument backed up with real numbers! –  dzieciou Sep 1 '13 at 12:53

As for me Python helped a lot with tasks which were related to:

  1. Parsing data files, XML, HTTP, different streams, etc.
  2. Network operations, connections, data copying via Network, etc.
  3. Small utilities or helpers for Test Automation Framework: a. Configuration of XML files(set some element, update some value, ...) b. Gather some metrics from bug tracking / test case management systems c. Parsing report files and adding missed information
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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