Automate tests for asset API endpoints#1079
Conversation
There was a problem hiding this comment.
Pull request overview
Adds data-driven pytest API scenario coverage by introducing a new JSON scenario file under tests/api/scenarios/, expanding the existing API test framework’s scenario catalog.
Changes:
- Added multi-step API scenarios for Asset endpoints (create/update/get/list) in a new scenario file.
- Added strict response validation for a full asset update/get flow via
expected_body.
| "body": { | ||
| "name": "Asset_Minimal" | ||
| } |
There was a problem hiding this comment.
This scenario creates an asset with a fixed name (Asset_Minimal) and there are no cleanup steps later. Since Asset3D.name is unique, repeated local/CI runs can fail with name-collision errors and will leave test data behind (same applies to Asset_Full). Consider adding deleteAsset steps for the saved UIDs or using per-run unique names sourced from an env var.
| "test_name": "Vision_AI/SSCAPE/API/ASSET/01: Create assets with only required properties", | ||
| "test_steps": [ | ||
| { | ||
| "step_name": "Create asset with minimal payload", | ||
| "api": "asset", | ||
| "method": "createAsset", |
There was a problem hiding this comment.
PR title/description mention automating tests for camera API endpoints, but this added scenario file covers the asset API (test_name prefix .../API/ASSET/..., api=asset). Please either update the PR description/title to match, or add/modify camera endpoint scenarios as intended.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📝 Description
Automate API test scenarios for asset endpoints.
JIRA: ITEP-87671
✨ 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:
cd tests/api && pytest -s test_sscape_api.py --file scenarios/asset_api.json --junitxml=test-results.xml✅ Checklist
Before submitting the PR, ensure the following: