A Map[String, Any]
containing objects that can be used
to configure the fixture and test.
A Map[String, Any]
containing objects that can be used
to configure the fixture and test.
The name of this test.
The name of this test.
See the main documentation for this trait for an explanation of the difference between name
, text
,
and scopes
.
An immutable IndexedSeq
containing the text for any "scopes" enclosing this test, in order
from outermost to innermost scope.
An immutable IndexedSeq
containing the text for any "scopes" enclosing this test, in order
from outermost to innermost scope.
See the main documentation for this trait for an explanation of the difference between name
, text
,
and scopes
. If a test has no surrounding scopes, this field will contain an empty IndexedSeq
.
Tag names for this test.
Tag names for this test.
The "text" for this test.
The "text" for this test.
See the main documentation for this trait for an explanation of the difference between name
, text
,
and scopes
. If a test has no surrounding scopes, this field will contain the same string as name
.
A bundle of information about the current test.
A
TestData
object is passed to thewithFixture
methods of traitsSuite
andfixture.Suite
(bothNoArgTest
andOneArgTest
extendTestData
) and to thebeforeEach
andafterEach
methods of traitBeforeAndAfterEach
. This enables fixtures and tests to make use of the test name and configuration objects in the config map.In ScalaTest's event model, a test may be surrounded by “scopes.” Each test and scope is associated with string of text. A test's name is concatenation of the text of any surrounding scopes followed by the text provided with the test itself, after each text element has been trimmed and one space inserted between each component. Here's an example:
The above
FreeSpec
contains two tests, both nested inside the same two scopes. The outermost scope names the subject,A Set
. The nested scope qualifies the subject withwhen empty
. Inside that scope are the two tests. The text of the tests are:should have size 0
should produce NoSuchElementException when head is invoked
Therefore, the names of these two tests are:
A Stack when empty should have size 0
A Stack when empty should produce NoSuchElementException when head is invoked
The
TestData
instance for the first test would contain:name
:"A Stack when empty should have size 0"
scopes
:collection.immutable.IndexedSeq("A Stack", "when empty")
text
:"should have size 0"