{"id":47778770,"url":"https://github.com/kommundsen/conjecture","last_synced_at":"2026-04-26T10:02:05.688Z","repository":{"id":348769965,"uuid":"1191985945","full_name":"kommundsen/Conjecture","owner":"kommundsen","description":"Property Testing library for .NET","archived":false,"fork":false,"pushed_at":"2026-04-10T17:33:54.000Z","size":1366,"stargazers_count":2,"open_issues_count":23,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-10T18:19:18.466Z","etag":null,"topics":["mstest","nunit","property-testing","xunit"],"latest_commit_sha":null,"homepage":"http://ommundsen.dev/Conjecture/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kommundsen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-MIT.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-25T19:26:53.000Z","updated_at":"2026-04-10T17:34:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kommundsen/Conjecture","commit_stats":null,"previous_names":["kommundsen/conjecture"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kommundsen/Conjecture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kommundsen%2FConjecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kommundsen%2FConjecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kommundsen%2FConjecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kommundsen%2FConjecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kommundsen","download_url":"https://codeload.github.com/kommundsen/Conjecture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kommundsen%2FConjecture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31855432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["mstest","nunit","property-testing","xunit"],"created_at":"2026-04-03T12:38:49.885Z","updated_at":"2026-04-22T20:01:53.210Z","avatar_url":"https://github.com/kommundsen.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conjecture.NET\n\n[![CI](https://github.com/kommundsen/Conjecture/actions/workflows/ci.yml/badge.svg)](https://github.com/kommundsen/Conjecture/actions/workflows/ci.yml)\n[![Docs](https://github.com/kommundsen/Conjecture/actions/workflows/docs.yml/badge.svg)](https://github.com/kommundsen/Conjecture/actions/workflows/docs.yml)\n[![Release](https://github.com/kommundsen/Conjecture/actions/workflows/release.yml/badge.svg)](https://github.com/kommundsen/Conjecture/actions/workflows/release.yml)\n\n[![Docs](https://img.shields.io/badge/docs-ommundsen.dev-blue)](https://ommundsen.dev/Conjecture/)\n\n[![NuGet: ConjectureCore](https://img.shields.io/nuget/v/Conjecture.Core?label=Core)](https://www.nuget.org/packages/Conjecture.Core)\n[![NuGet: Conjecture.Xunit](https://img.shields.io/nuget/v/Conjecture.Xunit?label=Xunit)](https://www.nuget.org/packages/Conjecture.Xunit)\n[![NuGet: Conjecture.Xunit.V3](https://img.shields.io/nuget/v/Conjecture.Xunit.V3?label=Xunit.V3)](https://www.nuget.org/packages/Conjecture.Xunit.V3)\n[![NuGet: Conjecture.NUnit](https://img.shields.io/nuget/v/Conjecture.NUnit?label=NUnit)](https://www.nuget.org/packages/Conjecture.NUnit)\n[![NuGet: Conjecture.MSTest](https://img.shields.io/nuget/v/Conjecture.MSTest?label=MSTest)](https://www.nuget.org/packages/Conjecture.MSTest)\n[![NuGet: Conjecture.TestingPlatform](https://img.shields.io/nuget/v/Conjecture.TestingPlatform?label=TestingPlatform)](https://www.nuget.org/packages/Conjecture.TestingPlatform)\n\n**Property-based testing for .NET** — a ground-up port of Python's [Hypothesis](https://github.com/HypothesisWorks/hypothesis).\n\n## What is it?\n\nWrite tests that describe *what* your code should do, and let Conjecture generate hundreds of random inputs to find the edge cases you'd never think of. When it finds a failure, it automatically **shrinks** the input to the smallest possible counterexample — no hand-written cases required.\n\n## Install\n\nPick the adapter for your test framework:\n\n```bash\ndotnet add package Conjecture.Xunit      # xUnit v2\ndotnet add package Conjecture.Xunit.V3   # xUnit v3\ndotnet add package Conjecture.NUnit      # NUnit\ndotnet add package Conjecture.MSTest     # MSTest\n```\n\n## Quick Example\n\n```csharp\nusing Conjecture.Xunit;\n\npublic class SortTests\n{\n    [Property]\n    public bool Sorting_is_idempotent(List\u003cint\u003e items)\n    {\n        var sorted = items.OrderBy(x =\u003e x).ToList();\n        var sortedTwice = sorted.OrderBy(x =\u003e x).ToList();\n        return sorted.SequenceEqual(sortedTwice);\n    }\n}\n```\n\nRun with `dotnet test`. Conjecture generates random lists, runs the property 100 times, and if it fails, shrinks the input to the minimal failing case.\n\n## Features\n\n- **Automatic test generation** — generates random inputs from type-aware strategies\n- **Intelligent shrinking** — finds the smallest failing input via byte-stream minimization\n- **LINQ composition** — build complex strategies with `Select`, `Where`, `SelectMany`\n- **All major frameworks** — xUnit v2, xUnit v3, NUnit, MSTest\n- **Source generators** — derive strategies for your types with `[Arbitrary]`\n- **Roslyn analyzers** — catch common mistakes at compile time\n- **Stateful testing** — model systems as state machines and explore command sequences\n- **Targeted testing** — steer generation toward extremes with `Target.Maximize` / `Target.Minimize`\n- **Recursive strategies** — generate bounded-depth trees and self-referential types\n- **Example database** — persist failing inputs for automatic regression prevention\n- **Structured logging** — structured events for generation, shrinking, and targeting phases\n\n## Documentation\n\nFull documentation is at **[ommundsen.dev/Conjecture](https://ommundsen.dev/Conjecture/)**:\n\n- [Quick Start](https://ommundsen.dev/Conjecture/articles/quick-start.html) — write your first property test in 5 minutes\n- [Tutorials](https://ommundsen.dev/Conjecture/articles/tutorials/01-your-first-property-test.html) — learn property-based testing step by step\n- [API Reference](https://ommundsen.dev/Conjecture/api/) — auto-generated from source\n- [Porting Guide](https://ommundsen.dev/Conjecture/articles/porting-guide.html) — coming from Python Hypothesis?\n- [Changelog](CHANGELOG.md)\n\n## Credit\n\nThis project is an attempt at a .NET port of [Hypothesis] for Python. The concept of this project builds on and would not be possible without the work of [David R. MacIver](https://www.drmaciver.com/) and [Zac Hatfield-Dodds](https://zhd.dev/), as well as the many other [authors](https://github.com/HypothesisWorks/hypothesis/blob/master/AUTHORS.rst) of the [Hypothesis] project.\n\n## License\n\nSource code: [MPL-2.0](LICENSE.txt) | NuGet packages: [MIT](LICENSE-MIT.txt)\n\n[Hypothesis]: https://github.com/HypothesisWorks/hypothesis\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkommundsen%2Fconjecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkommundsen%2Fconjecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkommundsen%2Fconjecture/lists"}