Skip to content

Conversation

@vnikolova
Copy link
Collaborator

@vnikolova vnikolova commented Dec 24, 2025

KTOR-8549
KTOR-7388

  • add new sections in server-testing for setup and accessing the application instance
  • add a new test using the application property in a sample project
  • add an entry in "What's new in Ktor 3.2.0"

@vnikolova vnikolova requested a review from osipxd December 24, 2025 11:03
@vnikolova vnikolova self-assigned this Dec 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

Walkthrough

Added a test asserting the Application instance inside a testApplication scope matches the configured instance. Rewrote and reorganized server-testing documentation, added guidance for accessing Application in tests, and inserted two duplicate whats-new entries demonstrating ApplicationTestBuilder.application usage.

Changes

Cohort / File(s) Summary
Test addition
codeSnippets/snippets/embedded-server-modules/src/test/kotlin/EmbeddedServerTest.kt
Added testAccessApplicationInstance() to capture the configured Application via the test builder, call startApplication(), retrieve the current application, and assert identity; added Application import.
Server testing docs (large rework)
topics/server-testing.md
Extensive reorganization: replaced step lists with a holistic workflow, clarified dependencies (ktor-server-test-host, kotlin-test), added sections (configure-test-app, access-application, configure-client, make-request, assert), updated examples, code snippets, and lifecycle notes about startApplication.
Whats-new entries (duplicated)
topics/whats-new-320.md
Inserted two identical sections (in different locations) showing ApplicationTestBuilder.application access with examples and notes comparing it to the previous nested application block approach.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • bjhham

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description directly relates to the changeset, referencing specific JIRA issues and clearly outlining the three main changes made.
Title check ✅ Passed The title directly relates to the main changes: it references both ticket numbers (KTOR-8549 and KTOR-7388), mentions server testing setup documentation, and specifically calls out accessing the application instance—all core focuses of the changeset across documentation and test code.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vnikolova/KTOR-8549

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vnikolova vnikolova changed the title KTOR-8549 Add documentation for accessing the application instance in server tests KTOR-8549 and KTOR-7388 Server testing setup and accessing the application instance Dec 24, 2025
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