-
Notifications
You must be signed in to change notification settings - Fork 7
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
GitAuto: [FEATURE] Add Integration Tests project with WireMock fixture #406
Conversation
By default, I don't review pull requests opened by bots. If you would like me to review this pull request anyway, you can request a review via the |
Reviewer's Guide by SourceryThis pull request introduces a new integration tests project for the C# integration library. It leverages xunit, WireMock.Net, Snapshooter, NSubstitute, and Bogus to provide a robust testing environment. The project includes tests for the ErpService and OrderService, utilizing WireMock for mocking HTTP responses, Snapshooter for response comparison, Bogus for fake data generation, and NSubstitute for mocking dependencies. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
We have skipped reviewing this pull request. It seems to have been created by a bot (hey, gitauto-ai[bot]!). We assume it knows what it's doing!
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
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.
Sonarcsharp (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
✅ Build VTEX-SDK-dotnet 2.4.289 completed (commit 3ac732bff8 by @gitauto-ai[bot]) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
=====================================
Coverage 0.22% 0.22%
=====================================
Files 117 117
Lines 1777 1777
Branches 75 75
=====================================
Hits 4 4
+ Misses 1773 1771 -2
- Partials 0 2 +2 ☔ View full report in Codecov by Sentry. |
✅ Build VTEX-SDK-dotnet 2.4.300 completed (commit fb0b073778 by @gstraccini[bot]) |
Infisical secrets check: ✅ No secrets leaked! 💻 Scan logs1:38AM INF scanning for exposed secrets...
1:38AM INF 355 commits scanned.
1:38AM INF scan completed in 295ms
1:38AM INF no leaks found
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
✅ Build VTEX-SDK-dotnet 2.4.305 completed (commit aead4eb215 by @gstraccini[bot]) |
Quality Gate passedIssues Measures |
✅ Build VTEX-SDK-dotnet 2.4.318 completed (commit 3dc8926d3d by @gstraccini[bot]) |
Resolves #173
What is the feature
We are adding a comprehensive integration tests project for the C# integration library that interacts with the VTEX HTTP REST API. This feature aims to ensure that the integration library correctly handles various scenarios, including success, error, and edge cases when communicating with VTEX APIs.
Where / How to implement the feature and why
Set Up Integration Tests Project:
VTEX.Integration.Tests
within theTests
directory..csproj
file to include the necessary packages:Configure WireMock for Fake HTTP Requests:
WireMockServerFixture
class to manage the lifecycle of the WireMock server during tests.Use Snapshooter for Response Comparison:
Generate Fake Data with Bogus:
Mock Dependencies with NSubstitute:
Implement and Run Tests:
Anything the issuer needs to do
No action required.
Test these changes locally
Summary by Sourcery
Tests: