Fork me on GitHub

Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
224 0 0 0 100% 22.94 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
com.github.spotbugs.spotbugs_maven_plugin 7 0 0 0 100% 0.270 s
org.codehaus.mojo.spotbugs 213 0 0 0 100% 22.43 s
com.github.spotbugs 4 0 0 0 100% 0.236 s

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

com.github.spotbugs.spotbugs_maven_plugin

- Class Tests Errors Failures Skipped Success Rate Time
HelpMojoTest 7 0 0 0 100% 0.270 s

org.codehaus.mojo.spotbugs

- Class Tests Errors Failures Skipped Success Rate Time
BaseViolationCheckMojoTest 22 0 0 0 100% 0.174 s
CheckMojoHarnessTest 11 0 0 0 100% 5.107 s
CheckMojoTest 2 0 0 0 100% 0.003 s
PluginArtifactTest 1 0 0 0 100% 0.038 s
ResourceHelperTest 10 0 0 0 100% 0.116 s
SourceFileIndexerTest 7 0 0 0 100% 0.287 s
SpotBugsAggregateMojoTest 25 0 0 0 100% 0.426 s
SpotBugsGuiTest 2 0 0 0 100% 0.031 s
SpotBugsInfoTest 10 0 0 0 100% 0.009 s
SpotBugsMojoTest 64 0 0 0 100% 14.37 s
SpotBugsPluginsTraitTest 24 0 0 0 100% 0.249 s
SpotbugsReportGeneratorTest 8 0 0 0 100% 0.100 s
VerifyMojoHarnessTest 11 0 0 0 100% 1.391 s
VerifyMojoTest 2 0 0 0 100% 0.004 s
XDocsReporterTest 14 0 0 0 100% 0.127 s

com.github.spotbugs

- Class Tests Errors Failures Skipped Success Rate Time
StubOverrideFixerTest 4 0 0 0 100% 0.236 s

Test Cases

[Summary] [Package List] [Test Cases]

HelpMojoTest

execute completes without error using default parameters 0.182 s
execute with detail=true lists all goals and parameters 0.018 s
execute with a specific goal name does not throw 0.007 s
execute with detail=true and specific goal does not throw 0.007 s
execute warns and resets lineLength when it is zero or negative 0.033 s
execute warns and resets indentSize when it is zero or negative 0.017 s
execute with unknown goal name does not throw 0.003 s

StubOverrideFixerTest

main adds @Override annotation to Groovy methods in stub files 0.214 s
main processes all .java files in directory recursively 0.008 s
main ignores non-.java files 0.008 s
main does not add @Override to non-Groovy methods 0.006 s

BaseViolationCheckMojoTest

should extend AbstractMojo 0.002 s
should have default property values not injected 0.005 s
should allow setting properties 0.003 s
should not throw when execute is called 0.002 s
execute() returns early and logs info when skip=true 0.010 s
execute() exits early when class files directory does not exist 0.003 s
execute() exits early when class files directory is empty 0.004 s
execute() scans test classes when includeTests=true 0.007 s
execute() warns and returns when XML output file is missing 0.007 s
execute() logs no-bugs message when XML contains zero bugs 0.015 s
execute() throws MojoExecutionException when bugs exist and failOnError=true 0.011 s
execute() does not throw when bugs exist and failOnError=false 0.010 s
execute() suppresses build failure when bug count is within maxAllowedViolations 0.010 s
execute() throws when bug count exceeds maxAllowedViolations 0.011 s
execute() throws for invalid failThreshold value 0.009 s
execute() does not throw when all bugs are below failThreshold 0.010 s
execute() does not log individual bugs when quiet=true 0.010 s
execute() logs file-walking details when debug is enabled 0.014 s
bugLog formats bug message using LongMessage, classname, source message and type 0.003 s
execute() throws when error count is non-zero and failOnError=true 0.010 s
execute() does not fail when errors present but failOnError=false 0.009 s
execute() creates output directory if it does not exist 0.005 s

CheckMojoHarnessTest

executeWithInvalidFailThreshold(CheckMojo, File) 2.996 s
executeWithBugsWithinMaxAllowedViolations(CheckMojo, File) 0.279 s
executeWithMissingOutputFile(CheckMojo, File) 0.188 s
mojoLoadedWithDefaults(CheckMojo) 0.176 s
executeWithEmptyClassDirectory(CheckMojo, File) 0.167 s
executeWithFailThresholdLow(CheckMojo, File) 0.175 s
executeWithNoBugsInReport(CheckMojo, File) 0.145 s
executeWithMissingClassDirectory(CheckMojo, File) 0.156 s
executeWithBugsAndFailOnError(CheckMojo, File) 0.194 s
executeWithSkipEnabled(CheckMojo, File) 0.165 s
executeWithBugsAndNoFailOnError(CheckMojo, File) 0.174 s

CheckMojoTest

should extend BaseViolationCheckMojo 0 s
should skip execution 0.003 s

PluginArtifactTest

should satisfy JavaBean contract 0.037 s

ResourceHelperTest

getResourceFile returns a file with content from resource and logs debug info 0.048 s
getResourceFile returns an existing file in output directory 0.013 s
getResourceFile sanitizes special characters in path components 0.008 s
constructor throws NullPointerException when log is null 0.002 s
constructor throws NullPointerException when resourceManager is null 0.003 s
getResourceFile throws NullPointerException when resource is null 0.002 s
getResourceFile handles resource without path separator 0.011 s
getResourceFile sanitizes special characters in resource path 0.006 s
getResourceFile throws MojoExecutionException when reading the resource stream throws IOException 0.011 s
getResourceFile works without debug logging enabled 0.011 s

SourceFileIndexerTest

buildListSourceFiles and searchActualFilesLocation work as expected 0.227 s
searchActualFilesLocation throws if not initialized 0.002 s
buildListSourceFiles scans nested subdirectories 0.015 s
searchActualFilesLocation returns null when file is not found 0.011 s
buildListSourceFiles indexes test compile source roots 0.010 s
buildListSourceFiles handles non-existent source directories gracefully 0.006 s
buildListSourceFiles can be called multiple times resetting the cache each time 0.013 s

SpotBugsAggregateMojoTest

canGenerateReport returns false when skip=true 0.013 s
canGenerateReport returns false when no reactor projects have XML results 0.015 s
canGenerateReport returns false when XML file exists but is empty 0.010 s
canGenerateReport returns true when at least one reactor project has a non-empty XML 0.015 s
buildAggregatedXml returns null when no reactor projects have XML 0.027 s
buildAggregatedXml merges XML from multiple modules 0.215 s
buildAggregatedXml skips module XML that cannot be parsed 0.033 s
executeReport returns early when canGenerateReport is false 0.005 s
executeReport warns when buildAggregatedXml returns null 0.006 s
executeReport with debug enabled logs preamble message 0.004 s
SpotBugsAggregateMojo extends AbstractMavenReport 0.001 s
getOutputName returns spotbugs plugin name 0.002 s
getOutputPath returns spotbugs plugin name 0.002 s
mojo has expected default property values 0.003 s
properties can be set and read back 0.003 s
canGenerateReport returns false and logs info when skip=true 0.011 s
canGenerateReport returns false when no reactor project has an XML file 0.010 s
canGenerateReport returns false when reactor project XML file is empty 0.009 s
canGenerateReport returns true when at least one reactor project has a non-empty XML file 0.008 s
canGenerateReport returns true when only some reactor projects have XML files 0.011 s
getDescription returns value from resource bundle for given locale 0.010 s
getName returns value from resource bundle for given locale 0.001 s
getBundle returns a non-null ResourceBundle for the English locale 0.003 s
getOutputDirectory returns the outputDirectory absolute path 0.002 s
setReportOutputDirectory updates the outputDirectory field 0.001 s

SpotBugsGuiTest

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

SpotBugsInfoTest

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

SpotBugsMojoTest

should extend AbstractMojo 0.002 s
should skip generate report 0.053 s
containsJdkClasses returns true for a JAR with java.* classes 0.026 s
containsJdkClasses returns false for a JAR without java.* classes 0.028 s
containsJdkClasses returns false for a non-jar path 0.008 s
canGenerateReport returns false when skip=true 0.005 s
canGenerateReport returns false when class directory does not exist 0.008 s
canGenerateReport returns false when class directory is empty and noClassOk=false 0.004 s
canGenerateReport returns true when noClassOk=true and class directory exists 0.004 s
canGenerateReport returns false when class directory is empty and noClassOk=false and includeTests=true but test dir empty 0.004 s
canGenerateReport with nested=true and JAR covers nested file detection 0.027 s
canGenerateReport covers site lifecycle detection via session goals 0.009 s
canGenerateReport returns true when noClassOk=true and class directory exists and skipEmptyReport is false 0.004 s
canGenerateReport returns false when noClassOk=true and class directory exists and skipEmptyReport is true 0.004 s
getOutputName returns spotbugs plugin name 0.002 s
getOutputPath returns spotbugs plugin name 0.001 s
getThresholdParameter returns -high for threshold High 0.007 s
getThresholdParameter returns -experimental for threshold Exp 0.004 s
getThresholdParameter returns -low for threshold Low 0.004 s
getThresholdParameter returns -high for lowercase threshold high 0.005 s
getThresholdParameter returns -medium for unknown threshold 0.005 s
getName returns SpotBugs in English 0.002 s
getDescription returns non-empty description in English 0.002 s
getOutputDirectory returns absolute path of outputDirectory 0.001 s
setReportOutputDirectory sets outputDirectory 0.001 s
isJxrPluginEnabled returns true when xrefLocation exists 0.004 s
isJxrPluginEnabled returns false when xrefLocation missing and no report plugins 0.081 s
isJxrPluginEnabled returns true when maven-jxr-plugin is in report plugins 0.032 s
getSpotbugsArgs includes basic required args for a simple configuration 0.020 s
getSpotbugsArgs includes -html arg when htmlOutput is true 0.008 s
getSpotbugsArgs includes -sarif arg when sarifOutput is true 0.006 s
getSpotbugsArgs includes auxclasspathFromFile when auxClasspathFile is provided 0.007 s
getSpotbugsArgs includes -progress when debug is true 0.006 s
getSpotbugsArgs includes -nested:true when nested is enabled 0.004 s
getSpotbugsArgs includes visitors when set 0.005 s
getSpotbugsArgs includes omitVisitors when set 0.005 s
getSpotbugsArgs includes chooseVisitors when set 0.007 s
getSpotbugsArgs includes -relaxed when relaxed is true 0.005 s
getSpotbugsArgs includes -maxRank when maxRank is set 0.007 s
getSpotbugsArgs includes -noClassOk when noClassOk is true 0.008 s
getSpotbugsArgs includes class directory when it exists 0.004 s
getSpotbugsArgs includes test class directory when includeTests=true and dir exists 0.004 s
getSpotbugsArgs includes addSourceDirs args when addSourceDirs=true 0.013 s
getSpotbugsArgs uses -high threshold parameter 0.003 s
getSpotbugsArgs uses -effort:max when effort is Max 0.003 s
createSpotbugsAuxClasspathFile returns null when classpath elements are null 0.008 s
createSpotbugsAuxClasspathFile returns null when classpath elements are empty 0.008 s
createSpotbugsAuxClasspathFile creates file with filtered classpath 0.018 s
createSpotbugsAuxClasspathFile uses testClasspathElements when includeTests=true 0.019 s
createSpotbugsAuxClasspathFile excludes JARs containing java.* classes 0.038 s
forceFileCreation creates file and parent directories 0.005 s
forceFileCreation replaces an existing file 0.004 s
getEffortParameter returns -effort:min for Min 0.004 s
getEffortParameter returns -effort:default for Default 0.003 s
executeSpotbugs runs a real SpotBugs analysis and writes xml output with bug count 3.172 s
executeSpotbugs writes html and sarif temp output when both are enabled 4.229 s
executeSpotbugs uses toolchain-provided java executable when available 2.306 s
executeSpotbugs includes custom jvmArgs and systemPropertyVariables without error 2.590 s
executeSpotbugs throws MojoExecutionException on timeout 0.471 s
executeSpotbugs throws MojoExecutionException when SpotBugs process fails and failOnError is true 0.143 s
executeSpotbugs does not throw when SpotBugs process fails and failOnError is false 0.145 s
executeSpotbugs writes minimal BugCollection xml when noClassOk=true and analysis produced no output 0.157 s
executeSpotbugs keeps xml temp file when debug is true 0.407 s
executeSpotbugs does not create html or sarif temp files when both outputs disabled 0.178 s

SpotBugsPluginsTraitTest

getEffortParameter returns correct effort string [effort: Max, expected: -effort:max, #0] 0.011 s
getEffortParameter returns correct effort string [effort: Min, expected: -effort:min, #1] 0.001 s
getEffortParameter returns correct effort string [effort: Normal, expected: -effort:default, #2] 0 s
getEffortParameter returns correct effort string [effort: null, expected: -effort:default, #3] 0.001 s
getEffortParameter returns correct effort string 0.029 s
isSpotBugsPlugin returns true for JAR containing findbugs.xml at root 0.013 s
isSpotBugsPlugin returns false for JAR without findbugs.xml 0.008 s
isSpotBugsPlugin returns false for null file 0.002 s
isSpotBugsPlugin returns false for non-JAR file 0.003 s
buildBugTypeUrlMap returns empty map when no plugins are configured 0.010 s
buildBugTypeUrlMap maps bug types from a known plugin using built-in defaults 0.023 s
buildBugTypeUrlMap respects user-supplied URL override for a known plugin 0.010 s
buildBugTypeUrlMap supports user-supplied URL for an unknown plugin 0.010 s
buildBugTypeUrlMap ignores plugin JARs without a configured URL 0.008 s
buildBugTypeUrlMap with pluginArtifacts maps bug types from non-spotbugs artifact 0.012 s
buildBugTypeUrlMap skips artifacts from com.github.spotbugs group 0.008 s
getSpotbugsPlugins returns empty string when no plugins configured 0.005 s
getSpotbugsPlugins includes JAR from pluginList 0.022 s
getSpotbugsPlugins includes plugin JAR from non-spotbugs pluginArtifacts 0.020 s
getSpotbugsPlugins skips pluginArtifacts from com.github.spotbugs group 0.015 s
getSpotbugsPlugins skips non-spotbugs artifact without findbugs.xml 0.015 s
buildBugTypeUrlMap skips non-JAR pluginArtifacts (e.g. XML exclude filter files) 0.005 s
buildBugTypeUrlMap logs warning for corrupt JAR covers catch block 0.008 s
getSpotbugsPlugins with debug logging covers debug paths in pluginList handling 0.017 s

SpotbugsReportGeneratorTest

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

VerifyMojoHarnessTest

executeWithInvalidFailThreshold(VerifyMojo, File) 0.152 s
executeWithBugsWithinMaxAllowedViolations(VerifyMojo, File) 0.153 s
executeWithMissingOutputFile(VerifyMojo, File) 0.144 s
mojoLoadedWithDefaults(VerifyMojo) 0.147 s
executeWithEmptyClassDirectory(VerifyMojo, File) 0.158 s
mojoLoadedSuccessfully(VerifyMojo) 0.119 s
executeWithNoBugsInReport(VerifyMojo, File) 0.100 s
executeWithMissingClassDirectory(VerifyMojo, File) 0.105 s
executeWithBugsAndFailOnError(VerifyMojo, File) 0.110 s
executeWithSkipEnabled(VerifyMojo, File) 0.093 s
executeWithBugsAndNoFailOnError(VerifyMojo, File) 0.099 s

VerifyMojoTest

should extend BaseViolationCheckMojo 0.001 s
should skip execution 0.002 s

XDocsReporterTest

evaluateThresholdParameter returns correct threshold name [input: 1, expected: High, #0] 0.019 s
evaluateThresholdParameter returns correct threshold name [input: 2, expected: Normal, #1] 0 s
evaluateThresholdParameter returns correct threshold name [input: 3, expected: Low, #2] 0 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 s
evaluateThresholdParameter returns correct threshold name [input: 99, expected: Invalid Priority, #5] 0.001 s
evaluateThresholdParameter returns correct threshold name 0.024 s
generateReport writes XML output 0.054 s
generateReport with BugInstance covers bug processing closures 0.027 s
generateReport with debug logging enabled covers debug paths 0.012 s
generateReport with test source roots covers testSourceRoots iteration 0.006 s
XDocsReporter constructor rejects null bundle 0.001 s
XDocsReporter constructor rejects null log 0 s
XDocsReporter constructor rejects null threshold 0.001 s