Conversation
| } | ||
| }, | ||
| "expected": { | ||
| "status_code": 201 |
There was a problem hiding this comment.
Like we discussed, will need to also validate the content of results in addition to status_code
There was a problem hiding this comment.
Like we discussed, will need to also validate the content of results in addition to
status_code
I added compare_expected_json_body(). Now we can use "expected_body": {...} to validate full response body.
There was a problem hiding this comment.
Pull request overview
This PR introduces an automated API testing framework for SceneScape, using pytest with JSON-based test scenarios. The framework enables data-driven API tests with multi-step scenarios, variable substitution between steps, and comprehensive response validation.
Changes:
- New pytest-based API test framework with JSON scenario definitions
- RESTClient enhancements to support direct token authentication and return raw response objects
- Comprehensive Scene API test scenarios (21 test cases covering CRUD operations and validation)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/api/test_sscape_api.py | Main test runner implementing scenario loading, variable substitution, response validation, and step execution |
| tests/api/conftest.py | Custom pytest configuration with clean XML reporter for CI/CD integration |
| tests/api/scenarios/scene_api.json | Comprehensive Scene API test scenarios covering positive and negative test cases |
| tests/api/README.md | Complete documentation for the API test framework including usage, examples, and scenario format |
| scene_common/src/scene_common/rest_client.py | RESTClient updates adding token authentication, request() method, and response compatibility properties |
📝 Description
PR overview: #1028 (review)
JIRA: ITEP-83207
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
✅ Checklist
Before submitting the PR, ensure the following: