Matt
Matt

Reputation: 2843

Running cucumber-jvm tests in embedded tomcat 404 problems

So ive been following the following guide as to how to get maven tomcat7 and cucumber up and running together to run my integration tests.

Integration tests with maven and tomcat

When I run mvn clean install my tests comeback with a 404 not found all the time?!

My entire code is here

What am i doing wrong? I dont understand having tried everything... ?!

Upvotes: 0

Views: 1139

Answers (2)

Matt
Matt

Reputation: 2843

The issue was down to tomcat7-maven-plugin 2.2, used version 2.0 and it works fine,...

Upvotes: 1

Hugo G
Hugo G

Reputation: 16494

404 means that's a client error. Your server is running and responding with that HTTP code to tell you that you did something wrong. Most commonly the error is a wrong path in the URL. Your log say that your server is up and running at http://localhost:8099/foo. Your test tries to access http://localhost:8099/foo/test, which seems to be not available. Are you sure the path is a defined resource? Did you set some file extension on the resource, maybe? Or maybe you have set wrong request headers or something. It's hard to say without seeing the code. For debugging's sake you could run the server standalone and issue HTTP methods on the resources using a REST testing tool or your browser.

Upvotes: 0

Related Questions