0

I am having a web extension with several endpoints implemented in the controller. Now I want to test those endpoints with e. g. GET OR POST request like https://localhost:9002/myExtension/myEndpoint

I thought I could achieve that via integration test and annotate the class with @NeedsEmbeddedServer(webextension="myExtension")

My implementation looks similar like that

@NeedsEmbeddedServer(webextension="myextension)
@IntegrationTest
public class myClass implements ServiceLayerTransactionalTest {

@Test
public void myTest {
doSomeRequestHere();
}

When I run my test (which I do via ANT) the server starts up but I am not able to do the request. I also placed a timer in my test to check if localhost is running on several ports but I couldnt reach it.

In general what is the purpose of @NeedsEmbeddedServer annotation and can I achieve my goal like that?

Theo
  • 57
  • 5

0 Answers0