You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/04/21 17:29:51 UTC

[jira] Created: (SLING-1495) Make the Sling integration test cases available as a dependency

Make the Sling integration test cases available as a dependency
---------------------------------------------------------------

                 Key: SLING-1495
                 URL: https://issues.apache.org/jira/browse/SLING-1495
             Project: Sling
          Issue Type: Improvement
          Components: Testing
            Reporter: Jukka Zitting
            Priority: Minor


Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.

It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated SLING-1495:
---------------------------------

    Attachment: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch

See the attached patch for a first shot at doing this. The patch adds an assembly for the test classes and resources in org.apache.sling.launchpad.testing.

A better approach would be to split the test classes to a separate component that org.apache.sling.launchpad.testing could then depend on.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874625#action_12874625 ] 

Jukka Zitting commented on SLING-1495:
--------------------------------------

Ping.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston reassigned SLING-1495:
---------------------------------

    Assignee: Ian Boston

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston resolved SLING-1495.
-------------------------------

    Fix Version/s: Launchpad Testing 6
       Resolution: Fixed

The classes have been moved and are now available as 

   <groupId>org.apache.sling</groupId>
  <artifactId>org.apache.sling.launchpad.integration-tests</artifactId>
  <version>0.0.1-SNAPSHOT</version>


> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>             Fix For: Launchpad Testing 6
>
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874642#action_12874642 ] 

Jukka Zitting commented on SLING-1495:
--------------------------------------

I'd actually be happier with a separate test project. I can take a shot at creating a patch for that as well, but it may be better if someone with Sling commit access takes care of that since svn moves can't be expressed properly in a patch.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874644#action_12874644 ] 

Justin Edelson edited comment on SLING-1495 at 6/2/10 12:25 PM:
----------------------------------------------------------------

> How much disruption would it represent to people to split out the test classes ?
Ideally, none :)

> Its just as easy to do as to apply the patch, I am happy either way.
I'm not sure about this. AFAIK, the way surefire detects classes to run is by scanning the test source directory. This directory (in launchpad.testing) will be empty. What has to be done is the creation of some test suites in the new tests project and then a trivial invocation of this from the testing module.

This is basically what Jackrabbit does. http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi2dav/src/test/java/org/apache/jackrabbit/test/TestAll.java references tests in (test-scoped) dependencies. But without this suite, the tests wouldn't be invoked.

      was (Author: justinedelson):
    > How much disruption would it represent to people to split out the test classes ?
Ideally, none :)

> Its just as easy to do as to apply the patch, I am happy either way.
I'm not sure about this. AFAIK, the way surefire detects classes to run is by scanning the test source directory. This directory (in launchpad.testing) will be empty. What has to be done is the creation of some test suites in the new tests project and then a trivial invocation of this from the testing module.

This is basically what Jackrabbit does. http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi2dav/src/test/java/org/apache/jackrabbit/test/TestAll.java references tests on the classpath. But without this suite, the tests wouldn't be invoked.
  
> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874633#action_12874633 ] 

Justin Edelson commented on SLING-1495:
---------------------------------------

I'd rather see the former solution (splitting the test classes out into a separate project).

I guess applying this patch as a short term solution is OK, but let's keep it open until a separate project has been created.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874761#action_12874761 ] 

Justin Edelson commented on SLING-1495:
---------------------------------------

Not to be overly cavalier about this, but... if the tests run and pass then I say commit away.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874759#action_12874759 ] 

Ian Boston commented on SLING-1495:
-----------------------------------

Here is a patch that moves all the test classes out.


http://codereview.appspot.com/1425042

Unfortunately codereview cant really cope with the patch set (too big) so here are the bits that matter, and the App Engine its on appears to be struggling.

All classes and resources moved from testing to a new project integration-tests

http://codereview.appspot.com/1425042/patch/1/67003   (testing/pom.xml)
http://codereview.appspot.com/1425042/patch/1/55006  ( a new TestAll class)
http://codereview.appspot.com/1425042/patch/1/4001 (a new integration-tests/pom.xml)


It uses a TestSuite that scans the classpath with the same pattern as used by the Surefire plugin. It has to use a non manifest only jar to make the classpath visible to the test suite when it starts up.

At the moment there are 2 things to do.
1. Check that the pattern used to select the classes gets correctly converted into a regex for the scan (from the command line)
2. Fix the integration tests that were assuming a location of files on the file system, rather than files from the classpath. (about 4)

One other impact of this change. All the test cases happen in a single Suite, so it all logs to a single file. I dont know if thats desirable, but I have found it easier to locate failing tests in use.


I will fix the other problems, 
If anyone can see a reason not to do this please shout. (thanks)


> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874773#action_12874773 ] 

Ian Boston commented on SLING-1495:
-----------------------------------

Ok, done, its in 2 commits.
Just testing again locally to make 100% certain all is ok.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874644#action_12874644 ] 

Justin Edelson commented on SLING-1495:
---------------------------------------

> How much disruption would it represent to people to split out the test classes ?
Ideally, none :)

> Its just as easy to do as to apply the patch, I am happy either way.
I'm not sure about this. AFAIK, the way surefire detects classes to run is by scanning the test source directory. This directory (in launchpad.testing) will be empty. What has to be done is the creation of some test suites in the new tests project and then a trivial invocation of this from the testing module.

This is basically what Jackrabbit does. http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi2dav/src/test/java/org/apache/jackrabbit/test/TestAll.java references tests on the classpath. But without this suite, the tests wouldn't be invoked.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1495) Make the Sling integration test cases available as a dependency

Posted by "Ian Boston (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874637#action_12874637 ] 

Ian Boston commented on SLING-1495:
-----------------------------------

How much disruption would it represent to people to split out the test classes ?
Its just as easy to do as to apply the patch, I am happy either way.

> Make the Sling integration test cases available as a dependency
> ---------------------------------------------------------------
>
>                 Key: SLING-1495
>                 URL: https://issues.apache.org/jira/browse/SLING-1495
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Jukka Zitting
>            Assignee: Ian Boston
>            Priority: Minor
>         Attachments: 0001-SLING-1495-Make-the-Sling-integration-test-cases-av.patch
>
>
> Currently the integration tests in launchpad/testing are designed so that you'll need to manually run that Maven build with specific options if you want to test an external Sling instance.
> It would be great if a downstream project could instead import those test cases as a test dependency to their own integration test suite.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.