[ 
https://issues.apache.org/jira/browse/SLING-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996465#comment-12996465
 ] 

Bertrand Delacretaz commented on SLING-1984:
--------------------------------------------

Thanks very much for this contribution, here are my comments after reviewing it 
- I'll number my comments to make it easier to reply.

1. Can you confirm the use case? IIUC the goal is to allow executing tests from 
an IDE - for example if you execute your RemoteJUnit4Test in your IDE, it runs 
on a remote Sling instance and you get tests results in the IDE, exactly as if 
the test ran locally.

Can you also debug the tests remotely when doing that?

2. I'd rather put those new classes in a separate "junit remote" module, to 
keep the dependencies of the junit core module minimal, so that it can be 
reused in other OSGi environments. No big deal, I could do that refactoring 
after we apply your patch.

3. Using Logger instead of System.out or err is preferred (ExecutionRule.java)

4. Your patches to RequestInfo break the current navigation in tests, for 
example currently a GET on /system/sling/junit/org.apache.foo.html selects all 
test classes that start with "org.apache.foo". I'd like to keep this, and use 
request parameters only when absolutely required, which I think is the case for 
selecting a method in a test class. 

5. Do you think OUTPUT_FORMAT_PARAMETER is needed? The extension should be 
sufficient to select the output format?

6. Why this change in JUnitServlet? I think it breaks things (and I should add 
tests for said things ;-)

             final String pi = request.getPathInfo();
-            if(pi == null) {
+            if(request.getParameterMap() == null) {

7. For us to apply the patch we need the "Grant license to ASF for inclusion in 
ASF works" checkbox to be checked when uploading a patch - if you agree and are 
allowed to do that, of course.

Don't be put off by the long list of comments! 

I'm sure this can be very useful for people who use IDEs to run tests, but I 
don't usually do that so I'll need to understand the context better - again 
thanks, and feel free to discuss things on the Sling dev list if it's easier, 
see 
http://sling.apache.org/site/project-information.html#ProjectInformation-lists


> [Patch] Support for running individual test method in junit module and 
> integration with eclipse runner
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-1984
>                 URL: https://issues.apache.org/jira/browse/SLING-1984
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Pooja Kothari
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: junit-patch
>
>


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to