[jira] (SUREFIRE-620) Ability to access manifest resource while running unit tests
[ https://jira.codehaus.org/browse/SUREFIRE-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tibor Digana updated SUREFIRE-620: -- Assignee: (was: Tibor Digana) > Ability to access manifest resource while running unit tests > > > Key: SUREFIRE-620 > URL: https://jira.codehaus.org/browse/SUREFIRE-620 > Project: Maven Surefire > Issue Type: Improvement > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.5 > Environment: n/a >Reporter: Ernst de Haan >Priority: Minor > > Use case: > - my code calls getClass().getPackage().getImplementationVersion() to > determine the version specified in the manifest > - I would like to test this code, for example making sure the returned string > is not null > Currently, when I run "mvn test" it does not generate the JAR, nor does it > not make the META-INF/MANIFEST.MF file available in the classpath. > First question is whether this is a *unit* test or an *integration* test. I > would say a unit test, because no other code bases are involved, this should > be within a single module, and not testing any dependencies. > Secondly, is the test valid at all if it uses a resource. I would say "yes", > because it is even standard functionality offered by J2SE and I consider this > a good approach to determining meta data from the codebase self. > Thirdly, should the Surefire plugin depend on the JAR being created or should > it just generate the manifest (and copy/generate other resources?) and stick > them where the compiled classes go? -- This message was sent by Atlassian JIRA (v6.1.6#6162)
[jira] (SUREFIRE-620) Ability to access manifest resource while running unit tests
[ https://jira.codehaus.org/browse/SUREFIRE-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tibor Digana closed SUREFIRE-620. - Resolution: Not A Bug Closed upon the discussion http://maven.40175.n5.nabble.com/SUREFIRE-List-of-simple-issues-to-fix-td5814089.html > Ability to access manifest resource while running unit tests > > > Key: SUREFIRE-620 > URL: https://jira.codehaus.org/browse/SUREFIRE-620 > Project: Maven Surefire > Issue Type: Improvement > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.5 > Environment: n/a >Reporter: Ernst de Haan >Assignee: Tibor Digana >Priority: Minor > > Use case: > - my code calls getClass().getPackage().getImplementationVersion() to > determine the version specified in the manifest > - I would like to test this code, for example making sure the returned string > is not null > Currently, when I run "mvn test" it does not generate the JAR, nor does it > not make the META-INF/MANIFEST.MF file available in the classpath. > First question is whether this is a *unit* test or an *integration* test. I > would say a unit test, because no other code bases are involved, this should > be within a single module, and not testing any dependencies. > Secondly, is the test valid at all if it uses a resource. I would say "yes", > because it is even standard functionality offered by J2SE and I consider this > a good approach to determining meta data from the codebase self. > Thirdly, should the Surefire plugin depend on the JAR being created or should > it just generate the manifest (and copy/generate other resources?) and stick > them where the compiled classes go? -- This message was sent by Atlassian JIRA (v6.1.6#6162)
[jira] (SUREFIRE-620) Ability to access manifest resource while running unit tests
[ https://jira.codehaus.org/browse/SUREFIRE-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tibor Digana reassigned SUREFIRE-620: - Assignee: Tibor Digana > Ability to access manifest resource while running unit tests > > > Key: SUREFIRE-620 > URL: https://jira.codehaus.org/browse/SUREFIRE-620 > Project: Maven Surefire > Issue Type: Improvement > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.5 > Environment: n/a >Reporter: Ernst de Haan >Assignee: Tibor Digana >Priority: Minor > > Use case: > - my code calls getClass().getPackage().getImplementationVersion() to > determine the version specified in the manifest > - I would like to test this code, for example making sure the returned string > is not null > Currently, when I run "mvn test" it does not generate the JAR, nor does it > not make the META-INF/MANIFEST.MF file available in the classpath. > First question is whether this is a *unit* test or an *integration* test. I > would say a unit test, because no other code bases are involved, this should > be within a single module, and not testing any dependencies. > Secondly, is the test valid at all if it uses a resource. I would say "yes", > because it is even standard functionality offered by J2SE and I consider this > a good approach to determining meta data from the codebase self. > Thirdly, should the Surefire plugin depend on the JAR being created or should > it just generate the manifest (and copy/generate other resources?) and stick > them where the compiled classes go? -- This message was sent by Atlassian JIRA (v6.1.6#6162)
[jira] (SUREFIRE-620) Ability to access manifest resource while running unit tests
[ https://jira.codehaus.org/browse/SUREFIRE-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=356062#comment-356062 ] Tibor Digana commented on SUREFIRE-620: --- Any objections to close this issue? IMHO you should use maven-failsafe-plugin instead. The IT tests are supposed to test *.jar package instead of classes and test-classes. You may probably find already reported bug that failsafe again uses classes instead of package. It should be fixed and this closed. > Ability to access manifest resource while running unit tests > > > Key: SUREFIRE-620 > URL: https://jira.codehaus.org/browse/SUREFIRE-620 > Project: Maven Surefire > Issue Type: Improvement > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.5 > Environment: n/a >Reporter: Ernst de Haan >Priority: Minor > > Use case: > - my code calls getClass().getPackage().getImplementationVersion() to > determine the version specified in the manifest > - I would like to test this code, for example making sure the returned string > is not null > Currently, when I run "mvn test" it does not generate the JAR, nor does it > not make the META-INF/MANIFEST.MF file available in the classpath. > First question is whether this is a *unit* test or an *integration* test. I > would say a unit test, because no other code bases are involved, this should > be within a single module, and not testing any dependencies. > Secondly, is the test valid at all if it uses a resource. I would say "yes", > because it is even standard functionality offered by J2SE and I consider this > a good approach to determining meta data from the codebase self. > Thirdly, should the Surefire plugin depend on the JAR being created or should > it just generate the manifest (and copy/generate other resources?) and stick > them where the compiled classes go? -- This message was sent by Atlassian JIRA (v6.1.6#6162)