Thursday, 27 November 2014

How to test file upload action in Play Framework 2 in Java?

In this post, we will see how we can test an action that expects a file upload (e.g. a profile picture or an image) in Play Framework 2 for Java.
First, lets create an action that accepts a file upload as below: