Stats

org.specs2.specification.process.Stats
See theStats companion object
case class Stats(specs: Int, examples: Int, successes: Int, expectations: Int, failures: Int, errors: Int, pending: Int, skipped: Int, trend: Option[Stats], timer: SimpleTimer)

The Stats class store results for the number of:

  • linked specifications
  • examples (including linked examples)
  • successes
  • expectations
  • failures
  • errors
  • pending
  • skipped

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def display(implicit args: Arguments): String

display the statistics on 2 lines, with the time and trend

display the statistics on 2 lines, with the time and trend

Attributes

def displayResults(implicit args: Arguments): String

display the results on one line, always displaying examples/failures/errors and only displaying expectations/pending/skipped if necessary

display the results on one line, always displaying examples/failures/errors and only displaying expectations/pending/skipped if necessary

Attributes

def hasErrors: Boolean

Attributes

Returns

true if there are errors

def hasExpectations: Boolean

Attributes

Returns

true if there are expectations

def hasFailures: Boolean

Attributes

Returns

true if there are failures

def hasFailuresOrErrors: Boolean

Attributes

Returns

true if there are errors or failures

def hasIssues: Boolean

Attributes

Returns

true if there are failures or errors

def hasSuspended: Boolean

Attributes

Returns

true if there are skipped or pending

def isSuccess: Boolean

Attributes

Returns

true if there are no issues at all

def negate: Stats

Attributes

Returns

the "opposite" of this Stats object to be able to do subtractions

def result: Result

Attributes

Returns

an equivalent result for display

Attributes

Returns

the same stats but with a started timer

def time: String

Attributes

Returns

the execution time

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def updateFrom(previous: Option[Stats]): Stats

Attributes

Returns

this Statistics object with some trend if provided

def updateFrom(previous: Stats): Stats

Attributes

Returns

this Statistics object with some trend if relevant

def withResult(result: Result): Stats

set a specific result on this Stats object

set a specific result on this Stats object

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product