Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
234 0 0 0 100% 2.29

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
org.codecop.pmd.prototype 32 0 0 0 100% 0.39
org.codecop.pmd.constraints 39 0 0 0 100% 0.37
org.codecop.pmd.rule 163 0 0 0 100% 1.53

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

org.codecop.pmd.prototype

Class Tests Errors Failures Skipped Success Rate Time
PrototypeRulesTest 32 0 0 0 100% 0.39

org.codecop.pmd.constraints

Class Tests Errors Failures Skipped Success Rate Time
ConstraintsRulesTest 39 0 0 0 100% 0.37

org.codecop.pmd.rule

Class Tests Errors Failures Skipped Success Rate Time
CodeCopRulesTest 163 0 0 0 100% 1.53

Test Cases

[Summary] [Package List] [Test Cases]

ConstraintsRulesTest

LooongIdentifiers::0 Long class name, method name, field name, parameter name, local name. 0.01
LooongIdentifiers::1 Short package, class name, method name, field name, parameter name, local name. 0.01
LooongIdentifiers::2 Short enum names. 0.01
LooongIdentifiers::3 Short multiple packages. 0.01
LooongIdentifiers::4 Short exception, short try-resource. 0.01
NoConditionals::0 if, bad 0.01
NoElseKeyword::0 no else, all ok 0.01
NoElseKeyword::1 else, bad 0
NoGetterAndSetter::0 getter and setter, bad 0.01
NoGetterAndSetter::1 factory method is no getter (false positive) 0.01
NoGetterAndSetter::2 default factory method is no getter (false positive) 0.01
NoGetterAndSetter::3 qualified field access 0.01
NoGetterAndSetter::4 simple expressions 0.01
NoLoops::0 loops, bad 0.01
NoStaticFields::0 static fields are flagged 0.01
NoStaticFields::1 non static field is ok 0
NoStaticMethods::0 non static method 0.01
NoStaticMethods::1 static method 0.01
NoVoidMethods::0 void method, bad 0.01
NoVoidMethods::1 non-void method, ok 0.01
NoVoidMethods::2 special method is ok 0.01
NoVoidMethods::3 JUnit tests are ok 0.02
NoVoidMethods::4 assertions are ok 0.01
OnlyMapsAsParameters::0 Constructor and method uses Map. 0.01
OnlyMapsAsParameters::1 Object methods are allowed. 0.01
OnlyMapsAsParameters::2 Private code is not checked. 0.01
OnlyMapsAsParameters::3 Public non single Map methods are found. 0.01
OnlyStaticFields::0 all fields are static and well 0.01
OnlyStaticFields::1 non static field is flagged 0.01
OnlyStaticMethods::0 non static method 0.01
OnlyStaticMethods::1 static method, ok 0.01
OnlyStaticMethods::2 non-static Object method, ok 0.01
OnlyVoidMethods::0 non void method, bad 0
OnlyVoidMethods::1 void method, ok 0.01
OnlyVoidMethods::2 non-void Object method, ok 0.01
ShortStatements::0 short line/statement. 0.01
ShortStatements::1 long statements, wrapped or not. 0.01
ShortStatements::2 long declarations. 0.01
ShortStatements::3 exactly allowed line/statement length, intended. 0.01

PrototypeRulesTest

ActionHasNoShortName::0 typo occured 0.16
ActionHasNoShortName::1 all is well 0.01
ActionHasNoShortName::2 is abstract 0.01
ActionHasNoShortName::3 other type 0.01
Call4MethodNotInPackage::0 wrong package to call 0.02
Call4MethodNotInPackage::1 proper package 0.01
CommitInDBLayer::0 wrong package to call commit 0.01
CommitInDBLayer::1 all is well 0.01
CustomLoggerIsNotStaticFinal::0 ok 0.01
CustomLoggerIsNotStaticFinal::1 two bad loggers 0
CustomLoggerIsNotStaticFinal::2 ok with internal class 0.01
CustomLoggerIsNotStaticFinal::3 ok with local var 0.01
EmptyFunction::0 returns null 0
EmptyFunction::1 ok 0.01
EntityWithReferences::0 ok, a class which is no Entity 0.01
EntityWithReferences::1 ok, an Entity with RelationShips 0.01
EntityWithReferences::2 bad, an Entity which contains MyString 0.01
ImmutableValueObject::0 ok, a class which is no ValueObject 0
ImmutableValueObject::1 ok, an ValueObject with fields 0.01
ImmutableValueObject::2 bad, a ValueObject which contains setter and RelationShip. 0
JUnitTestHasWrongName::0 this does not end with Test 0.01
JUnitTestHasWrongName::1 is abstract, name as it likes 0.01
JUnitTestHasWrongName::2 ok 0
MoreThanOneCustomLogger::0 ok 0.01
MoreThanOneCustomLogger::1 two loggers 0.01
NewEnumOnlyInside::0 creation in other Enum is forbidden 0
NewEnumOnlyInside::1 all is well 0.01
NewEnumOnlyInside::2 array is ok 0
NoAttrInClass::0 non final field 0.01
NoAttrInClass::1 all is well 0
NoAttrInClass::2 other class 0.01
TypeNotAllowed::0 use of forbidden type 0

CodeCopRulesTest

AtomWrapperInstantiation::0 new Byte(), bad 0.01
AtomWrapperInstantiation::1 Byte.valueOf(), ok 0.01
AtomWrapperInstantiation::2 new Short(), bad 0.01
AtomWrapperInstantiation::3 Short.valueOf(), ok 0.01
AtomWrapperInstantiation::4 new Integer(), bad 0.01
AtomWrapperInstantiation::5 Integer.valueOf(), ok 0.01
AtomWrapperInstantiation::6 new Long(), bad 0.01
AtomWrapperInstantiation::7 Long.valueOf(), ok 0.01
AtomWrapperInstantiation::8 new Character(), bad 0.01
AtomWrapperInstantiation::9 Character.valueOf(), ok 0.01
AvoidClassNamingImpl::0 wrong name 0.01
AvoidClassNamingImpl::1 all is well 0.01
AvoidPrivateGetterAndSetter::0 private setter 0.01
AvoidPrivateGetterAndSetter::1 private getter 0.01
AvoidPrivateGetterAndSetter::2 all is well 0.02
AvoidThrowingCheckedException::0 throw checked Exception, bad 0.01
AvoidThrowingCheckedException::1 subclass of unchecked Exception, ok 0.01
AvoidThrowingCheckedException::2 RuntimeException, ok 0.01
AvoidThrowingCheckedException::3 subclass of Error, ok 0
AvoidThrowingCheckedException::4 Error, ok 0.01
AvoidThrowingCheckedException::5 any allocation, ok 0.02
CharInstantiation::0 new Character(), bad 0.01
CharInstantiation::1 Character.valueOf(), ok 0.01
ClassNamingConventions::0 class names should not start with lowercase character 0.01
ClassNamingConventions::1 all is well 0
ClassNamingConventions::2 uppercase is ok for short abbrevs 0.01
ClassNamingConventions::3 must not be uppercase only 0.01
ClassNamingConventions::4 must not contain $ 0.01
ClassNamingConventions::5 must not contain underscore 0.01
ClassNamingConventions::6 must not contain underscore but RMI stubs 0.01
DontImportWild::0 wrong usage 0.01
DontImportWild::1 all is well 0.01
DontImportWild::2 package-info should not crash Xpath 0.01
DontImportWild::3 should not crash Xpath 0.01
ExcessiveClassCount::0 single class 0.01
ExcessiveClassCount::1 single compilation unit has too many classes 0.01
FirstClassCollections::0 only single collection in class 0.01
FirstClassCollections::1 single collection with constant 0.01
FirstClassCollections::2 collection with other field 0.01
FirstClassCollections::3 array with other field 0.01
ImmutablesOnly::0 all fields are final and well 0.01
ImmutablesOnly::1 mutable class is flagged 0.01
ImmutablesOnly::2 mutable static data is flagged 0.01
InterfaceNamesEndWithIF::0 wrong name 0.01
InterfaceNamesEndWithIF::1 all is well 0.01
InterfaceNamesStartWithI::0 wrong name 0.01
InterfaceNamesStartWithI::1 all is well 0.01
JUnitTestsShouldIncludeAssertOrVerify::0 Contains 3.x assert 0.01
JUnitTestsShouldIncludeAssertOrVerify::1 Missing assert 0.01
JUnitTestsShouldIncludeAssertOrVerify::2 Setup does not need assert 0
JUnitTestsShouldIncludeAssertOrVerify::3 Two wrong tests 3.x 0.01
JUnitTestsShouldIncludeAssertOrVerify::4 Contains fail 0.01
JUnitTestsShouldIncludeAssertOrVerify::5 One wrong, one ok. 0.01
JUnitTestsShouldIncludeAssertOrVerify::6 Skip interfaces 0.01
JUnitTestsShouldIncludeAssertOrVerify::7 Skip abstract methods 0.01
JUnitTestsShouldIncludeAssertOrVerify::8 Another abstract case 0.01
JUnitTestsShouldIncludeAssertOrVerify::9 BUG 1105633 - False +: JUnit testcases could have fail() instead of assert 0.01
JUnitTestsShouldIncludeAssertOrVerify::10 BUG 1146116 PMDException with inner interfaces 0.01
JUnitTestsShouldIncludeAssertOrVerify::11 skip static test methods 0.01
JUnitTestsShouldIncludeAssertOrVerify::12 exceptions shouldn't block it 0.01
JUnitTestsShouldIncludeAssertOrVerify::13 Not a JUnit test (exceptions shouldn't block it) 0.01
JUnitTestsShouldIncludeAssertOrVerify::14 JUnit 4 test (exceptions shouldn't block it) 0.01
JUnitTestsShouldIncludeAssertOrVerify::15 Junit 4 static import 0.01
JUnitTestsShouldIncludeAssertOrVerify::16 Junit 4 test using Assert.assert... 0.01
JUnitTestsShouldIncludeAssertOrVerify::17 #968 Issues with JUnit4 @Test annotation with expected exception 0.01
JUnitTestsShouldIncludeAssertOrVerify::18 Junit 4 test using verify or Mockito.verify... 0.01
JUnitTestsShouldIncludeAssertOrVerify::19 Junit 4 test using Fest Assertions... 0.01
JUnitTestsShouldIncludeAssertOrVerify::20 Missing JUnit 4 assert 0.01
JUnitTestsShouldIncludeAssertOrVerify::21 Bug: Missing assert with timeout (this was a bug in PMD 5.0.1, fixed in 5.0.5, maybe earlier) 0.01
JUnitTestsShouldIncludeAssertOrVerify::22 Missing assert but expects exception 0.01
JUnitTestsShouldIncludeAssertOrVerify::23 Missing assert but uses ExpectedException rule 0.01
JumbledIterator::0 Non matching iterator identifier found in for loop 0.01
JumbledIterator::1 all is well 0.01
JunitSetupDoesNotCallSuper::0 super is missing 0.01
JunitSetupDoesNotCallSuper::1 all is well 0.01
LoggerHasWrongCategory::0 wrong class 0.01
LoggerHasWrongCategory::1 wrong class directly used 0.01
LoggerHasWrongCategory::2 all is well 0.01
LoggerHasWrongCategory::3 no logger, no problems 0
MembersMustBePrivate::0 public fields 0
MembersMustBePrivate::1 all is well 0.01
MutableException::0 all is well 0.01
MutableException::1 mutable Error is flagged 0.01
MutableException::2 mutable Exception is flagged 0.01
MutableException::3 some other class is not concerned 0.01
NoCasts::0 found a cast 0.01
NoCasts::1 precision truncate 0.01
NoCasts::2 cast in equals is necessary 0.01
NonFinalFieldInException::0 non final serialVersionUID 0.01
NonFinalFieldInException::1 non final static serialVersionUID 0.01
NonFinalFieldInException::2 all is well 0
OneLevelOfIntention::0 All not nested constructs are ok 0.01
OneLevelOfIntention::1 nested blocks, bad 0
OneLevelOfIntention::2 switch nested blocks, bad 0.01
OneLevelOfIntention::3 bug: statements at beginning and end are allowed 0.01
OneLevelOfIntention::4 deeply nested blocks, bad 0.01
ParameterNameWithP::0 no p in name in ctor 0.01
ParameterNameWithP::1 no p in name in method 0.01
ParameterNameWithP::2 all is well 0.01
ParameterNameWithP::3 short is ok 0.01
ParameterNameWithP::4 no upper letter after p 0.01
PrimitiveObsession::0 Strings in method 0.01
PrimitiveObsession::1 int in method 0.01
PrimitiveObsession::2 primitive array in method 0
PrimitiveObsession::3 array in method 0.01
PrimitiveObsession::4 collections in method 0.01
PrimitiveObsession::5 BigInteger, BigDecimal 0.01
PrimitiveObsession::6 all is well, a real value object 0.01
PrimitiveObsession::7 private constructors and methods can do anything. 0.01
PrimitiveObsession::8 primitive return types only in plain getters, no parameters 0.01
PrimitiveObsession::9 private constructors with too many arguments, can do anything. 0
PrimitiveObsession::10 constructor can take everything because we need to wrap it inside, e.g. Coordinate(int, int) 0.01
PrimitiveObsession::11 equals method must be allowed for containers. 0.01
PrimitiveObsession::12 wrong equals method uses primitive. 0.01
PrimitiveObsession::13 constructor with too many arguments, not checked by default 0.01
PrimitiveObsession::14 property test constructors: with too many arguments 0.01
PrimitiveObsession::15 property test constructors: only one argument is needed for value object 0
PrimitiveObsession::16 Object is allowed in default 0.01
PrimitiveObsession::17 property no object: Object is primitive 0.01
PrimitiveObsession::18 property no object: another instance is ok 0.01
PrimitiveObsession::19 compare method needs to use primitive. 0.01
PrimitiveObsession::20 Wrong compare method must not uses primitive. 0.01
PrimitiveObsession::21 Comparator needs to use primitive. 0.01
PrimitiveObsession::22 similar to Comparator, must not use primitives. 0
PrimitiveObsession::23 Comparator but missing interface, must not use primitives. 0
PrivateInjections::0 wrong usage 0.01
PrivateInjections::1 all is well 0.01
PrivateInjections::2 mixed case is well 0.01
ShortVariableCustom::0 param 0.01
ShortVariableCustom::1 none 0.01
ShortVariableCustom::2 local 0.01
ShortVariableCustom::3 for 0
ShortVariableCustom::4 field 0.01
ShortVariableCustom::5 catch(Exception e) is OK 0.01
SignatureDeclareThrowsException::0 method throws Exception 0.01
SignatureDeclareThrowsException::1 ok 0.01
SignatureDeclareThrowsException::2 constructor throws Exception 0.01
SignatureDeclareThrowsException::3 skip junit setUp method 0.01
SignatureDeclareThrowsException::4 skip junit tearDown method 0
SignatureDeclareThrowsException::5 outside tests, flag setUp method 0.01
SignatureDeclareThrowsException::6 Generics 0.01
SignatureDeclareThrowsException::7 don't skip any method starting with 'test' 0.01
SignatureDeclareThrowsException::8 skip Spring onSetUp method 0.01
SignatureDeclareThrowsException::9 understand junit 4 import 0.01
SignatureDeclareThrowsException::10 method throws specific Exception 0
SignatureDeclareThrowsException::11 method throws Error 0.01
SignatureDeclareThrowsException::12 constructor OK 0.01
TestNameShouldStartWithShould::0 No test. 0.02
TestNameShouldStartWithShould::1 Test with method named differently 0.01
TestNameShouldStartWithShould::2 Test with method named should 0.01
TooManyInterfaceMethods::0 less methods than given 0.01
TooManyInterfaceMethods::1 more methods than given 0.02
TooManyInterfaceMethods::2 methods in class 0.01
TooManyPublicMethods::0 less methods than given 0.01
TooManyPublicMethods::1 more methods than given 0.01
TooManyPublicMethods::2 more methods in inner class 0
UnintendedEnvUsage::0 wrong usage 0.02
UnintendedEnvUsage::1 all is well 0.01
ZeroLevelOfIntention::0 One level alone, ok 0.02
ZeroLevelOfIntention::1 nested blocks, bad 0.01
ZeroLevelOfIntention::2 block not first statement, bad (maybe too strict) 0.01
ZeroLevelOfIntention::3 block not last statement, bad (maybe too strict) 0.01
ZeroLevelOfIntention::4 multiple blocks in sequence, bad 0.01