5

Just started using wiremock and come across a scenario where i want to stub a GET request with a specific json response.

When appending the json to the expected response with;

.withBodyFile("product.json"))

I get the exception java.io.FileNotFoundException: src/test/resources/__files/product.json (No such file or directory).

The thing is I have the json file at this location.

Tash Pemhiwa
  • 7,590
  • 4
  • 45
  • 49
L-Samuels
  • 2,712
  • 9
  • 34
  • 42
  • This looks like a classpath issue but even if i use the full absolute path to the json file i still get the same issue. – L-Samuels Apr 23 '14 at 17:43

1 Answers1

5

If you are running standalone, you should make sure that your json file is in src/test/resources/__files

Dave
  • 1,480
  • 3
  • 16
  • 26