Skip to content

Automate API tests#1028

Merged
sbelhaik merged 25 commits intomainfrom
sbel/automate-api-tests
Feb 20, 2026
Merged

Automate API tests#1028
sbelhaik merged 25 commits intomainfrom
sbel/automate-api-tests

Conversation

@sbelhaik
Copy link
Copy Markdown
Contributor

@sbelhaik sbelhaik commented Feb 17, 2026

📝 Description

PR overview: #1028 (review)

JIRA: ITEP-83207

✨ 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:

  • ✅ 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

}
},
"expected": {
"status_code": 201
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Like we discussed, will need to also validate the content of results in addition to status_code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@sbelhaik sbelhaik requested a review from daddo-intel February 18, 2026 11:59
Copy link
Copy Markdown
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

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

@sbelhaik sbelhaik merged commit 8b3bf59 into main Feb 20, 2026
29 checks passed
@sbelhaik sbelhaik deleted the sbel/automate-api-tests branch February 20, 2026 09:52
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.

4 participants