Skip to content

Integration tests (withServerpod) should exercise the normal serialization logic #3840

Open

Description

@tp

Problem to Solve

While investigating a previous serialization issue which only occured with top-level endpoint parameters / return values (#1908), I was surprised that the error could not be reproduced using integration tests.

As it seems those tests pass around the objects directly and do not employ the usual full serialization/deserialization flow.

So while we fixed the original issue since, we wanted to follow up with adding proper serialized round-tripping in the integration tests, so any "production" / E2E issues would also be caught there.

Proposal

Run the full serialization/deserialization logic used in end-to-end client/server scenarios in integration tests.

Currently there seem to be some shortcuts and special code paths for e2e vs. integration clients, which would be great to avoid to cover more of the real-world usage in tests.

Use Case

For us it would've been nice to write a test showcasing the problem faster, but my primary motivation for fixing this would be users of the framework, for whom it should be much easier to write integration tests vs. full blown E2E tests.

If they can exercise more of the application's logic in a test and thus ideally would have found the above bug locally instead of production, that'd be a big win.

Alternatives

Alternatively, one can write full E2E tests.

Additional context

With regards to the original bug triggering this request, maybe using the full (de)serialization logic would also help exercise user's custom model serialization logic (if that is also not currently the case in integration tests).

How experienced are you with this library?

None

Are you interested in working on a PR for this?

  • I want to work on this

Activity

  1. added
    enhancement
    on Jul 31, 2025
  2. added
    area: test framework
    on Aug 8, 2025
  3. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: test frameworkenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions