Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets missing when running integration tests #262

Open
rgladwell opened this issue Feb 3, 2016 · 1 comment
Open

Assets missing when running integration tests #262

rgladwell opened this issue Feb 3, 2016 · 1 comment

Comments

@rgladwell
Copy link

When running Scalatest integration tests for Play2 using the scalatestplus API assets are not correctly hosted. Test run correctly from CLI sbt.

This appears to be because the test classpath does not include the assets folder as it does when running within sbt.

Steps to reproduce:

  1. Clone test case project (git clone [email protected]:rgladwell/scalaide-scalatest-play-integration.git)
  2. Install the sbt-eclipse plugin globally
  3. Run sbt eclipse
  4. Import the project in Eclipse
  5. Go to Run -> Run Configurations and create a new configuration
  6. Create new run configuration with the Type as "Package". Select "integration" as the package name
  7. Hit Run

Expected result: tests should pass as they do when you execute sbt test from the command line.

Actual result: Tests fail as the started Scalatest server is not correctly hosting the assets (404 was not equal to 200)

Workaround: http://stackoverflow.com/a/25051844/48611

The workaround (adding the assets folder to the test classpath) should be automatically done by the Scala IDE Play plugin though.

Test case project: https://github.com/rgladwell/scalaide-scalatest-play-integration

@dragos
Copy link
Member

dragos commented Apr 12, 2016

Have you tried adding the assets folder to the source path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants