test: add k6 load testing, E2E tests, fuzz testing, and Pact contract tests#883
Merged
Merged
Conversation
…mission simulation - k6/load-test.js: simulates full trade lifecycle under concurrent load (create, list, deposit, confirm, dispute) - k6/stellar-sim.js: simulates Stellar RPC interactions (account lookup, tx simulation, submission, status polling) - k6/options.js: shared configurations for load, soak, and stress test profiles - k6/README.md: usage documentation Issue: KingFRANKHOOD#293
- tests/e2e/wallet-connect.spec.ts: wallet connection via Freighter, JWT storage, authenticated page access - tests/e2e/trade-lifecycle.spec.ts: full lifecycle (create trade, deposit, confirm delivery, dispute, combined end-to-end) - tests/e2e/dispute-resolution.spec.ts: mediator dashboard, dispute resolution with equal split, evidence submission - Updated playwright.config.ts to include tests/e2e in the test directory Covers: connect wallet, create trade, deposit, confirm delivery, dispute
- state_machine_fuzz_tests.rs includes 6 new property-based fuzz modules: 1. prop_state_machine_random_ops: random sequence of lifecycle operations 2. prop_fuzz_addresses_in_create_trade: invalid/self-referencing addresses 3. prop_storage_integrity_rapid_transitions: rapid state transitions 4. prop_resolve_dispute_fuzz: all loss-sharing param combinations 5. prop_boundary_fuzz: edge-case amounts with extreme fee rates 6. prop_many_trades_rapid_creation: rapid multi-trade creation & counters Builds on existing QuickCheck infrastructure (bps_fuzz_tests.rs)
- frontend/tests/pact/trades.pact.test.ts: consumer-side Pact tests covering all trades API endpoints (create, deposit, confirm, release, dispute, get, list, stats) using PactV3 + MatchersV3 - backend/src/__tests__/trades.pact.verify.test.ts: provider-side verification against generated pact files with state handlers - Installed @pact-foundation/pact v17 in both frontend and backend This establishes the contract testing pipeline between frontend (consumer) and backend (provider) for the trades API.
|
@Sundriveauto Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…check - Downgrade @pact-foundation/pact from v17 to v16 (requires Node >=20, CI uses Node 20) - Regenerate npm package-lock.json files for frontend and backend - Add pnpm.onlyBuiltDependencies config for @pact-foundation/pact-core - Fix contract deployment safety check regex to accept cdylib+rlib crate-type - Replace iso8601DateTimeWithMillis with datetime matcher (v3 API compat)
- Change all CI gates (frontend, backend, mobile) from npm ci to pnpm install --frozen-lockfile (project uses pnpm as package manager) - Use pnpm/action-setup for pnpm bootstrapping and pnpm caching - Remove npm audit and lockfile verification steps (not applicable with pnpm) - Fix contract deployment safety check regex to accept both ['cdylib', 'rlib'] and ['rlib'] crate-type formats
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
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.
Closes #786
Closes #787
Closes #788
Closes #789
Summary
Adds four new testing capabilities: k6 load testing, Playwright E2E, contract fuzz testing with QuickCheck, and Pact consumer-driven contract tests.
Commits