Fix and complete API tests suite with all TODOs from Maksim Maksimov#235
Open
Maksimovprojects wants to merge 8 commits into
Open
Conversation
- Fixed Bug automationExamples#1: schemas.py - changed pet name type from integer to string - Fixed Bug automationExamples#2: app.py - added f-string for invalid status error message - Fixed Bug automationExamples#3: app.py - changed initial pet IDs from 0,1,2 to 1,2,3 - Added Bug automationExamples#4: Marked enum validation test as xfail (known bug) - Completed test_pet.py: Added parameterized tests for 404 and invalid IDs - Completed test_store.py: Added PATCH test with fixture and schema validation - Added Order schema to schemas.py - Organized tests into classes for better structure - Added comprehensive edge case testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Extended the Petstore API project with a complete pytest test suite, GitHub Actions CI pipeline, and bug documentation.
Changes Made
Tests
test_pet.pyschema validation, findByStatus, 404 edge cases, invalid enum xfailtest_store.pyPATCH order tests, fixture with teardown, schema validationAPI
DELETE /pets/<pet_id>andDELETE /store/order/<order_id>endpointsHelpers
api_helpers.pywithdelete_api_data()CI/CD
Documentation
README.mdwith setup instructions, test commands, and known bugs tablerequirements.txtBugs Found
schemas.pyline 9nametyped asintegerinstead ofstringapp.pyline 101findByStatusabort messageapp.pyPOST /petsmissingvalidate=True— accepts invalid enum valuesapp.pyPOST /petsallows client-supplied IDsapp.pyDELETEendpoints — fixedapp.pyPATCH /ordermutates state before validating statusapp.pyfindByStatusreturns misleading error when status param is missingPipeline run artefacts (includes Pytest HTML report)

Pipeline test run report
REPORT