Hi Bertrand,

Let me describe myself. I have a number of unit test classes in which there are "org.apache.sling.junit.annotations.TestReference" annotations. These classes has @RunWith(SlingAnnotationsTestRunner.class) annotations also. I want to execute these tests within the maven process during a complete build of Stanbol.

Is "sending HTTP requests to these classes" the only way to execute these unit tests? If so, does sending these requests within the integration-tests violates any pattern?

Thanks in advance,
Anil.

On 03/19/2012 05:34 PM, Bertrand Delacretaz wrote:
Hi Anil,

On Mon, Mar 19, 2012 at 4:10 PM, Ali Anil Sinaci<[email protected]>  wrote:
...As far as I understand, to use sling test annotations and execute junit
tests with SlingAnnotationsTestRunner, someone should send an HTTP POST
request to the associated endpoint
(/system/sling/junit/o.a.s.contenthub.test.X). I am planning to send these
requests within the integration-tests. But, this leads to "executing unit
tests within integration-tests"....
So IIUC you want to run JUnit tests inside a running Stanbol instance,
from the outside?

That's what the examples at [1] do, if you look at the
ServerSideSampleTest in there for example, it runs in the test phase
of a Maven build, triggers server-side tests using an HTTP request as
you describe, and reports the result as part of the Maven build
output.

Is that what you want?

-Bertrand

[1]  
http://svn.apache.org/repos/asf/sling/trunk/testing/samples/integration-tests

Reply via email to