clockworklabs / clockworklabs/SpacetimeDB
Test coverage - SDK test suites
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
Rust SDK test suite is complete and merged (though will likely be extended in the future in response to new features or discovering bugs). We now need to port the tests to the C#, Python and TypeScript SDKs.
Original design doc:
- write test suites for all the different SDKs
- have minimum checklist for things that should be tested
- shared modules for test suites across all SDKs
- potentially comment out parts of them or have some other “expected failure” infra to support differences in SDK functionality
- e.g. C# does not support enums with payloads, so will need to avoid that test
- potentially comment out parts of them or have some other “expected failure” infra to support differences in SDK functionality
test flow
- create project with module and client
- deploy module
- run generate
- build sdk
- run test
to test
- subscribing, resubscribing
- calling reducer and getting response
- failing reducer and getting notified
- auth flow, both getting new tokens and re-auth with existing tokens
- express all (many?) types and
generatebindings for them- contexts
- table fields
- reducer arguments
- non-table type definitions
- types
- strings
- incl. strings that need escapes
- arrays
- of all the other types
- enums
- without payloads
- with payloads
- structs
- containing primitive types
- containing enums
- containing arrays
- bools
- integers
- floats
- maps?
- maybe left as TODO
- strings
- contexts
write test harness in rust
- run spacetimedb in-process
- run clients as subprocesses
- use their exit codes to communicate failure
- they print to stderr to describe failure
- offer
--describe <test>flag- prints to stdout what the test does
- then exits
- be as concurrent as possible
- this means running multiple test modules on the same stdb instance
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with crates/testing/tests/standalone_integration_test.rs, which the issue names as the model for running SpacetimeDB in-process. Review the stated test flow and the Rust SDK suite before deciding how the C#, Python, and TypeScript clients should run as subprocesses. Done means comparable SDK coverage for the listed subscription, reducer, authentication, and type-generation cases, with documented exceptions for unsupported features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python, rust, typescript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100