Documentation ¶
Index ¶
- Constants
- Variables
- func ReportTemplate(w io.Writer, suite *ntt.Suite, text string) error
- type Collection
- type File
- type Report
- type Run
- type RunSlice
- func (rs RunSlice) Average() time.Duration
- func (rs RunSlice) Deviation() time.Duration
- func (rs RunSlice) Duration() time.Duration
- func (rs RunSlice) Failed() []Run
- func (rs RunSlice) First() Run
- func (rs RunSlice) Last() Run
- func (rs RunSlice) Load() []float64
- func (rs RunSlice) Longest() Run
- func (rs RunSlice) NotPassed() []Run
- func (rs RunSlice) Result() string
- func (rs RunSlice) Shortest() Run
- func (rs RunSlice) Total() time.Duration
- func (rs RunSlice) Unstable() []Run
Constants ¶
View Source
const ( SummaryTemplate = `` /* 1302-byte string literal not displayed */ JUnitTemplate = `` /* 550-byte string literal not displayed */ JSONTemplate = `` /* 899-byte string literal not displayed */ )
Variables ¶
View Source
var ( Command = &cobra.Command{ Use: "report", Short: "show information about latest test run", Long: `show information about latest test run", The report command shows a summary of the latest test run. The summary includes information such as a list of tests which did not pass, average run times, CPU load, etc. Command line options '--json' and '--junit' show similar output, but with JSON or JUNIT formatting. Use environment variable 'NTT_COLORS=never' to disable colors. Templating ---------- ntt uses the Go templates format which you can use to specify custom output templates. Example: ntt report --template "{{.Name}} took {{.Tests.Duration}}" Available Objects .Report is a collection of test runs .Report.Cores: number of CPU cores .Report.Environ: list of environment variable .Report.Getenv: value of an environment variable .Report.LineCount: number of TTCN-3 source code lines .Report.MaxJobs: maximum number of parallel test jobs .Report.MaxLoad: maximum allowed CPU load .Report.Modules: a list of collection sorted by module .Report.Name: name of the collection .Report.Runs: list of test runs .Report.Tests: list of tests (with final verdict) .Report.FixedTests: list of tests where unstable tests are changed to pass or fail (based on ExpectedVerdict) .RunSlice is a list of test runs .RunSlice.Load: Return systemload slice for every run .RunSlice.Average: Average duration of runs (median) .RunSlice.Deviation: Standard deviation .RunSlice.Duration: Timespan of first and last test run .RunSlice.Failed: A slice of failed test runs (inconc, none, error, fail, ...) .RunSlice.First: First test run .RunSlice.Last: Last test run .RunSlice.Longest: Longest test run .RunSlice.NotPassed: A slice of tests without 'pass' verdict .RunSlice.Result: Final result (PASSED, FAILED, UNSTABLE, NOEXEC) .RunSlice.Shortest: Shortest test run .RunSlice.Total: Sum of all test run durations .RunSlice.Unstable: List of unstable test runs .Run is a individual test run .Run.ID: test run ID (e.g. test.Stable_A-2) .Run.Name: full qualified test name (test.Stable_A) .Run.Instance: test instance (e.g. 2) .Run.Module: module name (test) .Run.Testcase: testcase name (e.g. Stable_A) .Run.Verdict: the test verdict (pass, fail, none, ...) .Run.Begin: when the test was started (time.Time Go object) .Run.End: when the test ended (time.Time Go object) .Run.Duration: a time.Duration Go object .Run.Load: the system load when the test was started .Run.MaxMem: the maximum memory used when the test ended .Run.Reason: optional reason for verdicts .Run.ReasonFiles: content of *.reason files .Run.RunnerID: the ID of the runner exeuting the run .Run.WorkingDir: working Directory of the test .File is a (reason) file .File.Name: path to file .File.Content: content of file Additional commands green: output ANSI sequences for color green red: output ANSI sequences for color red orange: output ANSI sequences for color orange bold: output ANSI sequences for bold text off: output ANSI sequences to reset attributes colorize: colorize output join: join input with a separator json: encode input using JSON format min: returns the minimum of a float slice max: returns the maximum of a float slice median: returns the median of a float slice Summary template: ` + SummaryTemplate + ` JUnit template: ` + JUnitTemplate + ` JSON template: ` + JSONTemplate + ` `, RunE: report, } )
Functions ¶
Types ¶
type Collection ¶
type Collection struct { Name string // contains filtered or unexported fields }
func NewCollection ¶
func NewCollection(name string, runs ...results.Run) *Collection
func (Collection) FixedTests ¶ added in v0.8.0
func (c Collection) FixedTests() RunSlice
func (Collection) Modules ¶
func (c Collection) Modules() []*Collection
func (Collection) Runs ¶
func (c Collection) Runs() RunSlice
func (Collection) Tests ¶
func (c Collection) Tests() RunSlice
type Report ¶
type Report struct { Collection Cores int // contains filtered or unexported fields }
type Run ¶
func (Run) ReasonFiles ¶
Click to show internal directories.
Click to hide internal directories.