Skip to content

feat(cts): lenient JSON assertion helpers for e2e tests#6099

Merged
Fluf22 merged 8 commits into
fix/generatorsfrom
fix/test-helpers
May 1, 2026
Merged

feat(cts): lenient JSON assertion helpers for e2e tests#6099
Fluf22 merged 8 commits into
fix/generatorsfrom
fix/test-helpers

Conversation

@Fluf22
Copy link
Copy Markdown
Collaborator

@Fluf22 Fluf22 commented Mar 12, 2026

Jira: API-463

Summary

Extracted from #5860 — new hand-written lenient JSON assertion helpers for C#, Java, and Kotlin e2e tests.

Changes

  • C# TestHelpers.cs: Union-based lenient JSON comparison (keeps only expected structure from actual response)
  • Java TestHelpers.java: Same approach for Java
  • Kotlin TestHelpers.kt: Same approach for Kotlin
  • generation.config.mjs: Mark test helper files as hand-written (non-generated)
  • e2e templates (C#, Java, Kotlin): Replace direct JSONAssert/Quibble calls with new helpers

@Fluf22 Fluf22 requested a review from a team as a code owner March 12, 2026 13:15
@Fluf22 Fluf22 requested review from eric-zaharia and shortcuts and removed request for a team March 12, 2026 13:15
@algolia-bot
Copy link
Copy Markdown
Collaborator

algolia-bot commented Mar 12, 2026

✔️ Code generated!

Name Link
🪓 Triggered by a85e6a8c6123249f39a7b0591b08ca30b45ff3ef
🍃 Generated commit dbef423b24d9b2e227b9732507e92e8eeefac86e
🌲 Generated branch generated/fix/test-helpers
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
go 2554
javascript 2309
php 1713
csharp 1574
python 1432
java 1103
ruby 931
swift 810
scala 23

@Fluf22 Fluf22 changed the title feat(tests): lenient JSON assertion helpers for e2e tests feat(cts): lenient JSON assertion helpers for e2e tests Mar 12, 2026
@MarioAlexandruDan MarioAlexandruDan self-requested a review March 24, 2026 10:00
Copy link
Copy Markdown
Contributor

@MarioAlexandruDan MarioAlexandruDan left a comment

Choose a reason for hiding this comment

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

Tested (with 12 unit tests per language) and all looks good!

@Fluf22 Fluf22 force-pushed the fix/test-helpers branch from 62ae635 to 452ac04 Compare May 1, 2026 06:15
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 1, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes.

@Fluf22 Fluf22 force-pushed the fix/test-helpers branch from 452ac04 to f57b33d Compare May 1, 2026 07:05
Base automatically changed from fix/templates to fix/generators May 1, 2026 12:28
@Fluf22 Fluf22 merged commit 689799b into fix/generators May 1, 2026
38 of 49 checks passed
@Fluf22 Fluf22 deleted the fix/test-helpers branch May 1, 2026 12:29
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.

3 participants