views:

279

answers:

8

We would like to create some simple automated tests that will be created and maintained by testers. Right now we have a tester who can code in any language, but in the future we might want any tester with a limited knowledge of programming to be able to add or modify the tests.

What is a good programming language for testers who are not great programmers, or programmers at all?

Someone suggested LUA, but I looked into LUA and it might be more complicated that another language would be.

Preferably, the language will be interpreted and not be compiled. Let me know what you think.

Update: C and C++ are under the hood. No one is aspiring to be a programmer really ... it just might be something they could potentially work on if they can handle the task.

Update 2: I am a software engineer who happens to be a tester right now. I am very knowledgeable about the entire lifecycle ... including developing code, so for me I could go with any language but I'm trying to think of other testers who aren't as knowledgeable about programming as I am.

Update 3: The language will need to be able to make calls to the C++ code easily.

+4  A: 

I always reccomend Python.

People always think i am crazy, but it is the easiest and most flexible to show people. And you could always design some type of "test" framework, and only expose them to a very small subset of it.

And you can always refer them to :

alt text

Nix
+1 for python, -1 for anything "for dummies"
Earlz
I hate the books, people who read them, but i love their image. ;) Most other "nerd" books have pretty lame covers.
Nix
I agree, and if you really are a dummy it is easy to understand.
Brian T Hannan
A little better than the Dummies books. http://oreilly.com/catalog/9780596802387
Lumpy
+1  A: 

Depends a bit on what you want, but for my money Ruby is probably the most comprehensible language around.

Also if you're working with web stuff, then Watir gives you a lot of testing functionality right there.

glenatron
... and a lot of test-frameworks available. E.g. Cucumber (http://cukes.info).
nathanvda
I disagree with the 'most comprehensible language' statement. Frankly I have always found Ruby loops awkward and the use of punctuation within method names is questionable too.
Matthieu M.
Judging by your SO rep you're quite a programmer, though, Matthieu M. Things that are obvious and/or questionable to you may not be obvious to non-programmer or someone with very limited programming experience.
glenatron
+5  A: 

You may not even need language depending on what you are testing you can use Test Modeling tools like CubicTest: http://cubictest.seleniumhq.org/

Highly recommend you check that out if you are doing Web Applications.

Our QA team had great success with it.

Otherwise I would recommend a Domain Specific Language over a General Purpose Language in your problem domain. The DSL might actually be a subset of a GPL (for example Rake for Ruby) so google carefully.

If you can not find an existing DSL then:

  • Create a DSL for your testers using Ruby or Scheme. Those two languages are the easiest to create Domain Specific languages.

  • Python If all else fails and they need a GPL than Python is by far the easiest language to learn IMHO.

EDIT - Based on your updated requirements, Python might be the best fit. I have found it very easy to call C or C++ with Python CTypes. However I am sure Ruby has something equally as good.

Adam Gent
+1  A: 

If your ambition is at all to become a programmer, I'd suggest using the language of the system you're testing.

The experience will make you a better programmer, and the knowledge can only make you a better tester.

Jay Riggs
good programmers are hardly ever good testers
Earlz
that is why we have software engineers
Brian T Hannan
true software engineers, not computer science people claiming they are software engineers.
Brian T Hannan
A: 

I think the better question might be what do you plan on doing with the programs created. I have done Java, html, css, php, mysql, vb, C#, etc, etc. Out of all of them, the fundementals remain the same. You always have the same type of logic from language to language. IF ELSE statements, for loops etc. However if your not planning on creating self loading programs then you would go for something that wouldn't do that.

Persoanlly Java is difficult but allows for a lot of portability. Don't just go with what's easiest, because you might not be able to do anything with it in the future.

EDIT *

if you are still interested, java has the ability to make calls to C++, but not without it's share of problems. Link this link has a look at making calls, but might be a little too involved if you're only hoping to show introductory programming.

Justin Gregoire
Java is way too difficult for a non-programmer to start to get involved in. Not really the language itself, but setting it all up is a big pain ... making sure you have the right JRE, JDK, etc ... most people can't even distinguish what is what. I want the tester to be able to say download, install, write, run, done ... not have to worry about stupid JRE versions and all that crap.
Brian T Hannan
P.S. I love Java and use it a lot for in-house software, but it definitely does not suit the needs here.
Brian T Hannan
+1  A: 

Python is a very simple and useful language to understand. Some even compare it to writing pseudocode. It also comes with its own unit testing framework.

EDIT: It also comes with a C API.

loliii
+2  A: 

I think that before actually choosing a language, we should define even more precisely what you are looking for.

  • Garbage collected, as we don't want people to have to understand memory management!!
  • Good number of modules/libraries around, so as not to reinvent the wheel
  • Preferably coming up with already existing (and tested) unit-test frameworks
  • Good documentation for the modules/libraries
  • Preferably scripting language, because tests have to be modified/run quickly
  • Easy interaction with C/C++, though the developers will have to provide the interface

And, perhaps most important of all:

  • clear and "english-like" syntax, so that it will be (at least) readable by non-tech people

Based on this list, I would recommend Python.

  • It's perhaps the programming language (having reached a critical mass) that is the closest to traditional english / algorithm expressions. It's certainly one of those with the least punctuation / weird symbols that throw off non-programmers
  • It comes immediately with so much modules that it's unlikely you'll have to dig for more any time soon... comprising a unittest module
  • The documentation is really good, generally illustrated by examples
  • It is quite simple to interface it with C
  • You can even run Python scripts from Java using JPython ;)

We have a in-house software for our non-regression tests. While it's been programmed in Java (probably for the GUI part and the Windows/Unix portability requirement), Python has been elected as the language to use within the non-regression tests themselves.

This is used mostly by our QA people, and even beginners usually take to it pretty easily, even when they don't have any programming background at all.

Note: I don't have any practical experience with LUA, so I am unable to choose between Python or LUA. However, having use both Python and Ruby, I must say that I have found Python much more readable (loop constructs / punctuation). Just make sure not to pick up Perl ;)

Matthieu M.
You make some very good points here. 1. I can't have the testers worrying about memory crap. All memory must be taken care of for the tester. 2) Good number of modules is essential to be built-in because let's say they have to extract some files from a zip file and put them on the desktop as the first step, then that better be easy or it won't work. 3) scripting language is a must, 4) unit test frameworks ... don't really care, probably won't be using them. 5) Easy interaction with C/C++ is a must as well
Brian T Hannan
Fortunately, both Python and Ruby come with a solid body of libraries and handle natively various files encoding, compression, ... Python even comes up with a sqlite library and of course there Django to administrate it, etc :)
Matthieu M.
A: 

Ok, as I understand the question it is really, how can I let non-programmer's write automated tests for an app written in c++? So in this context I would suggest taking a look at Fit and FitNesse.

Fit is essentially a table based F ramework for I ntegration T esting. The idea is that you hook fixtures up into the code to test and those fixtures are then controlled in different ways using nothing more than tables or in the case of FitNesse simple wiki markup which creates the tables under the hood.

The advantage of this is that there is no programming language involved at all. They just need to know what fixtures you have exposed and the proper usage for them.

The drawback of this is that it can be difficult at first to map out the fixtures you need/want for your tests. Also, it is generally more maintenance than using like a unit test framework where the tests are all just in code.

mockedobject
I have never used FitNesse with c++ but I did come across this little how-to. It is pretty old so I can't vouch for current accuracy but it may at least be an ok starting point for setting it up. http://accu.org/index.php/journals/305
mockedobject