Fork me on GitHub

Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
224 0 0 0 100% 94.42 s

Note: failures are anticipated and checked for with assertions while errors are unanticipated.


Package List

[Summary] [Package List] [Test Cases]


Package Tests Errors Failures Skipped Success Rate Time
(default package) 202 0 0 0 100% 56.69 s
org.codehaus.mojo.spotbugs 22 0 0 0 100% 37.73 s

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

(default package)

- Class Tests Errors Failures Skipped Success Rate Time
HelpMojoTest 7 0 0 0 100% 2.491 s
StubOverrideFixerTest 4 0 0 0 100% 1.254 s
BaseViolationCheckMojoTest 22 0 0 0 100% 1.373 s
CheckMojoTest 2 0 0 0 100% 0.068 s
PluginArtifactTest 1 0 0 0 100% 0.812 s
ResourceHelperTest 10 0 0 0 100% 0.749 s
SourceFileIndexerTest 7 0 0 0 100% 2.570 s
SpotBugsAggregateMojoTest 25 0 0 0 100% 2.136 s
SpotBugsGuiTest 2 0 0 0 100% 0.132 s
SpotBugsInfoTest 10 0 0 0 100% 0.038 s
SpotBugsMojoTest 64 0 0 0 100% 42.71 s
SpotBugsPluginsTraitTest 24 0 0 0 100% 1.368 s
SpotbugsReportGeneratorTest 8 0 0 0 100% 0.504 s
VerifyMojoTest 2 0 0 0 100% 0.008 s
XDocsReporterTest 14 0 0 0 100% 0.468 s

org.codehaus.mojo.spotbugs

- Class Tests Errors Failures Skipped Success Rate Time
CheckMojoHarnessTest 11 0 0 0 100% 28.82 s
VerifyMojoHarnessTest 11 0 0 0 100% 8.909 s

Test Cases

[Summary] [Package List] [Test Cases]

HelpMojoTest

execute completes without error using default parameters 2.068 s
execute with detail=true lists all goals and parameters 0.092 s
execute with a specific goal name does not throw 0.034 s
execute with detail=true and specific goal does not throw 0.069 s
execute warns and resets lineLength when it is zero or negative 0.133 s
execute warns and resets indentSize when it is zero or negative 0.063 s
execute with unknown goal name does not throw 0.032 s

StubOverrideFixerTest

main adds @Override annotation to Groovy methods in stub files 1.054 s
main processes all .java files in directory recursively 0.039 s
main ignores non-.java files 0.049 s
main does not add @Override to non-Groovy methods 0.112 s

BaseViolationCheckMojoTest

should extend AbstractMojo 0.017 s
should have default property values not injected 0.019 s
should allow setting properties 0.012 s
should not throw when execute is called 0.008 s
execute() returns early and logs info when skip=true 0.091 s
execute() exits early when class files directory does not exist 0.044 s
execute() exits early when class files directory is empty 0.074 s
execute() scans test classes when includeTests=true 0.092 s
execute() warns and returns when XML output file is missing 0.050 s
execute() logs no-bugs message when XML contains zero bugs 0.072 s
execute() throws MojoExecutionException when bugs exist and failOnError=true 0.046 s
execute() does not throw when bugs exist and failOnError=false 0.058 s
execute() suppresses build failure when bug count is within maxAllowedViolations 0.127 s
execute() throws when bug count exceeds maxAllowedViolations 0.056 s
execute() throws for invalid failThreshold value 0.052 s
execute() does not throw when all bugs are below failThreshold 0.071 s
execute() does not log individual bugs when quiet=true 0.045 s
execute() logs file-walking details when debug is enabled 0.230 s
bugLog formats bug message using LongMessage, classname, source message and type 0.019 s
execute() throws when error count is non-zero and failOnError=true 0.094 s
execute() does not fail when errors present but failOnError=false 0.052 s
execute() creates output directory if it does not exist 0.044 s

CheckMojoHarnessTest

executeWithInvalidFailThreshold(CheckMojo, File) 16.70 s
executeWithBugsWithinMaxAllowedViolations(CheckMojo, File) 1.848 s
executeWithMissingOutputFile(CheckMojo, File) 1.503 s
mojoLoadedWithDefaults(CheckMojo) 1.441 s
executeWithEmptyClassDirectory(CheckMojo, File) 1.383 s
executeWithFailThresholdLow(CheckMojo, File) 0.982 s
executeWithNoBugsInReport(CheckMojo, File) 0.629 s
executeWithMissingClassDirectory(CheckMojo, File) 0.576 s
executeWithBugsAndFailOnError(CheckMojo, File) 1.154 s
executeWithSkipEnabled(CheckMojo, File) 1.352 s
executeWithBugsAndNoFailOnError(CheckMojo, File) 0.843 s

CheckMojoTest

should extend BaseViolationCheckMojo 0.029 s
should skip execution 0.039 s

PluginArtifactTest

should satisfy JavaBean contract 0.812 s

ResourceHelperTest

getResourceFile returns a file with content from resource and logs debug info 0.231 s
getResourceFile returns an existing file in output directory 0.089 s
getResourceFile sanitizes special characters in path components 0.065 s
constructor throws NullPointerException when log is null 0.047 s
constructor throws NullPointerException when resourceManager is null 0.032 s
getResourceFile throws NullPointerException when resource is null 0.010 s
getResourceFile handles resource without path separator 0.052 s
getResourceFile sanitizes special characters in resource path 0.048 s
getResourceFile throws MojoExecutionException when reading the resource stream throws IOException 0.093 s
getResourceFile works without debug logging enabled 0.082 s

SourceFileIndexerTest

buildListSourceFiles and searchActualFilesLocation work as expected 2.033 s
searchActualFilesLocation throws if not initialized 0.009 s
buildListSourceFiles scans nested subdirectories 0.076 s
searchActualFilesLocation returns null when file is not found 0.088 s
buildListSourceFiles indexes test compile source roots 0.113 s
buildListSourceFiles handles non-existent source directories gracefully 0.153 s
buildListSourceFiles can be called multiple times resetting the cache each time 0.098 s

SpotBugsAggregateMojoTest

canGenerateReport returns false when skip=true 0.079 s
canGenerateReport returns false when no reactor projects have XML results 0.039 s
canGenerateReport returns false when XML file exists but is empty 0.066 s
canGenerateReport returns true when at least one reactor project has a non-empty XML 0.102 s
buildAggregatedXml returns null when no reactor projects have XML 0.219 s
buildAggregatedXml merges XML from multiple modules 1.093 s
buildAggregatedXml skips module XML that cannot be parsed 0.120 s
executeReport returns early when canGenerateReport is false 0.030 s
executeReport warns when buildAggregatedXml returns null 0.027 s
executeReport with debug enabled logs preamble message 0.028 s
SpotBugsAggregateMojo extends AbstractMavenReport 0.008 s
getOutputName returns spotbugs plugin name 0.014 s
getOutputPath returns spotbugs plugin name 0.005 s
mojo has expected default property values 0.007 s
properties can be set and read back 0.008 s
canGenerateReport returns false and logs info when skip=true 0.057 s
canGenerateReport returns false when no reactor project has an XML file 0.060 s
canGenerateReport returns false when reactor project XML file is empty 0.044 s
canGenerateReport returns true when at least one reactor project has a non-empty XML file 0.049 s
canGenerateReport returns true when only some reactor projects have XML files 0.027 s
getDescription returns value from resource bundle for given locale 0.021 s
getName returns value from resource bundle for given locale 0.009 s
getBundle returns a non-null ResourceBundle for the English locale 0.009 s
getOutputDirectory returns the outputDirectory absolute path 0.006 s
setReportOutputDirectory updates the outputDirectory field 0.009 s

SpotBugsGuiTest

execute logs encoding and skips launch in headless mode when explicit encoding is set 0.090 s
execute uses default encoding and skips launch in headless mode when encoding is not set 0.042 s

SpotBugsInfoTest

should have correct static constants 0.007 s
should have correct EOL 0.008 s
should have correct spotbugsEfforts map 0.008 s
should have correct spotbugsThresholds map 0.002 s
should have correct spotbugsPriority list 0.002 s
should have correct suffix and aggregate key constants 0.002 s
spotbugsThresholds contains exactly five entries 0.004 s
spotbugsEfforts contains exactly three entries 0.002 s
spotbugsPriority has unknown at index 0 0.002 s
spotbugsPriority indexOf works correctly for valid priorities 0.001 s

SpotBugsMojoTest

should extend AbstractMojo 0.013 s
should skip generate report 0.211 s
containsJdkClasses returns true for a JAR with java.* classes 0.100 s
containsJdkClasses returns false for a JAR without java.* classes 0.126 s
containsJdkClasses returns false for a non-jar path 0.037 s
canGenerateReport returns false when skip=true 0.024 s
canGenerateReport returns false when class directory does not exist 0.033 s
canGenerateReport returns false when class directory is empty and noClassOk=false 0.015 s
canGenerateReport returns true when noClassOk=true and class directory exists 0.047 s
canGenerateReport returns false when class directory is empty and noClassOk=false and includeTests=true but test dir empty 0.036 s
canGenerateReport with nested=true and JAR covers nested file detection 0.082 s
canGenerateReport covers site lifecycle detection via session goals 0.031 s
canGenerateReport returns true when noClassOk=true and class directory exists and skipEmptyReport is false 0.034 s
canGenerateReport returns false when noClassOk=true and class directory exists and skipEmptyReport is true 0.023 s
getOutputName returns spotbugs plugin name 0.007 s
getOutputPath returns spotbugs plugin name 0.009 s
getThresholdParameter returns -high for threshold High 0.022 s
getThresholdParameter returns -experimental for threshold Exp 0.035 s
getThresholdParameter returns -low for threshold Low 0.043 s
getThresholdParameter returns -high for lowercase threshold high 0.021 s
getThresholdParameter returns -medium for unknown threshold 0.018 s
getName returns SpotBugs in English 0.013 s
getDescription returns non-empty description in English 0.020 s
getOutputDirectory returns absolute path of outputDirectory 0.004 s
setReportOutputDirectory sets outputDirectory 0.005 s
isJxrPluginEnabled returns true when xrefLocation exists 0.030 s
isJxrPluginEnabled returns false when xrefLocation missing and no report plugins 1.626 s
isJxrPluginEnabled returns true when maven-jxr-plugin is in report plugins 0.324 s
getSpotbugsArgs includes basic required args for a simple configuration 0.150 s
getSpotbugsArgs includes -html arg when htmlOutput is true 0.066 s
getSpotbugsArgs includes -sarif arg when sarifOutput is true 0.044 s
getSpotbugsArgs includes auxclasspathFromFile when auxClasspathFile is provided 0.038 s
getSpotbugsArgs includes -progress when debug is true 0.037 s
getSpotbugsArgs includes -nested:true when nested is enabled 0.032 s
getSpotbugsArgs includes visitors when set 0.044 s
getSpotbugsArgs includes omitVisitors when set 0.048 s
getSpotbugsArgs includes chooseVisitors when set 0.041 s
getSpotbugsArgs includes -relaxed when relaxed is true 0.056 s
getSpotbugsArgs includes -maxRank when maxRank is set 0.047 s
getSpotbugsArgs includes -noClassOk when noClassOk is true 0.039 s
getSpotbugsArgs includes class directory when it exists 0.026 s
getSpotbugsArgs includes test class directory when includeTests=true and dir exists 0.072 s
getSpotbugsArgs includes addSourceDirs args when addSourceDirs=true 0.363 s
getSpotbugsArgs uses -high threshold parameter 0.032 s
getSpotbugsArgs uses -effort:max when effort is Max 0.027 s
createSpotbugsAuxClasspathFile returns null when classpath elements are null 0.074 s
createSpotbugsAuxClasspathFile returns null when classpath elements are empty 0.055 s
createSpotbugsAuxClasspathFile creates file with filtered classpath 0.202 s
createSpotbugsAuxClasspathFile uses testClasspathElements when includeTests=true 0.128 s
createSpotbugsAuxClasspathFile excludes JARs containing java.* classes 0.265 s
forceFileCreation creates file and parent directories 0.043 s
forceFileCreation replaces an existing file 0.035 s
getEffortParameter returns -effort:min for Min 0.050 s
getEffortParameter returns -effort:default for Default 0.031 s
executeSpotbugs runs a real SpotBugs analysis and writes xml output with bug count 12.03 s
executeSpotbugs writes html and sarif temp output when both are enabled 6.965 s
executeSpotbugs uses toolchain-provided java executable when available 6.236 s
executeSpotbugs includes custom jvmArgs and systemPropertyVariables without error 4.480 s
executeSpotbugs throws MojoExecutionException on timeout 4.433 s
executeSpotbugs throws MojoExecutionException when SpotBugs process fails and failOnError is true 0.276 s
executeSpotbugs does not throw when SpotBugs process fails and failOnError is false 0.313 s
executeSpotbugs writes minimal BugCollection xml when noClassOk=true and analysis produced no output 2.391 s
executeSpotbugs keeps xml temp file when debug is true 0.302 s
executeSpotbugs does not create html or sarif temp files when both outputs disabled 0.255 s

SpotBugsPluginsTraitTest

getEffortParameter returns correct effort string [effort: Max, expected: -effort:max, #0] 0.034 s
getEffortParameter returns correct effort string [effort: Min, expected: -effort:min, #1] 0.006 s
getEffortParameter returns correct effort string [effort: Normal, expected: -effort:default, #2] 0.003 s
getEffortParameter returns correct effort string [effort: null, expected: -effort:default, #3] 0.004 s
getEffortParameter returns correct effort string 0.094 s
isSpotBugsPlugin returns true for JAR containing findbugs.xml at root 0.026 s
isSpotBugsPlugin returns false for JAR without findbugs.xml 0.018 s
isSpotBugsPlugin returns false for null file 0.002 s
isSpotBugsPlugin returns false for non-JAR file 0.009 s
buildBugTypeUrlMap returns empty map when no plugins are configured 0.032 s
buildBugTypeUrlMap maps bug types from a known plugin using built-in defaults 0.060 s
buildBugTypeUrlMap respects user-supplied URL override for a known plugin 0.027 s
buildBugTypeUrlMap supports user-supplied URL for an unknown plugin 0.030 s
buildBugTypeUrlMap ignores plugin JARs without a configured URL 0.030 s
buildBugTypeUrlMap with pluginArtifacts maps bug types from non-spotbugs artifact 0.034 s
buildBugTypeUrlMap skips artifacts from com.github.spotbugs group 0.052 s
getSpotbugsPlugins returns empty string when no plugins configured 0.062 s
getSpotbugsPlugins includes JAR from pluginList 0.090 s
getSpotbugsPlugins includes plugin JAR from non-spotbugs pluginArtifacts 0.258 s
getSpotbugsPlugins skips pluginArtifacts from com.github.spotbugs group 0.182 s
getSpotbugsPlugins skips non-spotbugs artifact without findbugs.xml 0.148 s
buildBugTypeUrlMap skips non-JAR pluginArtifacts (e.g. XML exclude filter files) 0.038 s
buildBugTypeUrlMap logs warning for corrupt JAR covers catch block 0.024 s
getSpotbugsPlugins with debug logging covers debug paths in pluginList handling 0.105 s

SpotbugsReportGeneratorTest

generateReport calls all main report sections 0.301 s
getBugDetailsUrl returns default SpotBugs URL when bugTypeUrlMap is empty 0.015 s
getBugDetailsUrl returns mapped URL for a known addon bug type 0.009 s
getBugDetailsUrl falls back to default URL for a type not in the map 0.002 s
generateReport with JXR enabled covers assembleJxrHyperlink path 0.111 s
generateReport with debug logging enabled covers debug paths 0.060 s
SpotbugsReportGenerator constructor rejects null sink 0.005 s
SpotbugsReportGenerator constructor rejects null bundle 0.001 s

VerifyMojoHarnessTest

executeWithInvalidFailThreshold(VerifyMojo, File) 0.732 s
executeWithBugsWithinMaxAllowedViolations(VerifyMojo, File) 0.607 s
executeWithMissingOutputFile(VerifyMojo, File) 0.514 s
mojoLoadedWithDefaults(VerifyMojo) 0.484 s
executeWithEmptyClassDirectory(VerifyMojo, File) 0.531 s
mojoLoadedSuccessfully(VerifyMojo) 0.434 s
executeWithNoBugsInReport(VerifyMojo, File) 0.707 s
executeWithMissingClassDirectory(VerifyMojo, File) 1.804 s
executeWithBugsAndFailOnError(VerifyMojo, File) 1.171 s
executeWithSkipEnabled(VerifyMojo, File) 0.774 s
executeWithBugsAndNoFailOnError(VerifyMojo, File) 1.065 s

VerifyMojoTest

should extend BaseViolationCheckMojo 0.001 s
should skip execution 0.007 s

XDocsReporterTest

evaluateThresholdParameter returns correct threshold name [input: 1, expected: High, #0] 0.061 s
evaluateThresholdParameter returns correct threshold name [input: 2, expected: Normal, #1] 0.001 s
evaluateThresholdParameter returns correct threshold name [input: 3, expected: Low, #2] 0.001 s
evaluateThresholdParameter returns correct threshold name [input: 4, expected: Exp, #3] 0.001 s
evaluateThresholdParameter returns correct threshold name [input: 5, expected: Ignore, #4] 0.005 s
evaluateThresholdParameter returns correct threshold name [input: 99, expected: Invalid Priority, #5] 0.004 s
evaluateThresholdParameter returns correct threshold name 0.079 s
generateReport writes XML output 0.145 s
generateReport with BugInstance covers bug processing closures 0.087 s
generateReport with debug logging enabled covers debug paths 0.030 s
generateReport with test source roots covers testSourceRoots iteration 0.023 s
XDocsReporter constructor rejects null bundle 0.005 s
XDocsReporter constructor rejects null log 0.014 s
XDocsReporter constructor rejects null threshold 0.012 s