clockworklabs / clockworklabs/SpacetimeDB

Test coverage - SDK test suites

Open
#2,378 0 comments 0 reactions 0 assignees View on GitHub

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

test flow

  1. create project with module and client
  2. deploy module
  3. run generate
  4. build sdk
  5. 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 generate bindings 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

write test harness in rust

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.