trait DirSuiteLike extends AnyFunSuiteLike
DirSuiteLike trait for DirSuite. At the moment this is actual implementation.
- Annotations
- @SuppressWarnings()
- Alphabetic
- By Inheritance
- DirSuiteLike
- AnyFunSuiteLike
- Documenting
- Alerting
- Notifying
- Informing
- TestRegistration
- TestSuite
- Suite
- Serializable
- Assertions
- TripleEquals
- TripleEqualsSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def !==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
- Definition Classes
- TripleEqualsSupport
- def !==(right: Null): TripleEqualsInvocation[Null]
- Definition Classes
- TripleEqualsSupport
- def !==[T](right: T): TripleEqualsInvocation[T]
- Definition Classes
- TripleEqualsSupport
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
- Definition Classes
- TripleEqualsSupport
- def ===(right: Null): TripleEqualsInvocation[Null]
- Definition Classes
- TripleEqualsSupport
- def ===[T](right: T): TripleEqualsInvocation[T]
- Definition Classes
- TripleEqualsSupport
- def alert: Alerter
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike → Alerting
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- macro def assert(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
- macro def assert(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
- macro def assertCompiles(code: String)(implicit pos: Position): Assertion
- Definition Classes
- Assertions
- macro def assertDoesNotCompile(code: String)(implicit pos: Position): Assertion
- Definition Classes
- Assertions
- def assertResult(expected: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
- def assertResult(expected: Any, clue: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
- def assertThrows[T <: AnyRef](f: => Any)(implicit classTag: ClassTag[T], pos: Position): Assertion
- Definition Classes
- Assertions
- macro def assertTypeError(code: String)(implicit pos: Position): Assertion
- Definition Classes
- Assertions
- macro def assume(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
- macro def assume(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
- Definition Classes
- Assertions
- def cancel(cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def cancel(message: String, cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def cancel(message: String)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def cancel()(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- def convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- implicit def convertToEqualizer[T](left: T): Equalizer[T]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- def defaultEquality[A]: Equality[A]
- Definition Classes
- TripleEqualsSupport
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def execute(testName: String, configMap: ConfigMap, color: Boolean, durations: Boolean, shortstacks: Boolean, fullstacks: Boolean, stats: Boolean): Unit
- Definition Classes
- Suite
- def expectedTestCount(filter: Filter): Int
- Definition Classes
- Suite
- def fail(cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def fail(message: String, cause: Throwable)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def fail(message: String)(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def fail()(implicit pos: Position): Nothing
- Definition Classes
- Assertions
- def findReferences(testdir: Path, testname: Path): Seq[Path]
Find references for testcase.
Find references for testcase.
Default logic to find references is following:
use basename of testcase, e.g. filename of testcase without last extension, and append ".ref.*" glob to that basename. Then search under same directory, where testcase is located.
For example:
/path/to/dirsuite/testcase/test01.exec
findFiles("/path/to/dirsuite/testcase", Glob("test01.ref.*"))
- testdir
top level directory from where to look
- Attributes
- protected
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getDirSuiteTestCases(basedir: Path, testPattern: FindFilesPattern): Seq[TestCase]
Find test cases under basedir, by using test pattern to match test cases.
Find test cases under basedir, by using test pattern to match test cases.
- basedir
of test directory
- testPattern
pattern to find test cases
- returns
found test cases
- Attributes
- protected
- def getExecArgumentSeparator: String
Get separator for exec line splitting.
Get separator for exec line splitting.
This separator is used to split one exec line to actual arguments. Overload this if default ";" is not good for you.
- returns
exec line separator
- Attributes
- protected
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def ignore(testName: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike
- def ignoreDirSuiteTestCases(basedir: Path, testPattern: FindFilesPattern)(testFun: (Array[String]) => Any): Unit
Ignore these dirSuite tests.
Ignore these dirSuite tests.
Overload this if youd don't like to see all testcases which are ignored. You could here just cal registerIgnoredTest and register e.g. pattern.
- basedir
of test cases
- testPattern
pattern to find test cases
- testFun
test function to run with test cases
- def ignoreDualAssertionDirSuiteTestCases(basedir: Path, testPattern: FindFilesPattern)(beginTestFun: (Array[String]) => Any, lastTestFun: (Array[String]) => Any): Unit
Ignore these dirSuite tests.
Ignore these dirSuite tests.
Overload this if youd don't like to see all testcases which are ignored. You could here just cal registerIgnoredTest and register e.g. pattern.
- basedir
of test cases
- testPattern
pattern to find test cases
- beginTestFun
test function which is used 1 .. N-1 test steps
- lastTestFun
test function which is used for the last test step
- def info: Informer
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike → Informing
- def intercept[T <: AnyRef](f: => Any)(implicit classTag: ClassTag[T], pos: Position): T
- Definition Classes
- Assertions
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- def mapArgs(testname: Path, args: Array[String]): Array[String]
Map arguments before test execution.
Map arguments before test execution. If you have to provide e.g. some default argument for each test case, then overload this function, and change arguments as needed. (Add, remove, or transform args).
- testname
full path of testcase
- args
original arguments
- returns
args after transformation
- Attributes
- protected
- def mapOutput(testdir: Path, testname: Path, reference: Path): Path
Map output filenames based on reference paths.
Map output filenames based on reference paths.
use basename of testcase, e.g. filename of testcase without last extension, and prefix "out.*" to that basename. Then append reference's filename suffix to that name. Reference file suffix is stripped (basename + ".ref.").
For example:
/path/to/dirsuite/testcase/test01.exec /path/to/dirsuite/testcase/test01.ref.output-name.txt
output : out.test01.output-name.txt
- testdir
directory of this test case
- testname
full path to test case
- reference
full path to reference file
- returns
full path to mapped output file path
- Attributes
- protected
- def markup: Documenter
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike → Documenting
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nestedSuites: IndexedSeq[Suite]
- Definition Classes
- Suite
- def note: Notifier
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike → Notifying
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def parseExec(testname: Path): Seq[Array[String]]
Parse one exec file.
Parse one exec file.
If you have to change exec file format, look for tokenizer to parse each exec line and getExecArgumentSeparator to change exec's arguments separator.
- testname
full path of testcase
- returns
exec steps and arguments for each step
- Attributes
- protected
- def pending: Assertion with PendingStatement
- Definition Classes
- Assertions
- def pendingUntilFixed(f: => Unit)(implicit pos: Position): Assertion with PendingStatement
- Definition Classes
- Assertions
- def registerDirSuiteTestCase(pattern: FindFilesPattern, tc: TestCase, testFuns: List[(Array[String]) => Any]): Unit
Register dirsuite
Register dirsuite
If you don't like see each test case to be printed on test output, you could override this function and just call testCaseExecutor here.
- pattern
which was used to find current test case
- tc
test case, see TestVector for available information
- testFuns
test functions which are run with this test case
- Attributes
- protected
- def registerIgnoredDirSuiteTestCase(pattern: FindFilesPattern, testname: Path): Unit
Register ignored test case.
Register ignored test case.
If you don't like see ignored test case to be printed on test output, you can overload this function and just don't do anything. Or even better, overload ignoreDirSuiteTestCases and register whole dirSuite once, so you still get information that there are ignored tests.
- pattern
which was used to find current test case
- testname
full path to test case
- Attributes
- protected
- final def registerIgnoredTest(testText: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit
- Definition Classes
- AnyFunSuiteLike → TestRegistration
- final def registerTest(testText: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit
- Definition Classes
- AnyFunSuiteLike → TestRegistration
- def rerunner: Option[String]
- Definition Classes
- Suite
- def run(testName: Option[String], args: Args): Status
- Definition Classes
- AnyFunSuiteLike → Suite
- def runDirSuiteTestCases(basedir: Path, testPattern: FindFilesPattern)(testFun: (Array[String]) => Any): Unit
Find and Run test cases based on basedir and testPattern.
Find and Run test cases based on basedir and testPattern.
In addition of normal parameter, there is actual test method as parameter. This test method will be executed for each exec line, with arguments wich are defined by that exec-line.
Below is listed typical test case:
runDirSuiteTestCases(testdir, Glob("success/basic[0-9]*.exec")) { args: Array[String] => assertResult(DemoApp.SUCCESS) { app.doTxt(args) } }
- basedir
of test case directory
- testPattern
pattern of test cases
- testFun
test function which is used to test each test case
- def runDualAssertionDirSuiteTestCases(basedir: Path, testPattern: FindFilesPattern)(firstTestFun: (Array[String]) => Any)(lastTestFun: (Array[String]) => Any): Unit
Run (and find) dual assertion test cases.
Run (and find) dual assertion test cases. These are typically test cases where first steps are supposed to behave one way (succeeds), and then the last step is supposed to behave differently (fails).
This is useful for example testing a case when triggering of error you must first run multiple successful steps.
runDualAssertionDirSuiteTestCases(testdir, Glob("success/multiStepFail[0-9]*.exec")) { args: Array[String] => // All steps at first must succeed assertResult(DemoApp.SUCCESS) { app.doFlaky(args) } } { args: Array[String] => // Then the last step must fail assertThrows[RuntimeException] { app.doFlaky(args) } }
- basedir
of test case directory
- testPattern
Glob or Regex pattern of test cases
- firstTestFun
test function for first execution steps
- lastTestFun
test function for last execution step
- def runNestedSuites(args: Args): Status
- Attributes
- protected
- Definition Classes
- Suite
- def runTest(testName: String, args: Args): Status
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike → TestSuite → Suite
- def runTests(testName: Option[String], args: Args): Status
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike → Suite
- def selectValidator(testname: Path, reference: Path, output: Path): (Path, Path, Path) => Option[String]
Select validator for this (one) test vector.
Select validator for this (one) test vector.
Default logic is that TestValidator.txtValidator is used for "*.txt" files, and TestValidator.xmlValidator is used for "*.xml" files.
- testname
full path of this test case
- reference
full path of reference file
- output
full path of output file
- returns
Validator for this test vector
- Attributes
- protected
- final val succeed: Assertion
- Definition Classes
- Assertions
- def suiteId: String
- Definition Classes
- Suite
- def suiteName: String
- Definition Classes
- Suite
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tags: Map[String, Set[String]]
- Definition Classes
- AnyFunSuiteLike → Suite
- def test(testName: String, testTags: Tag*)(testFun: => Any)(implicit pos: Position): Unit
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike
- def testCaseExecutor(tc: TestCase, testFuns: List[(Array[String]) => Any]): Unit
Execute one test case.
Execute one test case.
- tc
test case to be executed
- testFuns
test functions to be used for testing
- Attributes
- protected
- Annotations
- @SuppressWarnings()
- def testDataFor(testName: String, theConfigMap: ConfigMap): TestData
- Definition Classes
- AnyFunSuiteLike → Suite
- def testNames: Set[String]
- Definition Classes
- AnyFunSuiteLike → Suite
- def testsFor(unit: Unit): Unit
- Attributes
- protected
- Definition Classes
- AnyFunSuiteLike
- def toString(): String
- Definition Classes
- AnyFunSuiteLike → AnyRef → Any
- def tokenizer(execLine: String): Array[String]
Tokenizer for exec-line.
Tokenizer for exec-line.
If default separator for arguments is not good for you, then overload getExecArgumentSeparator.
If you have to use some other format for exec lines (e.g.) JSON, then overload this function. If one raw: exec line is:
exec := "exec:" TEXT
then this function will be fed with TEXT.
- execLine
one exec line which to split, with "exec:" prefix stripped away.
- returns
execline as args vector
- Attributes
- protected
- def typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withClue[T](clue: Any)(fun: => T): T
- Definition Classes
- Assertions
- def withFixture(test: NoArgTest): Outcome
- Attributes
- protected
- Definition Classes
- TestSuite
Deprecated Value Members
- def conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) => A): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- Annotations
- @deprecated
- Deprecated
(Since version 3.1.0) The conversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
- def convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) => B): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- Annotations
- @deprecated
- Deprecated
(Since version 3.1.0) The convertEquivalenceToAToBConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
- def convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) => A): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- Annotations
- @deprecated
- Deprecated
(Since version 3.1.0) The convertEquivalenceToBToAConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) => B): CanEqual[A, B]
- Definition Classes
- TripleEquals → TripleEqualsSupport
- Annotations
- @deprecated
- Deprecated
(Since version 3.1.0) The lowPriorityConversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
- final val styleName: String
- Definition Classes
- AnyFunSuiteLike → Suite
- Annotations
- @deprecated
- Deprecated
(Since version 3.1.0) The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.