HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to Upload File in Rest Assured(with Download) | Rest Assured Tutorial for Beginner. | Day 19

20,770 views September 13, 2020 6:54

Watch on YouTube
ChannelThe Testing Academy

Description from the creator

In this video, We are going to learn How to upload a file in rest assured and download file in rest assured.

RestAssured upload file is easy and can be achieved with the multipart inbuilt methods.

✅ Quick Code -
.multiPart("file", new File(TestUtil.getFileURI("/examples/help.html")), "text/html")
stackoverflow.com/questions/39482473/how-to-use…

We will assume that a post method "the-internet.herokuapp.com/upload"; uploads an image for a user. Lets take a look at the below example on how to upload the image file using POST call.

We will use the function that takes 3 parameters.
- The key that identifies the file.
- File object.
- Content type.

We Use POST request to perform this operation.

✅ Source Code.
- scrolltest.com/ra/download-file
- scrolltest.com/ra/upload-file

✅ What is REST Assured?
REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs. ... I'll be using real-world code examples you can copy, run, and reuse directly in your own test automation effort

🌍 Test Automation -
bit.ly/learnautomation2020

💌 API Testing -
learnapitesting.com

🎙 Cypress Tutorial with LIVE Projects -
cypresstutorial.com

📝 REST API testing with Python -
masterapitesting.com

#restassured #restassuredtutorial #apitesting #api #automationtesting #manualtesting #testautomation #thetestingacademy #scrolltest

About this tutorial

The Testing Academy published this 6:54 video tutorial on September 13, 2020. It has been watched 20,770 times on YouTube.

Duration
6:54
Published
September 13, 2020
Views
20,770
Likes
179

Tags

Share

This tutorial in other languages