Skip to content
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

Testing utilities for JS/TS services #101

Closed
Tracked by #204
tillrohrmann opened this issue Jun 20, 2023 · 6 comments
Closed
Tracked by #204

Testing utilities for JS/TS services #101

tillrohrmann opened this issue Jun 20, 2023 · 6 comments
Assignees

Comments

@tillrohrmann
Copy link
Contributor

In order to provide a good dev-ex, it would be great if we provided our users some testing utilities to easily test their services via unit and integration tests.

@slinkydeveloper
Copy link
Contributor

In the Java SDK we have some testing utilities based on testcontainers. This is a sample usage: https://github.com/restatedev/sdk-java/blob/main/sdk-test/src/test/java/dev/restate/sdk/testing/CounterTest.java

We could replicate the same experience in the ts sdk using testcontainers-node

@tillrohrmann
Copy link
Contributor Author

Would it possible to directly use test-containers w/o a wrapping framework? If so, could it become an example?

@slinkydeveloper
Copy link
Contributor

Would it possible to directly use test-containers w/o a wrapping framework? If so, could it become an example?

Totally possible, the Java sdk-test module is just a thin wrapper that automates the port forwarding and the registration of the service, nothing more than that.

If so, could it become an example?

We can definitely start from that I believe, it will just look a bit manual at the beginning, but i guess it's fine.

@tillrohrmann
Copy link
Contributor Author

An idea that came up was to publish our testcontainer image as an official testcontainers module.

@slinkydeveloper
Copy link
Contributor

Some experiments: restatedev/node-template-generator#19

@slinkydeveloper
Copy link
Contributor

Solved by adding an example.

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

No branches or pull requests

2 participants