File Upload and File Download REST APIs Testing using Rest Assured in Java

Introduction In this tutorial we will test REST APIs used for file upload and file download. The file upload or download application might have been created using any server side technology. We are going to use here Rest Assured library with Junit 5 framework in Java programming language. We will use multipart for file upload test. For download test you don’t need such content type – multipart. The fluent API used by REST Assured supports the familiar Given/When/Then syntax from behavior driven development (BDD) framework, resulting in a test that is easy…

Continue

Generate PDF Report from MySQL Database using Python Flask

Introduction We will create an example on how to generate PDF report from MySQL database using Python Flask. We will create a web application using light-weight web framework called Flask. We will generate the pdf file on the fly from MySQL database in this web application. A download link will be provided on front-end or UI on which end users will click and will get an option to save the generated pdf file as per their chosen location. We are going to use fpdf API for generating pdf report. As we are…

Continue

Generate Excel Report from MySQL Database using Python Flask

Introduction Here I am going to show you how to generate excel report from MySQL database using Python Flask. We will create a web application using light-weight web framework called Flask. We will generate the excel file on the fly from MySQL database in this web application. A download link will be provided on front-end or UI on which end users will click and will get an option to save the generated excel file as per their chosen location. We are going to use xlwt API for generating excel report. As we…

Continue

Generate CSV Report from MySQL Database using Python Flask

Introduction Here I am going to show you how to generate CSV report from MySQL database using Python Flask. We will create a web application using light-weight web framework called Flask. We will generate the CSV (comma separated values) file on the fly from MySQL database in this web application. A download link will be provided on front-end or UI on which end users will click and will get an option to save the generated CSV file as per their chosen location. We are going to use csv API for…

Continue

How to download file using Python Flask

Introduction Here I am going to show a simple example on how to download a file using Python Flask. We will download the file which is kept in the server location. The file could be any type of file, i.e., pdf, text, excel, word etc. In this example there will be a simple UI (user Interface), where a link will be provided to the user and clicking on the link a file will be download. The downloaded file will ask you to choose a location for saving it. There could…

Continue

Download file from server using React

Introduction Here we will see how to download file from server using React JS framework. You can use any server side technology to download file but we will focus on client side technology React JS framework. You may read more on react here at https://reactjs.org/. We will provide link as well as button on which user will click and download file from server. User will get Save As option when clicks on download link or button. You may also like to read How to download file from server using Angular.

Continue

Download file using React and Spring Boot

Introduction In this post you will see how to download file using React and Spring Boot. There are situations where you need to download file from server or you need to generate report from database and download it. This example may help you in that situation. Here I will fetch records from database and download in a JSON format. As a server side technology I will use Spring Boot and in client side I will use React JS.

Continue

Download file from server using Angular 7/8/10

Introduction In this post I am going to show you how to download file from server using Angular framework. Angular is a UI framework for building rapid application development. Here we will use Angular 7/8/10 to download file from server side. You can use any server side technology and integrate this example with it for downloading file from server. I am going to use here Spring Boot framework as a server side technology.

Continue

Download file using Angular and Spring Boot

Introduction In this post I will show you how to download file using Angular 7/8/10 and Spring Boot. There are situations when you need to download file from server or you need to generate report from database and download it. This example may help you in such situation. I will build the Spring Boot application using both maven and gradle. Here I will fetch records from database and download in a JSON format. As a server side technology we will use Spring Boot and in client side we will use…

Continue

Junit Testing of File Upload and Download in Spring REST Controllers

Introduction Here in this tutorial we will see examples on Junit testing of file upload and download in Spring REST Controllers. We have seen how to write Junit test cases on Spring REST Controllers in my previous tutorial but I did not show how to write Junit testing of file upload and download in Spring REST Controllers but here we will see those in action. We will use one of the most widely used and popular JUnit Testing Mocking framework – Mockito to write our test cases in this example…

Continue