{"id":18464694,"url":"https://github.com/norfairking/testing-in-rust","last_synced_at":"2025-04-29T19:48:26.439Z","repository":{"id":237409439,"uuid":"678761623","full_name":"NorfairKing/testing-in-rust","owner":"NorfairKing","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-17T15:24:50.000Z","size":30702,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T16:50:49.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NorfairKing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-15T10:09:43.000Z","updated_at":"2025-04-25T11:41:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"b66ebacb-4834-432e-a977-9e275a4d05bd","html_url":"https://github.com/NorfairKing/testing-in-rust","commit_stats":null,"previous_names":["norfairking/testing-in-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorfairKing%2Ftesting-in-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorfairKing%2Ftesting-in-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorfairKing%2Ftesting-in-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorfairKing%2Ftesting-in-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NorfairKing","download_url":"https://codeload.github.com/NorfairKing/testing-in-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251573400,"owners_count":21611288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T09:10:47.140Z","updated_at":"2025-04-29T19:48:26.418Z","avatar_url":"https://github.com/NorfairKing.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Testing in rust\n\nA comparison of testing features in Rust.\n\n## Features \u0026 Comparison\n\n|                                                                                           | Cargo test | [Rspec](https://rust-rspec.github.io/rspec/rspec/index.html) | [Cargo Nextest](https://nexte.st/)\n|-----------------------------------------------------------------------------------------------|---|---|---|\n| Declarative test definition                                                                   | ✔️ | ✔️ | ✔️ |\n| Monadic test definition                                                                       | ✖️ | ✔️ | ✖️ |\n| Safe test execution                                                                           | ? | ? | ? |\n| Parallel test execution                                                                       | ✔️ | ✔️ | ✔️ |\n| Parallel test execution by default                                                            | ✔️ | ✔️ | ✔️ |\n| Parallel or sequential test-group execution                                                   | ✖️ | ✖️ | ✖️ |\n| Automatic test discovery                                                                      | ✔️ | ✖️ | ✔️ |\n| Automatic test discovery with shared resources                                                | ✖️ | ✖️ | ✖️ |\n| First-class support for pure tests                                                            | ✖️ | ✔️ | ✖️ |\n| First-class support for integration tests                                                     | ✔️ | ✔️ | ✔️ |\n| First-class support for property tests                                                        | ✖️ | ✖️ | ✖️ |\n| First-class support for golden tests                                                          | ✖️ | ✖️ | ✖️ |\n| Source location annotations for tests in test output                                          | ✔️ | ✖️ | ✖️ |\n| Test suite filtering to select which tests to run                                             | ✔️ | ✖️ | ✔️ |\n| Individual test execution timing                                                              | ✔️ | ✖️ | ✔️ |\n| Test group execution timing                                                                   | ✖️ | ✖️ | ✖️ |\n| Test suite execution timing                                                                   | ✔️ | ✔️ | ✔️ |\n| Helpful output to find slow tests                                                             | ✖️ | ✖️ | ✔️ |\n| Coloured output                                                                               | ✔️ | ✔️ | ✔️ |\n| Colourless output                                                                             | ✔️ | ✖️ | ✔️ |\n| Pretty-printed output for counterexample output                                               | ✖️ | ✖️ | ✔️ |\n| Fancy Unicode output                                                                          | ✖️ | ✖️ | ✖️ |\n| Assertion-specific output with explanation                                                    | ✔️ | ✔️ | ✔️ |\n| Coloured diffing                                                                              | ✖️ | ✖️ | ✖️ |\n| multi-line diffing                                                                            | ✖️ | ✖️ | ✖️ |\n| Contextual failures                                                                           | ✖️ | ✖️ | ✖️ |\n| Named predicates                                                                              | ✖️ | ✖️ | ✖️ |\n| Inter-test progress output during test suite execution                                        | ✖️ | ✖️ | ✖️ |\n| Intra-test progress output during test suite execution                                        | ✔️ | ✖️ | ✔️ |\n| Optional standard output and standard error suppression                                       | ✔️ | ✖️ | ✔️ |\n| Acquire and release a resource for every test in a group (`before` and `after`)               | ✖️ | ✔️ | ✖️ |\n| Acquire and release a resource once for an entire test group (`before_all` and `after_all`)   | ✖️ | ✔️ | ✖️ |\n| Wrap a each test to use a `withResource`-like function (`around`) [0]                         | ✖️ | ✖️ | ✖️ |\n| Wrap a test group to use a `withResource`-like function (`aroundAll`) [0]                     | ✖️ | ✖️ | ✖️ |\n| Randomising execution order                                                                   | ✖️ [1]| ✖️ | ✖️ |\n| Randomised execution order by default                                                         | ✖️ | ✖️ | ✖️ |\n| Deterministic randomness for randomised execution                                             | ✖️ | ✖️ | ✖️ |\n| Deterministic randomness for randomised execution order by default                            | ✖️ | ✖️ | ✖️ |\n| Deterministic randomness                                                                      | ✖️ | ✖️ | ✖️ |\n| Deterministic randomness by default                                                           | ✖️ | ✖️ | ✖️ |\n| Deterministic randomness instructions for rerunning tests                                     | ✖️ | ✖️ | ✖️ |\n| Hiding process arguments from tests                                                           | ✖️ | ✖️ | ✖️ |\n| Declaring that an individual test should fail                                                 | ✖️ | ✖️ | ✖️ |\n| Using scarce resources across tests                                                           | C | C | C |\n| A way to fail the test suite as soon as one test fails (`--fail-fast`)                        | ✔️ | ✖️ | ✔️ |\n| Fully configurable via flags                                                                  | ✔️ | ✖️ | ✔️ |\n| Fully configurable via environment variables                                                  | ✖️ | ✖️ | ✔️ |\n| Fully configurable via configuration file                                                     | ✖️ | ✖️ | ✔️ |\n| Pending tests                                                                                 | ✖️ | ✖️ | ✖️ |\n| Iterative testing to diagnose flakiness                                                       | ✖️ [2] | ✖️ |   |\n| Retry tests                                                                                   | ✖️ | ✖️ | ✔️ |\n| Automatic flakiness diagnostics                                                               | ✖️ | ✖️ | ✖️ |\n| Flakiness combinators to practically deal with flakiness                                      | ✖️ | ✖️ | ✔️ |\n| Test suite profiling with graphs                                                              | ✖️ | ✖️ | ✖️ |\n\n* ✔️: Supported \n* Lib: Possible with an extra library\n* C: Possible but you have to write some code yourself\n* 🚧 — Under development\n* ✖️: Not supported\n* ?: I don't know.\n\nPlease let me know if I made a mistake anywhere, and feel free to fill in the question marks\n\n[0]: These are not really necessary in Rust (I think?) because there are no exceptions.\n[1]: I've seen this feature discussed but it's not in my version of cargo yet.\n[2]: It's been requested: https://github.com/rust-lang/cargo/issues/11354\n\n### Definitions\n\nThe list of features above was taken from [the sydtest readme](https://github.com/NorfairKing/sydtest).\nThe features are described in detail there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorfairking%2Ftesting-in-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnorfairking%2Ftesting-in-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnorfairking%2Ftesting-in-rust/lists"}