Skip to content

Instantly share code, notes, and snippets.

@kiy0taka
Created November 4, 2009 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kiy0taka/226148 to your computer and use it in GitHub Desktop.
Save kiy0taka/226148 to your computer and use it in GitHub Desktop.
[Groovy] Using TestNG via Grape.
import org.testng.annotations.*
import org.testng.TestNG
import org.testng.TestListenerAdapter
@Grab(group='org.testng', module='testng', version='5.7', classifier='jdk15')
class HogeTest {
@Test
void add() {
assert 1 + 1 == 2
}
}
def testng = new TestNG()
testng.setTestClasses(HogeTest)
testng.addListener(new TestListenerAdapter())
testng.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment