New Check: NameConvensionForTests #80

Closed
romani opened this Issue Nov 3, 2012 · 2 comments

Projects

None yet

5 participants

@romani
Member
romani commented Nov 3, 2012

Force Tests to follow naming convention.
Ground: maven do not run tests that are not following naming convention (http://stackoverflow.com/questions/6178583/maven-does-not-find-junit-tests-to-run).
Requirement: Force classes having unit tests to follow naming convention - class should be named "Test_", "_Test", "_TestCase" or "_IT" (the latter is for integration tests)
Criteria: Class is considered to have tests if it has methods annotated with "@Test" or it extends other class that follows naming convention.

@GeorgeSergeev GeorgeSergeev was assigned Feb 7, 2013
@denant0 denant0 was assigned Mar 18, 2013
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Sep 28, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented 5838fc1
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Sep 28, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented f46efc6
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Sep 28, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented 7806fcf
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Sep 30, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented 2efba65
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Oct 1, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented 4ef78a3
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Oct 3, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented 6b0ba30
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Oct 3, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented fe5aa90
@denant0 denant0 added a commit to denant0/sevntu.checkstyle that referenced this issue Oct 8, 2013
@denant0 denant0 Fixes #80. NameConventionForTestsCheck was implemented bc7f18a
@denant0 denant0 was unassigned by romani Feb 11, 2014
@daniilyar daniilyar added easy and removed enhancement labels Aug 15, 2014
@alex-zuy alex-zuy was assigned by daniilyar Sep 12, 2014
@alex-zuy
Contributor

I think that current implementation is unfinished. I think that check should provide opportunity to configure set of annotations for class, methods and field definitions as separate options.
mClassAnnotationRegex - annotations for class definitions
mMethodAnnotationRegex - annotations for method definitions
mFieldAnnotationRegex - annotations for field definitions

@daniilyar
Member

I think that current implementation is unfinished
What does current implementation miss?

I think that check should provide opportunity to configure set of annotations for class, methods and field definitions as separate options.
I am not sure. Are you talking about JUnt4-related annotations only? What exact annotation do you presuppose and could you, please, give an examples for every option? I mean, please provide list of annotations (default values) for every option which, as you think, would be the best. We will discuss them.

@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Oct 10, 2014
@alex-zuy alex-zuy New check NameConventionForJUnit4TestClassesCheck added. Fixes #80. ac9ce42
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Oct 10, 2014
@alex-zuy alex-zuy New check NameConventionForJUnit4TestClassesCheck added. Fixes #80. 016479b
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Oct 10, 2014
@alex-zuy alex-zuy Made UT inputs for issue #80 compilable 8ed3fc2
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Oct 14, 2014
@alex-zuy alex-zuy New check NameConventionForJUnit4TestClassesCheck added. Fixes #80. 560db60
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Oct 14, 2014
@alex-zuy alex-zuy Fixed UTs for issue #80 9d2b9ee
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Oct 14, 2014
@alex-zuy alex-zuy Fixed UTs for issue #80 799748b
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Nov 28, 2014
@alex-zuy alex-zuy New check NameConventionForJUnit4TestClassesCheck added. Fixes #80. ad6af1b
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Nov 28, 2014
@alex-zuy alex-zuy Fixed UTs for issue #80 ddab336
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Dec 3, 2014
@alex-zuy alex-zuy New check NameConventionForJUnit4TestClassesCheck added. Fixes #80. 9464a0f
@alex-zuy alex-zuy added a commit to alex-zuy/sevntu.checkstyle that referenced this issue Dec 23, 2014
@alex-zuy alex-zuy New Check NameConventionForJunit4TestClassesCheck implemented. Fixes #80
3e85a57
@romani romani closed this in d2c4c45 Jan 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment