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.
- 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
-
Base URL:
https://api.themoviedb.org/3
-
Authentication: Bearer Token (provided in
configuration.properties
) -
Headers Required:
Content-Type: application/json
Authorization: Bearer <your_token>
Scenario | Endpoint | Method | Purpose |
---|---|---|---|
Valid Login | /login |
POST | Authenticates with valid credentials |
Invalid Login | /login |
POST | Ensures proper error handling for failure |
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 |
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 |
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 |
Scenario | Endpoint | Method | Purpose |
---|---|---|---|
Invalid Token Access | /list/{list_id}/add_item |
POST | Validates error handling with invalid token |
Prerequisites:
- Java JDK 8+
- Maven installed
- Valid TMDB API Token
-
Clone the repository:
git clone https://github.com/zaferatakli/TMDB-RestAssured-API-Test-Automation-Project.git
-
Add your token and base URL to
configuration.properties
:base_url=https://api.themoviedb.org/3 bearer_token=YOUR_BEARER_TOKEN
-
Run tests using Maven:
mvn clean test
-
Test reports will be generated by TestNG/Maven.
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