Skip to content

Automate tests for asset API endpoints#1079

Closed
sbelhaik wants to merge 2 commits intorelease-2026.0from
sbel/asset-api
Closed

Automate tests for asset API endpoints#1079
sbelhaik wants to merge 2 commits intorelease-2026.0from
sbel/asset-api

Conversation

@sbelhaik
Copy link
Contributor

@sbelhaik sbelhaik commented Feb 24, 2026

📝 Description

Automate API test scenarios for asset endpoints.

JIRA: ITEP-87671

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 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

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +10 to +12
"body": {
"name": "Asset_Minimal"
}
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +8
"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",
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sbelhaik sbelhaik changed the title Automate tests for camera API endpoints Automate tests for asset API endpoints Feb 25, 2026
@Irakus Irakus deleted the branch release-2026.0 February 25, 2026 15:41
@Irakus Irakus closed this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants