Skip to content

a-shashkin/jsonplaceholder-api-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Automated API tests for JSONPlaceholder web site

JSONPlaceholder site

Realized automated API tests:

  • Tests related to retrieval, creation, editing and deleting of users;
  • Tests related to retrieval, creation, editing and deleting of albums;
  • Tests related to retrieval, creation, editing and deleting of photos;
  • Tests related to retrieval, creation, editing and deleting of to-dos;
  • Tests related to retrieval, creation, editing and deleting of posts;
  • Tests related to retrieval of nested data: comments from posts; photos from albums; albums, to-dos and posts from users.

Technology stack:


IntelliJ IDEA

Java

Gradle

JUnit5

Rest-Assured

Jenkins

Github

Allure TestOps

Jira

Telegram Bot

Local terminal launch commands

config.properties file must be locally created and contain the following line:

baseUrl=https://jsonplaceholder.typicode.com

Launch all tests:

gradle clean test

Launch only tests related to "photos" entity:

gradle clean photos_tests

Launch only tests that use HTTP method GET:

gradle clean get_request_tests

Build Allure report:

allure serve build/allure-results

List of available tasks includes:

  • test
  • albums_tests
  • photos_tests
  • posts_tests
  • todos_tests
  • users_tests
  • get_request_tests
  • post_request_tests
  • put_request_tests
  • patch_request_tests
  • delete_request_tests
  • non_get_request_tests (i.e., tests for requests using POST, PUT, PATCH or DELETE methods)

Parameters for Jenkins build

Jenkins build options

Changing test data in Jenkins

Repository contains .json files in resources/testData folder, that are used as sources of expected result and request body.

Should you require different test data, you can use Jenkins build options to overwrite data with your own. Example is on screenshot:

How to overwrite data

Test case tree in TestOps

Test case tree

Launch result

Launch result

Telegram notification

Telegram notification

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages