File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes Scripting language for TestNG tests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Scripting language for TestNG tests" Watch "Scripting language for TestNG tests" New topic
Author

Scripting language for TestNG tests

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
Is it possible to write TestNG unit tests in a JVM compatible languages like Groovy or Jython?
Thanks.
Cedric Beust
author
Ranch Hand

Joined: Oct 12, 2004
Posts: 46
Hi John,

Originally posted by John Todd:
Hi.
Is it possible to write TestNG unit tests in a JVM compatible languages like Groovy or Jython?
Thanks.


This can only work if the scripting language supports annotations, since this is how TestNG identifies methods of interest.

I know that Groovy supports annotations, and Alexandru (who's working with me on TestNG) wrote the TestNG-Groovy integration, so yes, you can write TestNG tests with Groovy.

I'm not aware of any other JVM compatible language that supports annotations, though...

--
Cwseix
Cedric Beust
author
Ranch Hand

Joined: Oct 12, 2004
Posts: 46
By the way, Cwseix is the name I use when I try to sign my name with a coffee cup between me and the keyboard.

--
Cedric
(I moved the cup out of the way this time)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Scripting language for TestNG tests