Fork me on GitHub

Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
212 0 0 0 100% 7.877 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) 190 0 0 0 100% 2.592 s
org.codehaus.mojo.spotbugs 22 0 0 0 100% 5.285 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% 0.296 s
StubOverrideFixerTest 4 0 0 0 100% 0.303 s
BaseViolationCheckMojoTest 22 0 0 0 100% 0.162 s
CheckMojoTest 2 0 0 0 100% 0.003 s
PluginArtifactTest 1 0 0 0 100% 0.033 s
ResourceHelperTest 10 0 0 0 100% 0.100 s
SourceFileIndexerTest 7 0 0 0 100% 0.281 s
SpotBugsAggregateMojoTest 25 0 0 0 100% 0.388 s
SpotBugsGuiTest 2 0 0 0 100% 0.038 s
SpotBugsInfoTest 10 0 0 0 100% 0.008 s
SpotBugsMojoTest 52 0 0 0 100% 0.529 s
SpotBugsPluginsTraitTest 24 0 0 0 100% 0.238 s
SpotbugsReportGeneratorTest 8 0 0 0 100% 0.099 s
VerifyMojoTest 2 0 0 0 100% 0.002 s
XDocsReporterTest 14 0 0 0 100% 0.112 s

org.codehaus.mojo.spotbugs

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

Test Cases

[Summary] [Package List] [Test Cases]

HelpMojoTest

execute completes without error using default parameters 0.201 s
execute with detail=true lists all goals and parameters 0.023 s
execute with a specific goal name does not throw 0.010 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.032 s
execute warns and resets indentSize when it is zero or negative 0.018 s
execute with unknown goal name does not throw 0.005 s

StubOverrideFixerTest

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

BaseViolationCheckMojoTest

should extend AbstractMojo 0.002 s
should have default property values not injected 0.004 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.011 s
execute() exits early when class files directory does not exist 0.005 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.010 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.010 s
execute() throws for invalid failThreshold value 0.008 s
execute() does not throw when all bugs are below failThreshold 0.010 s
execute() does not log individual bugs when quiet=true 0.009 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.009 s
execute() does not fail when errors present but failOnError=false 0.008 s
execute() creates output directory if it does not exist 0.005 s

CheckMojoHarnessTest

executeWithInvalidFailThreshold(CheckMojo, File) 2.547 s
executeWithBugsWithinMaxAllowedViolations(CheckMojo, File) 0.239 s
executeWithMissingOutputFile(CheckMojo, File) 0.139 s
mojoLoadedWithDefaults(CheckMojo) 0.127 s
executeWithEmptyClassDirectory(CheckMojo, File) 0.113 s
executeWithFailThresholdLow(CheckMojo, File) 0.160 s
executeWithNoBugsInReport(CheckMojo, File) 0.128 s
executeWithMissingClassDirectory(CheckMojo, File) 0.103 s
executeWithBugsAndFailOnError(CheckMojo, File) 0.123 s
executeWithSkipEnabled(CheckMojo, File) 0.128 s
executeWithBugsAndNoFailOnError(CheckMojo, File) 0.124 s

CheckMojoTest

should extend BaseViolationCheckMojo 0.001 s
should skip execution 0.002 s

PluginArtifactTest

should satisfy JavaBean contract 0.033 s

ResourceHelperTest

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

SourceFileIndexerTest

buildListSourceFiles and searchActualFilesLocation work as expected 0.228 s
searchActualFilesLocation throws if not initialized 0.001 s
buildListSourceFiles scans nested subdirectories 0.011 s
searchActualFilesLocation returns null when file is not found 0.010 s
buildListSourceFiles indexes test compile source roots 0.011 s
buildListSourceFiles handles non-existent source directories gracefully 0.007 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.013 s
canGenerateReport returns false when XML file exists but is empty 0.014 s
canGenerateReport returns true when at least one reactor project has a non-empty XML 0.016 s
buildAggregatedXml returns null when no reactor projects have XML 0.020 s
buildAggregatedXml merges XML from multiple modules 0.206 s
buildAggregatedXml skips module XML that cannot be parsed 0.025 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.002 s
getOutputName returns spotbugs plugin name 0.001 s
getOutputPath returns spotbugs plugin name 0.002 s
mojo has expected default property values 0.002 s
properties can be set and read back 0.002 s
canGenerateReport returns false and logs info when skip=true 0.009 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.007 s
getDescription returns value from resource bundle for given locale 0.008 s
getName returns value from resource bundle for given locale 0.001 s
getBundle returns a non-null ResourceBundle for the English locale 0.002 s
getOutputDirectory returns the outputDirectory absolute path 0.001 s
setReportOutputDirectory updates the outputDirectory field 0.002 s

SpotBugsGuiTest

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

SpotBugsInfoTest

should have correct static constants 0.001 s
should have correct EOL 0.001 s
should have correct spotbugsEfforts map 0.002 s
should have correct spotbugsThresholds map 0 s
should have correct spotbugsPriority list 0.001 s
should have correct suffix and aggregate key constants 0 s
spotbugsThresholds contains exactly five entries 0.001 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.001 s

SpotBugsMojoTest

should extend AbstractMojo 0.061 s
should skip generate report 0.037 s
containsJdkClasses returns true for a JAR with java.* classes 0.019 s
containsJdkClasses returns false for a JAR without java.* classes 0.020 s
containsJdkClasses returns false for a non-jar path 0.003 s
canGenerateReport returns false when skip=true 0.003 s
canGenerateReport returns false when class directory does not exist 0.004 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.003 s
canGenerateReport returns false when class directory is empty and noClassOk=false and includeTests=true but test dir empty 0.004 s
getOutputName returns spotbugs plugin name 0.001 s
getOutputPath returns spotbugs plugin name 0.001 s
getThresholdParameter returns -high for threshold High 0.006 s
getThresholdParameter returns -experimental for threshold Exp 0.003 s
getThresholdParameter returns -low for threshold Low 0.003 s
getThresholdParameter returns -high for lowercase threshold high 0.003 s
getThresholdParameter returns -medium for unknown threshold 0.003 s
getName returns SpotBugs in English 0.002 s
getDescription returns non-empty description in English 0.001 s
getOutputDirectory returns absolute path of outputDirectory 0.001 s
setReportOutputDirectory sets outputDirectory 0.002 s
isJxrPluginEnabled returns true when xrefLocation exists 0.003 s
isJxrPluginEnabled returns false when xrefLocation missing and no report plugins 0.061 s
isJxrPluginEnabled returns true when maven-jxr-plugin is in report plugins 0.023 s
canGenerateReport with nested=true and JAR covers nested file detection 0.019 s
canGenerateReport covers site lifecycle detection via session goals 0.005 s
getSpotbugsArgs includes basic required args for a simple configuration 0.015 s
getSpotbugsArgs includes -html arg when htmlOutput is true 0.008 s
getSpotbugsArgs includes -sarif arg when sarifOutput is true 0.009 s
getSpotbugsArgs includes auxclasspathFromFile when auxClasspathFile is provided 0.007 s
getSpotbugsArgs includes -progress when debug is true 0.005 s
getSpotbugsArgs includes -nested:true when nested is enabled 0.005 s
getSpotbugsArgs includes visitors when set 0.006 s
getSpotbugsArgs includes omitVisitors when set 0.005 s
getSpotbugsArgs includes chooseVisitors when set 0.005 s
getSpotbugsArgs includes -relaxed when relaxed is true 0.004 s
getSpotbugsArgs includes -maxRank when maxRank is set 0.005 s
getSpotbugsArgs includes -noClassOk when noClassOk is true 0.007 s
getSpotbugsArgs includes class directory when it exists 0.006 s
getSpotbugsArgs includes test class directory when includeTests=true and dir exists 0.005 s
getSpotbugsArgs includes addSourceDirs args when addSourceDirs=true 0.015 s
getSpotbugsArgs uses -high threshold parameter 0.004 s
getSpotbugsArgs uses -effort:max when effort is Max 0.004 s
createSpotbugsAuxClasspathFile returns null when classpath elements are null 0.012 s
createSpotbugsAuxClasspathFile returns null when classpath elements are empty 0.012 s
createSpotbugsAuxClasspathFile creates file with filtered classpath 0.027 s
createSpotbugsAuxClasspathFile uses testClasspathElements when includeTests=true 0.021 s
createSpotbugsAuxClasspathFile excludes JARs containing java.* classes 0.034 s
forceFileCreation creates file and parent directories 0.004 s
forceFileCreation replaces an existing file 0.004 s
getEffortParameter returns -effort:min for Min 0.003 s
getEffortParameter returns -effort:default for Default 0.002 s

SpotBugsPluginsTraitTest

getEffortParameter returns correct effort string [effort: Max, expected: -effort:max, #0] 0.016 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.001 s
getEffortParameter returns correct effort string [effort: null, expected: -effort:default, #3] 0.001 s
getEffortParameter returns correct effort string 0.033 s
isSpotBugsPlugin returns true for JAR containing findbugs.xml at root 0.014 s
isSpotBugsPlugin returns false for JAR without findbugs.xml 0.008 s
isSpotBugsPlugin returns false for null file 0.001 s
isSpotBugsPlugin returns false for non-JAR file 0.002 s
buildBugTypeUrlMap returns empty map when no plugins are configured 0.007 s
buildBugTypeUrlMap maps bug types from a known plugin using built-in defaults 0.021 s
buildBugTypeUrlMap respects user-supplied URL override for a known plugin 0.009 s
buildBugTypeUrlMap supports user-supplied URL for an unknown plugin 0.008 s
buildBugTypeUrlMap ignores plugin JARs without a configured URL 0.007 s
buildBugTypeUrlMap with pluginArtifacts maps bug types from non-spotbugs artifact 0.019 s
buildBugTypeUrlMap skips artifacts from com.github.spotbugs group 0.009 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.017 s
getSpotbugsPlugins skips pluginArtifacts from com.github.spotbugs group 0.009 s
getSpotbugsPlugins skips non-spotbugs artifact without findbugs.xml 0.009 s
buildBugTypeUrlMap skips non-JAR pluginArtifacts (e.g. XML exclude filter files) 0.003 s
buildBugTypeUrlMap logs warning for corrupt JAR covers catch block 0.004 s
getSpotbugsPlugins with debug logging covers debug paths in pluginList handling 0.012 s

SpotbugsReportGeneratorTest

generateReport calls all main report sections 0.063 s
getBugDetailsUrl returns default SpotBugs URL when bugTypeUrlMap is empty 0.002 s
getBugDetailsUrl returns mapped URL for a known addon bug type 0.008 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.014 s
generateReport with debug logging enabled covers debug paths 0.010 s
SpotbugsReportGenerator constructor rejects null sink 0.001 s
SpotbugsReportGenerator constructor rejects null bundle 0 s

VerifyMojoHarnessTest

executeWithInvalidFailThreshold(VerifyMojo, File) 0.119 s
executeWithBugsWithinMaxAllowedViolations(VerifyMojo, File) 0.111 s
executeWithMissingOutputFile(VerifyMojo, File) 0.105 s
mojoLoadedWithDefaults(VerifyMojo) 0.083 s
executeWithEmptyClassDirectory(VerifyMojo, File) 0.091 s
mojoLoadedSuccessfully(VerifyMojo) 0.088 s
executeWithNoBugsInReport(VerifyMojo, File) 0.105 s
executeWithMissingClassDirectory(VerifyMojo, File) 0.101 s
executeWithBugsAndFailOnError(VerifyMojo, File) 0.093 s
executeWithSkipEnabled(VerifyMojo, File) 0.082 s
executeWithBugsAndNoFailOnError(VerifyMojo, File) 0.087 s

VerifyMojoTest

should extend BaseViolationCheckMojo 0.001 s
should skip execution 0.001 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.001 s
evaluateThresholdParameter returns correct threshold name [input: 4, expected: Exp, #3] 0 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 s
evaluateThresholdParameter returns correct threshold name 0.023 s
generateReport writes XML output 0.035 s
generateReport with BugInstance covers bug processing closures 0.014 s
generateReport with debug logging enabled covers debug paths 0.012 s
generateReport with test source roots covers testSourceRoots iteration 0.005 s
XDocsReporter constructor rejects null bundle 0.001 s
XDocsReporter constructor rejects null log 0.001 s
XDocsReporter constructor rejects null threshold 0.001 s