Forum Discussion

Oliguti's avatar
Oliguti
Senior Member
7 years ago

how to ignore file not found exception

I want to test a Rest TestRequest with a "file" field wrong value.

I need to check how the tested API manages the file not found error.

 

When i enter "C://notfound.csv" (this file does not exists), and run the request, i see an error in logs : ERROR:java.io.IOException: No content

 

When i change the value with a valid path, the exception is not occuring.

 

Is there a way to test this missing file case and avoid this exception ?

 

Regards

No RepliesBe the first to reply