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

Bertrand Delacretaz commented on SLING-4541:
--------------------------------------------

Thanks, I have committed your new test in http://svn.apache.org/r1686816 , 
please cross-check.

I think the testBundleResolvedBundleChanged shows that we are hitting the 
limits of what can be tested with mocks, the tests start becoming hard to 
understand and it's hard to figure out if they actually test what they should 
or if they just improve the code coverage without testing the semantically 
important parts.

For such tests it might be worth moving up one layer using pax exam to test the 
actual functionality that matters: when a new bundle appears with content to 
load, is that correctly loaded, optionally overwriting previous content, what 
happens when the bundle is updated, etc. Such tests can then be used in large 
part as reference documentation for what the module does, which mocked tests 
are much less likely to provide IMO.

We might need to discuss this on list - if you agree with these feelings maybe 
describe what you'd like to test on the sling dev list and we can discuss that 
with others who might be interested.

> Provide an extensive test suite for the JCR content loader
> ----------------------------------------------------------
>
>                 Key: SLING-4541
>                 URL: https://issues.apache.org/jira/browse/SLING-4541
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR ContentLoader 2.1.10
>            Reporter: Radu Cotescu
>            Assignee: Petr Shypila
>             Fix For: JCR ContentLoader 2.2.0
>
>         Attachments: week-4-completed.patch, week-4_first_part.patch, 
> week2-part1-pathentry.patch, week2-part2-defaultcontentcreator.patch, 
> week2-part3-single-jcrmock-test.patch, week3.patch
>
>
> The JCR content loader is a sensible bundle. An extensive IT suite should be 
> written to make sure that code changes don't affect core functionality.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to