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 DSL for Selenium (or another testing tool) that will allow a non-programmer to automate functional tests.

share|improve this question
4  
As a side note, I have always found things that "allow a non-programmer to <task typically done by a programmer>" end up using more resources (time, money) than they save, even if it meant hiring or contracting an actual programmer. –  corsiKa Jun 28 '12 at 14:30

6 Answers 6

Thucydides is here. It allows groovy and is very succinct in comparison to java for writing Selenium tests.

share|improve this answer

The best DSL I've found for WebDriver in Java world is Geb. Fatures I like the most

  1. PageObject support
  2. jQuery content selection
  3. Good integration with BDD frameworks like Spock (my suggestion), Cucummber etc.

    Browser.drive { go "http://myapp.com/login"

    assert $("h1").text() == "Please Login"
    
    $("form.login").with {
        username = "admin"
        password = "password"
        login().click()
    }
    
    assert $("h1").text() == "Admin Section"
    

    }

share|improve this answer

I believe Cucumber is an alternative. There is also an artical on MSDN about doing acceptance testing with IronRuby and RSpec with RSpec filling the role of FitNesse I believe.

I have not used any of these though just as an aside.

share|improve this answer

Answer to:

"...that will allow a non-programmer to automate functional tests." Your answer misses a key point of the question. – Brian Reindel

Brian, test automation is programming the automated tests, isn’t it? Those keywords, like go_to_the_catalog() can be implemented by developers, and can be used by “non-programmers” later.

It is not so hard to create the tutorials how to create and run the automated tests and document all the keywords for the “non-programmers”, so those people would be able to combine and reuse the keywords.

In my opinion, thinking that the basic programming knowledge for “non-programmers” (variables, loops, subroutines) is hard to understand – is misconception. Let’s say, What popular test automation tools have you seen that does not require basic programming skills? Is it SilkTest? QTP? Rational Robot? Ranorex?

Each of those tools is popular and require programming skills. Even in the Selenium IDE when some of the locators fail you have two options: do some programming and change locator or re-record all the entire test.

Using Fitnesse or Cucumber or Robot Framework you will also need to program your own keywords. The same approach can be used in the pure programming language:

  1. Programmers create keywords
  2. Non-programmers can use the keywords, reuse and combine them in any sequence they want
share|improve this answer
    
I completely agree with Dmitry. Tools like Cucumber are useless and are pushed by companies as a way for non-programmers to automate similarly to how record and playback tools were historically pushed for that purpose. I have worked quite a bit with getting non programmers automating test cases and the approach he outlines is much simpler and just as easily adopted by non programmers as using something like cucumber. –  Sam Woods Jun 28 '12 at 18:00
    
Can't say for Cucumber, but there are some benefits to using similar tools like Robot Framework (or own custom framework). One, with the right team, you can have the less skilled QAs and even business stakeholders write the tests, while the automation "architects" create & maintain the keyword libraries used by the framework. So architects manage the actual automation hooks, while the testers and business folks maintain the test coverage. Rather than have people do both. Two, the tests are readable outside of code and IDE. Yes, you can make code readable as keywords, but it's still code. –  David Jul 3 '12 at 7:00
    
David, if Robot Framework works for you – then I have nothing to argue. If there is really good team where automation architects helps less skilled QA to create complex keywords – that is just a good teamwork and the way to build good test automation. The same approach would work fine even if your less skilled QA works with pure Python. But any tool will not help if it was given to less skilled QA without any support from skilled Automation Engineers/Developers –  Dmytro Zharii Jul 4 '12 at 0:14

A very big problem is that we are wasting a lot of time to find and learn the tool instead of just do what you want in “pure” language.

DSL is a set of subroutines that just have a specific name for your domain and do some domain-specific stuff.

You can create such procedures/functions/methods whatever on any languages of you’ve chosen.

You can create such subroutines on any languages: Java, C#, Ruby, Perl, Python

// Test
// … in the middle 
var non_android_phone_vendors = “Nokia”;
varandroid_phone_vendors = “Samsung”;
goto_the_applications_home();
go_to_the_catalog();
search_for(“Android phone”);
add_first_good_to_basket();
var vendors_from_basket = get_goods_vendors_from_basket();
verify_list_does_not_contain(“Nokia”, vendors_from_basket);
verify_list_contains(“Samsung”,vendors_from_basket);

You do not need any tools to start creating the tests. But then, when you have a strong Automation Layer – you could add any tool you want, but any tool is not required for you to create readable tests.

The knowledge of the programming language, OOP, and best practices is the only tools you need at the beginning. Use “pure” programming language to create the DSL for your project.

share|improve this answer
    
"...that will allow a non-programmer to automate functional tests." Your answer misses a key point of the question. –  user2687 Jun 28 '12 at 13:07
    
Brian, plz see my answer below –  Dmytro Zharii Jun 28 '12 at 13:50

In addition to the ones Dan mentioned, take a look at:

share|improve this answer
    
I second consideration of Robot Framework. It's the first framework I've seen that offers a great balance between developer programmability with non-programmer usability. There's still a learning curve but it's much more easier to use than say STAF (another test framework), to me anyways. And it's less restricted to some platform unlike Cucumber and RSpec. –  David Jul 3 '12 at 7:03

Your Answer

 
discard

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