Verifying File Download using Rest Assured.

In the previous post, we studied about f inding broken links using Rest Assured . In this post, we will learn about verifying file download using Rest Assured. We will first download the file for which we will perform the verification of size. We will download rest-assured-3.0.5-dist.zip file from Rest Assured Download Section . We will save the file inside our eclipse project. Now let us look at an example of verifying file download using Rest Assured: import org.testng.Assert ; import org.testng.annotations.Test ; import java.io.File ; import static io . restassured . RestAssured .*; public class GetRequestTest { @Test public void verifyFileDownload () { int fileSize ; File filePath = new File ( System . getProperty ( "user.dir" )+ "/resources/rest-assured-3.0.5-dist.zip" ); fileSize = ( int ) filePath . length (); System . out . println ( "The actual value is " + f...