class
Report::Custom
- Report::Custom
- Report
- Reference
- Object
Overview
A custom report format allowing to insert arbitrary content for a test.
The reports must be an array of objects with the keys #name
, #category
, #status
and #content
.
#status
may only have the values failure
or success
.
Example:
[
{
"name": "meinTest",
"category": "Kategorie",
"status": "failure",
"content": "<b>text</b>"
},
{
"name": "meinTest2",
"category": "Kategorie",
"status": "success",
"content": "<b>text</b>"
}
]
WARNING Using custom reports is discouraged outside of development phases as they are hard to translate or re-theme.
Included Modules
- CLI::Macros
- JSON::Serializable
Extended Modules
- CLI::Context
- Report::ReportClass
Defined in:
report/custom.crConstructors
- .new(category : String, name : String, status : Status, content : String)
- .new(pull : JSON::PullParser)
Class Method Summary
Instance Method Summary
-
#category : String
The category this report is grouped in.
- #content : String
-
#name : String
The name displayed for this report.
-
#render(io : IO) : Nil
A custom report format allowing to insert arbitrary content for a test.
-
#status : Status
The status of this report.
Macros inherited from module CLI::Macros
footer(text)
footer,
header(text)
header,
option(long_flag, description, &block)option(short_flag, long_flag, description, &block) option
Instance methods inherited from class Report
category : String
category,
id : Int32
id,
name : String
name,
render(io : IO) : Nil
render,
status : Status
status
Class methods inherited from class Report
create_sequential_id : Int32
create_sequential_id
Macros inherited from class Report
patterns(*filenames)
patterns
Constructor Detail
Class Method Detail
Instance Method Detail
The category this report is grouped in.
The string should be below ~20 characters to prevent the sidebar from overflowing.
The name displayed for this report.
The string should be below ~20 characters to prevent the sidebar from overflowing.
A custom report format allowing to insert arbitrary content for a test.
The reports must be an array of objects with the keys #name
, #category
, #status
and #content
.
#status
may only have the values failure
or success
.
Example:
[
{
"name": "meinTest",
"category": "Kategorie",
"status": "failure",
"content": "<b>text</b>"
},
{
"name": "meinTest2",
"category": "Kategorie",
"status": "success",
"content": "<b>text</b>"
}
]
WARNING Using custom reports is discouraged outside of development phases as they are hard to translate or re-theme.
The status of this report.
This will control the successful-test-count in the report header, filtering options and an indicator next to the test in the sidebar.