Socket
Socket
Sign inDemoInstall

mutation-testing-report-schema

Package Overview
Dependencies
0
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.3 to 1.5.0

18

CHANGELOG.md

@@ -6,2 +6,20 @@ # Change Log

# [1.5.0](https://github.com/stryker-mutator/mutation-testing-elements/compare/v1.4.4...v1.5.0) (2020-12-23)
### Bug Fixes
* **report-schema:** replace no-break space with normal space ([#815](https://github.com/stryker-mutator/mutation-testing-elements/issues/815)) ([5e7e6bc](https://github.com/stryker-mutator/mutation-testing-elements/commit/5e7e6bc66538d06393f5d8f9705fe34c9d6d6ad1))
* **schema:** correctly use "title" and "description" ([#804](https://github.com/stryker-mutator/mutation-testing-elements/issues/804)) ([1834510](https://github.com/stryker-mutator/mutation-testing-elements/commit/1834510c6b6e880540a8eab0a5eb0e1efdebfae9))
### Features
* **report-schema:** generate TS types from schema ([#811](https://github.com/stryker-mutator/mutation-testing-elements/issues/811)) ([3aa4a95](https://github.com/stryker-mutator/mutation-testing-elements/commit/3aa4a95c3d59a0d74594e49dfdf62d862f861d3d))
* **schema:** add config, test coverage and metadata ([#805](https://github.com/stryker-mutator/mutation-testing-elements/issues/805)) ([df34b68](https://github.com/stryker-mutator/mutation-testing-elements/commit/df34b6873d62c3c6e325f64c2135bb001cdfed1a))
## [1.4.3](https://github.com/stryker-mutator/mutation-testing-elements/compare/v1.4.2...v1.4.3) (2020-11-04)

@@ -8,0 +26,0 @@

362

dist/src/index.d.ts

@@ -1,2 +0,2 @@

export * from './api';
export * from '../src-generated/schema';
export declare const schema: {

@@ -6,73 +6,30 @@ $schema: string;

title: string;
description: string;
type: string;
required: string[];
properties: {
config: {
description: string;
type: string;
};
schemaVersion: {
type: string;
pattern: string;
title: string;
description: string;
examples: string[];
};
thresholds: {
type: string;
title: string;
required: string[];
properties: {
high: {
type: string;
title: string;
minimum: number;
maximum: number;
examples: number[];
};
low: {
type: string;
title: string;
minimum: number;
maximum: number;
examples: number[];
};
};
};
projectRoot: {
type: string;
title: string;
examples: string[];
};
files: {
type: string;
title: string;
definitions: {
position: {
type: string;
title: string;
required: string[];
properties: {
line: {
type: string;
minimum: number;
examples: number[];
};
column: {
type: string;
minimum: number;
examples: number[];
};
};
};
};
description: string;
additionalProperties: {
type: string;
title: string;
description: string;
required: string[];
properties: {
language: {
type: string;
title: string;
description: string;
examples: string[];
};
source: {
type: string;
title: string;
examples: string[];
};

@@ -85,12 +42,39 @@ mutants: {

title: string;
description: string;
required: string[];
properties: {
coveredBy: {
type: string;
description: string;
items: {
type: string;
};
};
description: {
type: string;
description: string;
examples: string[];
};
duration: {
type: string;
description: string;
};
id: {
type: string;
title: string;
description: string;
examples: string[];
};
killedBy: {
type: string;
description: string;
items: {
type: string;
};
};
location: {
$ref: string;
};
mutatorName: {
type: string;
title: string;
description: string;
examples: string[];

@@ -100,39 +84,267 @@ };

type: string;
title: string;
description: string;
examples: string[];
};
description: {
static: {
type: string;
title: string;
examples: string[];
description: string;
};
location: {
type: string;
title: string;
required: string[];
properties: {
start: {
$ref: string;
title: string;
};
end: {
$ref: string;
title: string;
};
};
};
status: {
type: string;
title: string;
description: string;
enum: string[];
examples: string[];
};
testsCompleted: {
type: string;
description: string;
};
};
};
};
source: {
description: string;
examples: string[];
type: string;
};
};
};
};
testFiles: {
type: string;
title: string;
description: string;
additionalProperties: {
type: string;
title: string;
description: string;
required: string[];
properties: {
tests: {
type: string;
items: {
type: string;
title: string;
required: string[];
description: string;
properties: {
id: {
type: string;
description: string;
};
name: {
type: string;
description: string;
};
location: {
$ref: string;
};
};
};
};
};
};
};
thresholds: {
type: string;
title: string;
description: string;
required: string[];
properties: {
high: {
type: string;
description: string;
minimum: number;
maximum: number;
examples: number[];
};
low: {
type: string;
description: string;
minimum: number;
maximum: number;
examples: number[];
};
};
};
projectRoot: {
type: string;
description: string;
examples: string[];
};
performance: {
type: string;
title: string;
description: string;
required: string[];
properties: {
setup: {
type: string;
description: string;
};
initialRun: {
type: string;
description: string;
};
mutation: {
type: string;
description: string;
};
};
};
framework: {
type: string;
title: string;
description: string;
required: string[];
properties: {
name: {
type: string;
description: string;
examples: string[];
};
version: {
type: string;
description: string;
};
branding: {
type: string;
title: string;
description: string;
required: string[];
properties: {
homepageUrl: {
type: string;
format: string;
description: string;
};
imageUrl: {
type: string;
description: string;
};
};
};
dependencies: {
type: string;
title: string;
description: string;
additionalProperties: {
type: string;
};
};
};
};
system: {
type: string;
title: string;
description: string;
required: string[];
properties: {
ci: {
description: string;
type: string;
};
os: {
type: string;
title: string;
required: string[];
properties: {
description: {
type: string;
description: string;
examples: string[];
};
platform: {
type: string;
description: string;
examples: string[];
};
version: {
type: string;
description: string;
examples: string[];
};
};
};
cpu: {
type: string;
title: string;
required: string[];
properties: {
baseClock: {
type: string;
description: string;
};
logicalCores: {
type: string;
};
model: {
type: string;
examples: string[];
};
};
};
ram: {
title: string;
type: string;
required: string[];
properties: {
total: {
type: string;
description: string;
};
};
};
};
};
};
definitions: {
position: {
type: string;
title: string;
description: string;
required: string[];
properties: {
line: {
type: string;
minimum: number;
examples: number[];
};
column: {
type: string;
minimum: number;
examples: number[];
};
};
};
location: {
type: string;
title: string;
description: string;
required: string[];
properties: {
start: {
$ref: string;
};
end: {
$ref: string;
};
};
};
openEndLocation: {
type: string;
title: string;
description: string;
required: string[];
properties: {
start: {
$ref: string;
};
end: {
$ref: string;
};
};
};
};
};
//# sourceMappingURL=index.d.ts.map

@@ -17,5 +17,5 @@ "use strict";

exports.schema = void 0;
__exportStar(require("./api"), exports);
__exportStar(require("../src-generated/schema"), exports);
const mutation_testing_report_schema_json_1 = __importDefault(require("./mutation-testing-report-schema.json"));
exports.schema = mutation_testing_report_schema_json_1.default;
//# sourceMappingURL=index.js.map
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://stryker-mutator.io/report.schema.json",
"title": "Schema for a mutation testing report.",
"title": "MutationTestResult",
"description": "Schema for a mutation testing report.",
"type": "object",
"required": [
"schemaVersion",
"thresholds",
"files"
],
"required": ["schemaVersion", "thresholds", "files"],
"properties": {
"config": {
"description": "Free-format object that represents the configuration used to run mutation testing.",
"type": "object"
},
"schemaVersion": {
"type": "string",
"pattern": "^1(\\.\\d*)?$",
"title": "Major version of this report. Used for compatibility.",
"examples": [
"1"
]
"description": "Major version of this report. Used for compatibility.",
"examples": ["1"]
},
"thresholds": {
"type": "object",
"title": "Thresholds for the status of the reported application.",
"required": [
"high",
"low"
],
"properties": {
"high": {
"type": "integer",
"title": "Higher bound threshold.",
"minimum": 0,
"maximum": 100,
"examples": [
80
]
},
"low": {
"type": "integer",
"title": "Lower bound threshold.",
"minimum": 0,
"maximum": 100,
"examples": [
60
]
}
}
},
"projectRoot": {
"type": "string",
"title": "The optional location of the project root.",
"examples": [
"C:\\Projects\\project-under-test",
"/home/user/projects/project-under-test"
]
},
"files": {
"type": "object",
"title": "All mutated files.",
"definitions": {
"position": {
"type": "object",
"title": "Position of a mutation. Both line and column start at one.",
"required": [
"line",
"column"
],
"properties": {
"line": {
"type": "integer",
"minimum": 1,
"examples": [
4
]
},
"column": {
"type": "integer",
"minimum": 1,
"examples": [
3
]
}
}
}
},
"title": "FileResultDictionary",
"description": "All mutated files.",
"additionalProperties": {
"type": "object",
"title": "Mutated file, with the relative path of the file as the key.",
"required": [
"language",
"source",
"mutants"
],
"title": "FileResult",
"description": "Mutated file, with the relative path of the file as the key.",
"required": ["language", "source", "mutants"],
"properties": {
"language": {
"type": "string",
"title": "Programming language that is used. Used for code highlighting, see https://highlightjs.org/static/demo/.",
"examples": [
"javascript",
"typescript",
"cs",
"scala",
"java"
]
"description": "Programming language that is used. Used for code highlighting, see https://prismjs.com/#examples.",
"examples": ["javascript", "typescript", "cs", "scala", "java"],
"type": "string"
},
"source": {
"type": "string",
"title": "Full source code of the mutated file, this is used for highlighting.",
"examples": [
"using System; using....."
]
},
"mutants": {

@@ -117,82 +39,100 @@ "type": "array",

"type": "object",
"title": "Single mutation.",
"required": [
"id",
"mutatorName",
"location",
"status"
],
"title": "MutantResult",
"description": "Single mutation.",
"required": ["id", "mutatorName", "location", "status"],
"properties": {
"coveredBy": {
"type": "array",
"description": "The test ids that covered this mutant. If a mutation testing framework doesn't measure this information, it can simply be left out.",
"items": {
"type": "string"
}
},
"description": {
"type": "string",
"description": "Description of the applied mutation.",
"examples": ["removed call to java/io/Writer::write"]
},
"duration": {
"type": "number",
"description": "The net time it took to test this mutant in milliseconds. This is the time measurement without overhead from the mutation testing framework."
},
"id": {
"type": "string",
"title": "Unique id, can be used to correlate this mutant with other reports.",
"examples": [
"321321"
]
"description": "Unique id, can be used to correlate this mutant across reports.",
"examples": ["321321"]
},
"killedBy": {
"type": "array",
"description": "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.",
"items": {
"type": "string"
}
},
"location": {
"$ref": "#/definitions/location"
},
"mutatorName": {
"type": "string",
"title": "Category of the mutation.",
"examples": [
"ConditionalExpression",
"EqualityOperator",
"LogicalOperator"
]
"description": "Category of the mutation.",
"examples": ["ConditionalExpression", "EqualityOperator", "LogicalOperator"]
},
"replacement": {
"type": "string",
"title": "Actual mutation that has been applied.",
"examples": [
"-",
"+",
"&&",
"||"
]
"description": "Actual mutation that has been applied.",
"examples": ["-", "+", "&&", "||"]
},
"description": {
"static": {
"type": "boolean",
"description": "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": {
"type": "string",
"title": "Description of the applied mutation.",
"examples": [
"removed call to java/io/Writer::write"
]
"title": "MutantStatus",
"description": "Result of the mutation.",
"enum": ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored"]
},
"location": {
"type": "object",
"title": "Location of the applied mutation.",
"required": [
"start",
"end"
],
"properties": {
"start": {
"$ref": "#/properties/files/definitions/position",
"title": "Start position of the mutation. Inclusive."
},
"end": {
"$ref": "#/properties/files/definitions/position",
"title": "End position of the mutation. Exclusive."
}
}
"testsCompleted": {
"type": "number",
"description": "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."
}
}
}
},
"source": {
"description": "Full source code of the mutated file, this is used for highlighting.",
"examples": ["using System; using....."],
"type": "string"
}
}
}
},
"testFiles": {
"type": "object",
"title": "TestFileDefinitionDictionary",
"description": "Test file definitions by file path OR class name.",
"additionalProperties": {
"type": "object",
"title": "TestFile",
"description": "A file containing one or more tests",
"required": ["tests"],
"properties": {
"tests": {
"type": "array",
"items": {
"type": "object",
"title": "TestDefinition",
"required": ["id", "name"],
"description": "A test in your test file.",
"properties": {
"id": {
"type": "string",
"description": "Unique id of the test, used to correlate what test killed a mutant."
},
"status": {
"name": {
"type": "string",
"title": "Result of the mutation.",
"enum": [
"Killed",
"Survived",
"NoCoverage",
"CompileError",
"RuntimeError",
"Timeout",
"Ignored"
],
"examples": [
"Killed",
"Survived",
"NoCoverage",
"CompileError",
"RuntimeError",
"Timeout",
"Ignored"
]
"description": "Name of the test, used to display the test."
},
"location": {
"$ref": "#/definitions/openEndLocation"
}

@@ -204,4 +144,204 @@ }

}
},
"thresholds": {
"type": "object",
"title": "Thresholds",
"description": "Thresholds for the status of the reported application.",
"required": ["high", "low"],
"properties": {
"high": {
"type": "integer",
"description": "Higher bound threshold.",
"minimum": 0,
"maximum": 100,
"examples": [80]
},
"low": {
"type": "integer",
"description": "Lower bound threshold.",
"minimum": 0,
"maximum": 100,
"examples": [60]
}
}
},
"projectRoot": {
"type": "string",
"description": "The optional location of the project root.",
"examples": ["C:\\Projects\\project-under-test", "/home/user/projects/project-under-test"]
},
"performance": {
"type": "object",
"title": "PerformanceStatistics",
"description": "The performance statistics per phase. Total time should be roughly equal to the sum of all these.",
"required": ["setup", "initialRun", "mutation"],
"properties": {
"setup": {
"type": "number",
"description": "Time it took to run the setup phase in milliseconds."
},
"initialRun": {
"type": "number",
"description": "Time it took to run the initial test phase (dry-run) in milliseconds."
},
"mutation": {
"type": "number",
"description": "Time it took to run the mutation test phase in milliseconds."
}
}
},
"framework": {
"type": "object",
"title": "FrameworkInformation",
"description": "Extra information about the framework used",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Name of the framework used.",
"examples": ["Stryker", "Stryker4s", "Stryker.NET", "Infection PHP", "Pitest"]
},
"version": {
"type": "string",
"description": "Version of the framework."
},
"branding": {
"type": "object",
"title": "BrandingInformation",
"description": "Extra branding information about the framework used.",
"required": ["homepageUrl"],
"properties": {
"homepageUrl": {
"type": "string",
"format": "uri",
"description": "URL to the homepage of the framework."
},
"imageUrl": {
"type": "string",
"description": "URL to an image for the framework, can be a data URL."
}
}
},
"dependencies": {
"type": "object",
"title": "Dependencies",
"description": "Dependencies used by the framework. Key-value pair of dependencies and their versions.",
"additionalProperties": {
"type": "string"
}
}
}
},
"system": {
"type": "object",
"title": "SystemInformation",
"description": "Information about the system that performed mutation testing.",
"required": ["ci"],
"properties": {
"ci": {
"description": "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.",
"type": "boolean"
},
"os": {
"type": "object",
"title": "OSInformation",
"required": ["platform"],
"properties": {
"description": {
"type": "string",
"description": "Human-readable description of the OS",
"examples": ["Windows 10 Pro", "Debian Buster", "Ubuntu 20.04.1 LTS"]
},
"platform": {
"type": "string",
"description": "Platform identifier",
"examples": ["linux", "win32"]
},
"version": {
"type": "string",
"description": "Version of the OS or distribution",
"examples": ["10.0.19041"]
}
}
},
"cpu": {
"type": "object",
"title": "CpuInformation",
"required": ["logicalCores"],
"properties": {
"baseClock": {
"type": "number",
"description": "Clock speed in MHz"
},
"logicalCores": {
"type": "number"
},
"model": {
"type": "string",
"examples": ["Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz"]
}
}
},
"ram": {
"title": "RamInformation",
"type": "object",
"required": ["total"],
"properties": {
"total": {
"type": "number",
"description": "The total RAM of the system that performed mutation testing in MB."
}
}
}
}
}
},
"definitions": {
"position": {
"type": "object",
"title": "Position",
"description": "Position of a mutation. Both line and column start at one.",
"required": ["line", "column"],
"properties": {
"line": {
"type": "integer",
"minimum": 1,
"examples": [4]
},
"column": {
"type": "integer",
"minimum": 1,
"examples": [3]
}
}
},
"location": {
"type": "object",
"title": "Location",
"description": "A location with start and end. Start is inclusive, end is exclusive.",
"required": ["start", "end"],
"properties": {
"start": {
"$ref": "#/definitions/position"
},
"end": {
"$ref": "#/definitions/position"
}
}
},
"openEndLocation": {
"type": "object",
"title": "OpenEndLocation",
"description": "A location where \"end\" is not required. Start is inclusive, end is exclusive.",
"required": ["start"],
"properties": {
"start": {
"$ref": "#/definitions/position"
},
"end": {
"$ref": "#/definitions/position"
}
}
}
}
}

@@ -6,5 +6,6 @@ {

"resolveJsonModule": true,
"outDir": "../dist/src"
"outDir": "../dist",
"rootDir": "../"
},
"include": ["**/*", "**/*.json"]
"include": ["../src/**/*", "../src/**/*.json", "../src-generated/**/*"]
}
{
"name": "mutation-testing-report-schema",
"version": "1.4.3",
"version": "1.5.0",
"description": "The json schema for a mutation testing report.",

@@ -9,3 +9,4 @@ "main": "dist/src/index.js",

"test": "mocha --forbid-only --forbid-pending -r source-map-support/register dist/test/**/*.js",
"postpublish": "PUBLISH_SCHEMA=true ../mutation-testing-metrics-scala/npmProjPublish.sh dist/src"
"postpublish": "PUBLISH_SCHEMA=true ../mutation-testing-metrics-scala/npmProjPublish.sh dist/src",
"generate": "node ../../tasks/schema2ts.js src/mutation-testing-report-schema.json src-generated/schema.ts"
},

@@ -21,3 +22,3 @@ "repository": {

"homepage": "https://github.com/stryker-mutator/mutation-testing-elements/tree/master/packages/mutation-testing-elements#readme",
"gitHead": "5d0f22b919805e82762f77f455c4774db68fc05e"
"gitHead": "9a4a0f3424edb5fc7de4a38987fe03b80db657d7"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc