I think I got it... the list from Tomcat doesn't contain listing of servlet mappings, so I am shifted one level up in what I am parsing
Yea, the ProtocolMetaData should contain a HTTPContext with all Servlets in the Deployment.
What does it use for? What if I don't fill it?
It is used by the Protocol implementation, e.g. Servlet 2.5/3.0. They add them selves to the deployment in the packaging phase so the test can be executed incontainer. They expect if(when) you execute the @Test to find 'them sevles' in the metadata to know which ip/port/contextRoot to use to execute against. If you don't provide this info, only Client mode will work.
Also, the @ArquillianResource URL injection point enricher use this info to fetch baseURL from your deployment. e.g.
@ArquillianResource(MyServlet.class) URL baseUrl; <-- could be http://localhost:8080/my.war/
I'm still not able to fix ArquillianServletRunner not found.
We discussed the HTTPContext, now I am filling it correctly, but that error is caused by the server not being packed to the WAR.
I have found org.jboss.arquillian.protocol.servlet.v_3.web-fragment.xml. There's
<servlet> <servlet-name>ArquillianServletRunner</servlet-name> <servlet-class>org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner</servlet-class> </servlet> <servlet-mapping> <servlet-name>ArquillianServletRunner</servlet-name> <url-pattern>/ArquillianServletRunner</url-pattern> </servlet-mapping>
But it seems it's not applied to the web.xml of my war (created by ShrinkWrap).
I've also tried to add org.jboss.arquillian.protocol.servlet.ServletUtil.class.getPackage() to addPackages (recursively); didn't help.
What should I try next?
I will try to use the ProtocolDeploymentAppender from my appender.