For my Play 2.0 application, I want to run the (Selenium) JUnit test from Eclipse. The test script looks like this:
@Test public void runInBrowser() { running(testServer(47111, fakeApplication(...)), ChromeDriver.class, new Callback<TestBrowser>() { public void invoke(TestBrowser browser) { browser.goTo("http://localhost:47111"); assertThat(...); } }); }
The test server starts, but during the test none of the static resources are available (for example, * .css, * .js, * .png), i.e. access to http://localhost:47111 calls 404 for these resources.
My routes file contains:
GET /assets/*file controllers.Assets.at(path="/public", file)
Static resources are located in the folders: public \ images (* .png), public \ javascripts (* .js), public \ stylesheets (* .css).
Outside of the Eclipse test environment, all static resources are detected (for example, running tests in the game console using a playback test).
Any ideas?
cnmuc
source share