GitXplorerGitXplorer
m

cypress_api

public
0 stars
1 forks
0 issues

Commits

List of commits on branch main.
Verified
fe0204a431d09379adfe78d37f967ec930970dac

Update README.md

mm4rri4nne committed 9 months ago
Unverified
58f10c38d014d7509d5a914c5734a58dc12ba451

update readme

mm4rri4nne committed a year ago
Unverified
89257a821c19e35ddfa13c77f105780a33dee0af

Updating Readme and removing empty lines

mm4rri4nne committed a year ago
Unverified
3b61b76b656cf1979b79c3139fcee48da7a2382d

Removing duplicated code and finishing the tests

mm4rri4nne committed a year ago
Unverified
3c1f4caf00c5a8e790d2523c340dd93b45c14f72

adding commands

mm4rri4nne committed a year ago
Verified
39420dc7b003e03c3cb06e69cfa86d4f3b3f5a1d

Delete node_modules directory

mm4rri4nne committed a year ago

README

The README file for this repository.

API Testing using Cypress

Project of test automation using cypress. For this project, the api used was Free API Books.

API Specification

The model of response body for all requests is:

 {
    "id": 0,
    "title": "string",
    "description": "string",
    "pageCount": 0,
    "excerpt": "string",
    "publishDate": "2023-10-14T18:44:34.674Z"
  }

Test Scenarios

Endpoint Method Test Expected Result
/Books GET Search all books with success - Return a status code 200
- The body response contain all fields non empty
- The pageCount value is an integer
/Books/{id} GET Search a specific book with success - Return a status code 200
- The body response contain all fields non empty
/Books/{id} GET Search a specific book with invalid id - Return a status code 404
- The title of message error should be "Not Found"
/Books POST Create a book with success - Return a status code 200
- The body response contain all fields non empty
- The pageCount value is an integer
/Books POST Create a book without body request - Return a status code 415
/Books POST Create a book with empty body request - Return a status code 200
- The fields of body response are filled with default configuration
/Books/{id} PUT Update an book with success - Return a status code 200
- The body response contain all fields non empty
/Books/{id} PUT Update a book passing an inexistent ID - Return a status code 404
/Books/{id} PUT Update a book passing invalid ID - Return a status code 400
/Books/{id} PUT Update a book with empty body request - Return a status code 200
/Books/{id} DELETE Delete a book with success - Return a status code 200
/Books/{id} DELETE Delete a book with inexistent ID - Return a status code 400

Running the tests locally

Install the depencencies:

npm install 

Running the tests:

npm run tests

You can check more details about how this project was built here