Skip to content

taygunkara/spotify-rest-assured

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-rest-assured

This is a project API Test Automation with Spotify API using RestAssured, TestNG and Allure Report.

I have selected 3 positive, 2 negative test cases for Playlist. The variables are located in the src/test/resources folder. You should create a Spotify application for your own project and fill in the necessary information. Since the application is closed, the run without correcting the information will give an error. You can see the steps I followed while creating the project and the project structure at the bottom.

You should change the following in the "config.properties":
client_id=
client_secret=
refresh_token=
user_id=
You should change the following in the "data.properties":
update_playlist_id=
get_playlist_id=

Prerequisites

What you need to install on the system:

  • Java
  • Maven
  • Allure

Used Maven Libraries

  • javafaker
  • allure-rest-assured
  • allure-testng
  • jsonassert
  • jackson-databind
  • testng
  • rest-assured

Usage

mvn clean test

Report

allure serve

Project Structure
📦 spotify-api-test-rest-assured-architecture   
├─ .idea 
├─ allure-results  
├─ .gitignore  
├─ .pom.xml 
├─ README.md  
└─ src  
   ├─ main  
   ├─ java  
   └─ test  
      ├─ java  
      │  └─ com.spotify.oauth2  
      │        ├─ api 
      │        │   └─ applicationApi
      │        │      ├─ PlaylistApi.java
      │        │      └─ PlaylistHelper.java
      │        │   ├─ RestResource.java
      │        │   ├─ Route.java
      │        │   ├─ SpecBuilder.java
      │        │   ├─ StatusCode.java
      │        │   └─ TokenManager.java
      │        ├─ models  
      │        │   ├─ Error.java
      │        │   ├─ ExternalUrls.java
      │        │   ├─ ExternalUrls__1.java
      │        │   ├─ Followers.java
      │        │   ├─ InnerRoot.java
      │        │   ├─ Owner.java  
      │        │   ├─ Playlist.java 
      │        │   └─ Tracks.java 
      │        ├─ tests
      │        │   └─ PlaylistTests.java
      │        ├─ utils
      │        │   ├─ ConfigLoader.java
      │        │   ├─ DataLoader.java
      │        │   ├─ FakerUtils.java
      │        │   └─ PropertyUtils.java
      └─ resources  
         ├─ config.properties
         └─ data.properties    
To Do List
  • spec builder
  • positive playlist scenarios
    • should be able to create a playlist
    • should be able to get a playlist
    • should be able to create a playlist
  • negative playlist scenarios
    • should be able to create a playlist with name
    • should be able to create a playlist with expired token
  • pojo
  • token manager
  • reusable methods
  • routes
  • config
    • property loader utility
    • config loader - singleton design pattern
    • data loader - singleton design pattern
  • lombok
  • allure reporting
  • java faker
  • java enum for status codes
  • parallel execution
  • Cl integration

About

spotify api testing with rest-assured

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages