mutationtesting

package mutationtesting

Members list

Type members

Classlikes

final case class BrandingInformation(homepageUrl: String, imageUrl: Option[String])

Extra branding information about the framework used.

Extra branding information about the framework used.

Value parameters

homepageUrl

URL to the homepage of the framework.

imageUrl

URL to an image for the framework, can be a data URL.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class CpuInformation(logicalCores: Int, baseClock: Option[Long], model: Option[String])

Value parameters

baseClock

Clock speed in MHz

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait DirOps extends MetricsResult

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait FileOps extends MetricsResult

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class MetricsFile
final case class FileResult(source: String, mutants: Seq[MutantResult], language: String)

Mutated file

Mutated file

Value parameters

language

Programming language that is used. Used for code highlighting, see https://prismjs.com/#examples.

mutants

All mutants in this file.

source

Full source code of the mutated file, this is used for highlighting.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FrameworkInformation(name: String, version: Option[String], branding: Option[BrandingInformation], dependencies: Option[Dependencies])

Extra information about the framework used

Extra information about the framework used

Value parameters

branding

Extra branding information about the framework used.

dependencies

Dependencies used by the framework. Key-value pair of dependencies and their versions.

name

Name of the framework used.

version

Version of the framework used.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Location(start: Position, end: Position)

A location with start and end. Start is inclusive, end is exclusive.

A location with start and end. Start is inclusive, end is exclusive.

Value parameters

end

End location (exclusive).

start

Starting location (inclusive).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class MetricMutant(status: MutantStatus)

Attributes

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Metrics.type
final case class MetricsDirectory(dirName: String, files: Iterable[MetricsResult]) extends MetricsResult, DirOps

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait DirOps
class Object
trait Matchable
class Any
Show all
final case class MetricsFile(fileName: String, mutants: Iterable[MetricMutant]) extends MetricsResult, FileOps

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait FileOps
class Object
trait Matchable
class Any
Show all
sealed trait MetricsResult

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class MetricsResultRoot(files: Iterable[MetricsResult]) extends MetricsResult, DirOps

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait DirOps
class Object
trait Matchable
class Any
Show all
final case class MutantResult(id: String, mutatorName: String, replacement: String, location: Location, status: MutantStatus, statusReason: Option[String], description: Option[String], coveredBy: Option[Seq[String]], killedBy: Option[Seq[String]], testsCompleted: Option[Int], static: Option[Boolean])

Single mutation.

Single mutation.

Value parameters

coveredBy

The test ids that covered this mutant. If a mutation testing framework doesn't measure this information, it can simply be left out.

description

Description of the applied mutation.

id

Unique id, can be used to correlate this mutant with other reports.

killedBy

The test ids that killed this mutant. It is a best practice to "bail" on first failing test, in which case you can fill this array with that one test.

location

A location with start and end. Start is inclusive, end is exclusive.

mutatorName

Category of the mutation.

replacement

Actual mutation that has been applied.

static

A static mutant means that it was loaded once at during initialization, this makes it slow or even impossible to test, depending on the mutation testing framework.

status

Result of the mutation.

statusReason

The reason that this mutant has this status. In the case of a killed mutant, this should be filled with the failure message(s) of the failing tests. In case of an error mutant, this should be filled with the error message.

testsCompleted

The number of tests actually completed in order to test this mutant. Can differ from coveredBy because of bailing a mutant test run after first failing test.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait MutantStatus extends Product, Serializable

Result of the mutation.

Result of the mutation.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object CompileError.type
object Ignored.type
object Killed.type
object NoCoverage.type
object Pending.type
object RuntimeError.type
object Survived.type
object Timeout.type
Show all
object MutantStatus

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class MutationTestResult[+C]($schema: Option[String], schemaVersion: String, thresholds: Thresholds, projectRoot: Option[String], files: FileResultDictionary, testFiles: Option[TestFileDefinitionDictionary], performance: Option[PerformanceStatistics], framework: Option[FrameworkInformation], system: Option[SystemInformation], config: Option[C])

Schema for a mutation testing report

Schema for a mutation testing report

Type parameters

C

type of the config object

Value parameters

$schema

URL to the JSON schema.

config

Free-format object that represents the configuration used to run mutation testing.

files

All mutated files.

framework

Extra information about the framework used.

performance

The performance statistics per phase. Total time should be roughly equal to the sum of all these.

projectRoot

The optional location of the project root.

schemaVersion

Major version of this report. Used for compatibility.

system

Information about the system that performed mutation testing.

testFiles

Test file definitions by file path OR class name.

thresholds

Thresholds for the status of the reported application.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class OSInformation(platform: String, description: Option[String], version: Option[String])

Value parameters

description

Human-readable description of the OS

platform

Platform identifier

version

Version of the OS or distribution

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class OpenEndLocation(start: Position, end: Option[Position])

A mutationtesting.Location where end is not required. Start is inclusive, end is exclusive.

A mutationtesting.Location where end is not required. Start is inclusive, end is exclusive.

Value parameters

end

End location (exclusive).

start

Starting location (inclusive).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class PerformanceStatistics(setup: Long, initialRun: Long, mutation: Long)

The performance statistics per phase. Total time should be roughly equal to the sum of all these.

The performance statistics per phase. Total time should be roughly equal to the sum of all these.

Value parameters

initialRun

Time it took to run the initial test phase (dry-run) in milliseconds.

mutation

Time it took to run the mutation test phase in milliseconds.

setup

Time it took to run the setup phase in milliseconds.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Position(line: Int, column: Int)

Position of a mutation. Both line and column start at one.

Position of a mutation. Both line and column start at one.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class RamInformation(total: Long)

Value parameters

total

The total RAM of the system that performed mutation testing in MB. On the JVM, this can be the amount of memory available to the JVM instead of the system memory.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class SystemInformation(ci: Boolean, os: Option[OSInformation], cpu: Option[CpuInformation], ram: Option[RamInformation])

Information about the system that performed mutation testing

Information about the system that performed mutation testing

Value parameters

ci

Did mutation testing run in a Continuous Integration environment (pipeline)? Note that there is no way of knowing this for sure. It's done on a best-effort basis.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class TestDefinition(id: String, name: String, location: Option[OpenEndLocation])

A test in your test file.

A test in your test file.

Value parameters

id

Unique id of the test, used to correlate what test killed a mutant.

location

A mutationtesting.Location where end is not required

name

Name of the test, used to display the test.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class TestFile(tests: Seq[TestDefinition], source: Option[String])

A file containing one or more tests

A file containing one or more tests

Value parameters

source

Full source code of the test file. This can be used to display in the report.

tests

The tests contained in this test file.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Thresholds(high: Int, low: Int)

Thresholds for the status of the reported application.

Thresholds for the status of the reported application.

Suggested method for creating a Thresholds object is by the 'smart' create constructor in the companion object

Value parameters

high

Higher bound threshold.

low

Lower bound threshold.

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Thresholds.type

Types

type Dependencies = Map[String, String]

Dependencies used by the framework. Key-value pair of dependencies and their versions.

Dependencies used by the framework. Key-value pair of dependencies and their versions.

Attributes

type FileResultDictionary = Map[String, FileResult]

All mutated files, with the relative path of the file as the key

All mutated files, with the relative path of the file as the key

Attributes

Test file definitions by file path OR class name.

Test file definitions by file path OR class name.

Attributes