maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aslak Knutsen (JIRA)" <j...@codehaus.org>
Subject [jira] (SUREFIRE-569) There should be a way to run unit tests from a dependency jar.
Date Sun, 13 Jan 2013 14:35:13 GMT

    [ https://jira.codehaus.org/browse/SUREFIRE-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=317234#comment-317234
] 

Aslak Knutsen commented on SUREFIRE-569:
----------------------------------------

I attempted to change as little existing code as possible to avoid any conflict. (Basically
only extracted some of the DirectoryScanner 'util' methods into ScannerUtil for reuse in DependencyScanner).


One little challenge with this now tho, is that even tho DependencyScanner and DirectoryScanner
use the same includes/excludes/test expressions, they don't share the actual matcher logic.
The Surefire DirectoryScanner hands of the matching to shared.io.DirectoryScanner and I found
no easy way to reuse that logic. Both DirectoryScanner and DependencyScanner in the end use
MatchPatterns, but DirectoryScanner use it via shared.io.DirectoryScanner..

Another oddity is the 'merging' of the DependecyScanner and DirectoryScanner results. Didn't
want to change DefaultScannerResult, but maybe add a method for merge/append or similar to
DefaultScannerResult would be better.
{code}
List combined = new ArrayList();
combined.addAll(scan.getFiles());
combined.addAll(scanDeps.getFiles());
scan = new DefaultScanResult(combined);
{code}
                
> There should be a way to run unit tests from a dependency jar.
> --------------------------------------------------------------
>
>                 Key: SUREFIRE-569
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-569
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Paul Gier
>         Attachments: SUREFIRE-569.patch
>
>
> In some cases it would be useful to have a set of tests that run with various dependency
configurations.  One way to accomplish this would be to have a single project that contains
the unit tests and generates a test jar.  Several test configuration projects could then consume
the unit tests and run them with different dependency sets.  The problem is that there is
no easy way to run tests in a dependency jar.  The surefire plugin should have a configuration
to allow me to run all or a set of unit tests contained in a dependency jar.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message