Skip to content

zaferatakli/TMDB-RestAssured-API-Test-Automation-Project

Repository files navigation

🎬 TMDB (The Movie Database) - Rest Assured API Test Automation Project

This project is an API test automation framework built with Java + Rest Assured for testing TMDB (The Movie Database) API endpoints. It automates core functionalities such as user account operations, movie listings, favorites, watchlists, and rating actions.


🔧 Technologies Used

  • Java – Programming language
  • Rest Assured – API test automation library
  • TestNG – Test framework
  • Maven – Build and dependency management
  • IntelliJ IDEA – Development environment
  • TMDB REST API v3 – Target API

📌 API Basics

  • Base URL: https://api.themoviedb.org/3

  • Authentication: Bearer Token (provided in configuration.properties)

  • Headers Required:

    • Content-Type: application/json
    • Authorization: Bearer <your_token>

✅ Covered Endpoints & Test Scenarios

403

🔐 Authentication

Scenario Endpoint Method Purpose
Valid Login /login POST Authenticates with valid credentials
Invalid Login /login POST Ensures proper error handling for failure

👤 Account Operations

Scenario Endpoint Method Purpose
Get Account Details /account GET Retrieves user profile
Add to Favorites /account/{account_id}/favorite POST Adds movie to user's favorites
Add to Watchlist /account/{account_id}/watchlist POST Adds movie to user's watchlist
Get Favorite Movies /account/{account_id}/favorite/movies GET Lists all favorited movies
Get Rated Movies /account/{account_id}/rated/movies GET Lists movies rated by the user
Get Watchlist Movies /account/{account_id}/watchlist/movies GET Lists all movies in the user's watchlist

🎞️ Movie Information

Scenario Endpoint Method Purpose
Get Movie Details /movie/{movie_id} GET Fetches detailed info of a movie
Rate a Movie /movie/{movie_id}/rating POST Submits a user rating for a movie
Delete a Rating /movie/{movie_id}/rating DELETE Removes a previously submitted rating

🔍 Search & Listings

Scenario Endpoint Method Purpose
Get Genres /genre/movie/list GET Lists all available movie genres
Now Playing Movies /movie/now_playing GET Lists currently showing movies
Popular Movies /movie/popular GET Lists trending popular movies
Top Rated Movies /movie/top_rated GET Lists best-rated movies
Upcoming Movies /movie/upcoming GET Lists future releases
Search Movies /search/movie?query= GET Finds movies by search query
Search Keywords /search/keyword?query= GET Finds keyword metadata

🚫 Unauthorized Access

Scenario Endpoint Method Purpose
Invalid Token Access /list/{list_id}/add_item POST Validates error handling with invalid token

🧪 Running the Tests

Prerequisites:

  • Java JDK 8+
  • Maven installed
  • Valid TMDB API Token
  1. Clone the repository:

    git clone https://github.com/zaferatakli/TMDB-RestAssured-API-Test-Automation-Project.git
  2. Add your token and base URL to configuration.properties:

    base_url=https://api.themoviedb.org/3
    bearer_token=YOUR_BEARER_TOKEN
  3. Run tests using Maven:

    mvn clean test
  4. Test reports will be generated by TestNG/Maven.


📁 Project Structure

TMDB_RESTAssured_Project/
│
├── src/
│   └── test/
│       └── java/
│           ├── tmdb/
│           │   ├── _01_Account/        # Account-related tests
│           │   ├── _02_Genres/         # Genre endpoint tests
│           │   ├── _03_MovieList/      # Movie list scenarios
│           │   ├── _04_Search/         # Search and query tests
│           │   └── _05_Movies/         # Movie detail & rating tests
│           │
│           └── utility/
│               ├── ConfigReader.java   # Reads config from properties file
│               └── Parent.java         # Base class for common setup (e.g., RestAssured baseURI)
│
├── configuration.properties            # Stores baseURL and token
├── pom.xml                             # Maven project file with dependencies
├── README.md                           # Project documentation
└── .gitignore                          # Files ignored by Git

👨‍💻 Contributors


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages