Skip to content

Conversation

@AndyHaas
Copy link
Owner

No description provided.

…assertion messages

- Replace custom DummyHttpMock with RequestCapturingMock that extends HttpCalloutMockFactory
- Use proper RestLibApiCall constructor instead of direct property assignment
- Add missing assertion messages to all System.assertEquals and System.assert calls
- Fix compilation errors and linting warnings
- Maintain request capture functionality for comprehensive test assertions
- Change from extending HttpCalloutMockFactory to implementing HttpCalloutMock directly
- Use HttpCalloutMockFactory.generateHttpResponse() for response generation
- Remove override keyword since we're implementing interface, not extending class
- Fix compilation errors related to non-virtual class extension
- Remove static modifier from lastRequest field in RequestCapturingMock
- Update all references to use instance variable (mock.lastRequest) instead of static
- Fix compilation error: static can only be used on fields of a top level type
- Maintain request capture functionality for test assertions
- Add test execution step before deployment with JSON output for parsing
- Extract code coverage percentage from test results using jq
- Enforce 75% minimum code coverage requirement
- Fail build if coverage is below threshold to prevent low-quality releases
- Display coverage percentage in workflow logs for transparency
- Ensure only well-tested code gets packaged and released
- Change assertion from checking for null to checking String.isBlank()
- This handles cases where HttpRequest.getBody() returns empty string instead of null
- Resolves failing test: testDeleteRequestNoBodyNoNebulaPresent
- Move version updates before MDAPI conversion to ensure correct versions
- Reorder steps: auth → version updates → convert → deploy → test → package
- Run only package-specific test classes (NebulaAdapter_Test, RestLibTests)
- Ensure tests run against deployed code in packaging org
- Maintain 75% minimum code coverage requirement
- Add detailed error reporting for package version creation failures
- Improve test execution error handling with exit code capture
- Add deployment step debugging with clear success/failure messages
- Extract and display specific error messages from JSON responses
- Add helpful hints for common failure scenarios (permissions, validation, coverage)
- Better logging with emojis and clear status indicators
- Capture both stdout and stderr for all critical commands
- Fix broken pipe error when displaying large JSON test results
- Improve coverage extraction to handle testRunCoverage from summary
- Add fallback coverage extraction methods for different JSON structures
- Better handling of coverage percentage parsing
- Add detailed coverage analysis with current vs required percentages
- Show coverage gap calculation (how much more coverage is needed)
- List specific test classes being validated
- Provide clear step-by-step instructions to fix coverage issues
- Add detailed test result breakdown (passed/failed/skipped counts)
- Include next steps for developers to improve test coverage
- Make error messages more actionable and informative
- Add tests for all fluent interface methods (usingDelete, usingHead, withTimeout, etc.)
- Add tests for property getters (methodString, hasBody, functionalHeaders)
- Add tests for path and query handling edge cases
- Add tests for constructor overloads with different parameters
- Add tests for PATCH method handling and conversion to POST
- Add tests for header management (single and multiple headers)
- Add tests for default headers functionality
- Add tests for ensureStringEndsInSlash edge cases

This should significantly improve test coverage from 68% to above 75%
- Fix test result parsing in GitHub workflow to prevent broken pipe errors
- Add comprehensive test coverage for NebulaAdapter class (8 new test methods)
- Add extensive test coverage for RestLibApiCall and RestClientLib (15 new test methods)
- Cover edge cases, error scenarios, and all convenience method overloads
- Address PATCH method conversion, query encoding, and null parameter handling
- Ensure all public methods and critical code paths are tested
@AndyHaas AndyHaas merged commit 45d5915 into master Sep 24, 2025
1 check failed
@AndyHaas AndyHaas deleted the feature/nebula-adapter-integration branch September 24, 2025 17:39
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.

2 participants