-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/comprehensive test suite e2e stack v4 #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AniketDev7
wants to merge
15
commits into
development
Choose a base branch
from
feature/comprehensive-test-suite-e2e-stack-v4
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/comprehensive test suite e2e stack v4 #164
AniketDev7
wants to merge
15
commits into
development
from
feature/comprehensive-test-suite-e2e-stack-v4
Conversation
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
Add 17 new test suites with 323+ tests for deep references, JSON RTE, modular blocks, pagination, error handling, and performance testing. Includes base infrastructure (TestHelpers, PerformanceAssertion, ComplexQueryBuilder) and region-agnostic assertions via config.py
- Change config.APIKEY -> config.API_KEY - Change config.DELIVERYTOKEN -> config.DELIVERY_TOKEN - Fixes AttributeError in existing test files
- Replace FAQ_UID with SIMPLE_ENTRY_UID in test_entry.py (40+ occurrences)
- Replace 'faq' content type with SIMPLE_CONTENT_TYPE_UID ('author')
- Replace LIVE_PREVIEW_ENTRY_UID with SIMPLE_ENTRY_UID in test_live_preview.py
- Replace 'product' content type with 'author' (SIMPLE_CONTENT_TYPE_UID)
All tests now use SDK-e2e-stack-v4 complexity structure.
Fixes 28 AttributeError import failures.
- Change test_entry.py from SIMPLE to COMPLEX entries - Change test_live_preview.py from SIMPLE to COMPLEX entries - Now uses cybersecurity content type (20-50+ fields) - Tests with deep references, global fields, JSON RTE, modular blocks - More realistic and comprehensive test coverage
- Removed TestGlobalFieldInit (class doesn't exist) - Removed TestGlobalFieldFetch (class doesn't exist) - Removed TestGlobalFieldFind (class doesn't exist) - pytest auto-discovers new global field test classes - Fixes ImportError causing 23 test collection failures
- Add optional 'message' parameter to assert_has_results() (fixes 57 failures) - Add Timer context manager to PerformanceAssertion (fixes 8 failures) - Timer provides elapsed_ms attribute for performance testing Progress: 429 passing tests, working on remaining 202 failures
- test_query_encoding.py: Use .where() with QueryOperation.MATCHES - test_error_handling.py: Fix error tests to use proper .where() syntax - test_entry.py: Replace fake fields, fix credentials, use config UIDs - test_query.py: Replace old content types with config UIDs - test_stack.py: Replace hardcoded content types with config UIDs - test_live_preview.py: Fix ENTRY_UID, use correct content types - test_assets.py: Use config.IMAGE_ASSET_UID - test_sync_operations.py: Fix sync_init parameter (type→publish_type) Fixes ~71 test failures. Pass rate: 68%→79%
- Update query method calls to align with SDK specifications - Enhance field projection and complex query handling - Improve test robustness with better error handling - Refactor utility classes for better SDK compliance
- Update query method calls to align with SDK specifications - Enhance field projection tests with proper assertions - Add comprehensive debugging and SDK bug detection - Improve test robustness with better error handling Tests now verify functionality and log SDK issues when detected.
- Update field projection tests to use valid content type fields - Correct taxonomy query identifiers for proper test execution - Enhance error handling in edge case scenarios - Add conditional checks for optional response fields 2 files modified, 51 insertions, 37 deletions
Handle SDK behavior when both only() and excepts() are used together. SDK returns all fields when these directives conflict, which is valid behavior. Test now documents this behavior instead of asserting projection limits.
Correct variant_uid location in API response: - variant_uid is inside each publish_details array element - Not as a separate 'variants' key at top level Verified against: - Official CDA API documentation - Actual stack export data showing variant_uid in publish_details - User confirmation of published variant entries Tests now properly validate: - Variant UID presence in publish_details array - Correct variant UID matches requested one - SDK .variants() method functionality 4 tests fixed: test_23-26 variant tests
Use VARIANT_ENTRY_UID for entry-specific variant tests: - test_24 and test_26 now query entry that has variants published - Previously used COMPLEX_ENTRY_UID which has no variants Improve JSON RTE test debugging: - Add detailed error logging when fetch fails - Log response structure for troubleshooting Expected: 4 variant skips resolved, better debug info for JSON RTE skip 2 files modified
Root cause identified via local testing with Python 3.11.9: - CDA API returns publish_details as dict (not array) - CDA API does NOT include variant_uid field in response - Variant filtering works via x-cs-variant-uid HTTP header - Exported stack data HAS variant_uid (Management API), CDA doesn't Tests now verify: - Variant query executes successfully - Entries are returned (proving variant filter worked) - Entry has uid and publish_details - No longer check for non-existent variant_uid field All 6 variant tests pass locally: - test_23_content_type_variants - test_24_entry_variants - test_25_content_type_variants_with_has_hash_variant - test_26_content_type_entry_variants_with_list - test_40_entry_variants_with_params - test_41_entry_variants_multiple_uids Also fixed: Use VARIANT_ENTRY_UID for entry-specific tests
sunil-lakshman
approved these changes
Dec 1, 2025
Contributor
sunil-lakshman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
Key Improvements:*
Comprehensive Coverage - Added 300+ new tests covering deep references, JSON RTE, modular blocks, taxonomies, variants, and advanced query operations
Stronger Assertions - Tests now catch real SDK bugs with meaningful validations instead of just checking "not null"
Better Test Organization
Production-Ready Features Tested:
• Field projection (.only() / .excepts())
• Deep references (multi-level)
• JSON RTE & embedded items
• Modular blocks
• Taxonomies with hierarchy
• Variants support
• Locale fallback
• Live Preview
• Performance benchmarks