You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2021/09/02 10:35:00 UTC

[jira] [Commented] (SLING-10742) Create integration tests for ResourceResolver

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

Robert Munteanu commented on SLING-10742:
-----------------------------------------

[~Henry Kuijpers] - we have some integration tests running at https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/tree/master/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/resourceresolver . Would that solve the situation you observed?

> Create integration tests for ResourceResolver
> ---------------------------------------------
>
>                 Key: SLING-10742
>                 URL: https://issues.apache.org/jira/browse/SLING-10742
>             Project: Sling
>          Issue Type: Improvement
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.7.10
>            Reporter: Henry Kuijpers
>            Priority: Minor
>
> Now that the logic in Resource Resolver becomes more and more complex, for example with regards to executing querys, it would be a good idea to create some integration tests for this module.
> Mocking frameworks only go so far, many assumptions are made. In particular, query execution is not done in our mocking frameworks. Instead of executing them, we're basically saying "If we receive query 'x', we return results [y, z]", without validating the query, without parsing it, without executing it. 
> This came up in SLING-10447, where we decided that verifying the correct execution of the querys would be valuable to have. Right now, only the string (that contains the query) is checked, but we're not checking if there are any syntax issues and we're also not checking if the query executes correctly, i.e. returns the expected results.
> We will probably come up with some more complex logic in SLING-10466, which could also benefit from these integration tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)