Class Summary | |
trait
|
TestNGSuite
extends Suite
A suite of tests that can be run with either TestNG or ScalaTest. This trait allows you to mark any
method as a test using TestNG's
@Test annotation, and supports all other TestNG annotations.
Here's an example:
import org.scalatest.testng.TestNGSuite import org.testng.annotations.Test import org.testng.annotations.Configuration import scala.collection.mutable.ListBuffer class MySuite extends TestNGSuite { var sb: StringBuilder = _ var lb: ListBuffer[String] = _ @Configuration { val beforeTestMethod = true } def setUpFixture() { sb = new StringBuilder("ScalaTest is ") lb = new ListBuffer[String] } @Test { val invocationCount = 3 } def easyTest() { sb.append("easy!") assert(sb.toString === "ScalaTest is easy!") assert(lb.isEmpty) lb += "sweet" } @Test { val groups = Array("com.mycompany.groups.SlowTest") } def funTest() { sb.append("fun!") assert(sb.toString === "ScalaTest is fun!") assert(lb.isEmpty) } } |
class
|
TestNGWrapperSuite
(xmlSuiteFilenames : scala.List[java.lang.String]) extends TestNGSuite
|