You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2013/04/08 11:37:15 UTC

[jira] [Resolved] (SLING-2810) Provide JaCoCo agent servlet to expose code coverage data to HTTP clients during Sling Junit Test execution

     [ https://issues.apache.org/jira/browse/SLING-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz resolved SLING-2810.
----------------------------------------

    Resolution: Fixed

Committed your changes in revision 1465580, thanks!
                
> Provide JaCoCo agent servlet to expose code coverage data to HTTP clients during Sling Junit Test execution
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-2810
>                 URL: https://issues.apache.org/jira/browse/SLING-2810
>             Project: Sling
>          Issue Type: New Feature
>          Components: Testing
>    Affects Versions: JUnit Core 1.0.8
>            Reporter: Mark Adamcin
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: madamcin_some_adjustments_to_jacoco_instructions.patch, madamcin_system_sling_jacoco_exec_servlet.patch
>
>
> create a simple REST endpoint for the jacoco agent at /system/sling/jacoco.exec to expose:
> jacoco Agent Status
> -------------------------------------------------------------------------------------------
> HEAD /system/sling/jacoco.exec
> Content-Type: application/octet-stream
> 200: jacoco agent is attached and exposed through JMX
> 404: jacoco agent not found
> return IAgent.getExecutionData(false)
> -------------------------------------------------------------------------------------------
> GET /system/sling/jacoco.exec
> Content-Type: application/octet-stream
> 200: execution data returned as response entity
> 404: jacoco agent not found
> Reset execution data and return jacoco.exec file
> ----------------------------------------------------------------------
> POST /system/sling/jacoco.exec [optional param ":sessionId" to set a specific sessionId after reset]
> Content-Type: application/octet-stream
> 200: agent was reset (with new sessionId if specified) and prior execution data returned as response entity 
> 404: jacoco agent not found
> Jacoco instrumentation for OSGi is rather limited in the sense that there is one agent per JVM, and resetting the execution data resets it across the board, which means that concurrent requests to this service on a shared integration test server will need to be restricted during test execution to avoid corrupting coverage data. 

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