Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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