{"id":15010280,"url":"https://github.com/clojure/test.generative","last_synced_at":"2025-04-06T08:15:16.355Z","repository":{"id":57739114,"uuid":"1654364","full_name":"clojure/test.generative","owner":"clojure","description":"Generative test runner","archived":false,"fork":false,"pushed_at":"2024-07-15T17:57:34.000Z","size":339,"stargazers_count":162,"open_issues_count":2,"forks_count":16,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-30T06:09:46.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clojure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2011-04-23T18:24:45.000Z","updated_at":"2024-12-19T15:01:30.000Z","dependencies_parsed_at":"2024-02-19T20:45:25.185Z","dependency_job_id":"e82f4029-efda-47fc-bcdb-6550e7721068","html_url":"https://github.com/clojure/test.generative","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.generative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.generative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.generative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojure%2Ftest.generative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clojure","download_url":"https://codeload.github.com/clojure/test.generative/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451667,"owners_count":20940944,"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-09-24T19:33:21.797Z","updated_at":"2025-04-06T08:15:16.329Z","avatar_url":"https://github.com/clojure.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"clojure.test.generative\n========================================\n\nGenerative test runner.\n\nReleases and Dependency Information\n========================================\n\nLatest stable release: 1.1.0\n\n* [All Released Versions](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22test.generative%22)\n* [Development Snapshot Versions](https://oss.sonatype.org/index.html#nexus-search;gav~org.clojure~test.generative~~~)\n\n[CLI/`deps.edn`](https://clojure.org/reference/deps_edn) dependency information:\n```clojure\norg.clojure/test.generative {:mvn/version \"1.1.0\"}\n```\n\n[Leiningen](https://github.com/technomancy/leiningen) dependency information:\n\n    [org.clojure/test.generative \"1.1.0\"]\n\n[Maven](https://maven.apache.org/) dependency information:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.clojure\u003c/groupId\u003e\n      \u003cartifactId\u003etest.generative\u003c/artifactId\u003e\n      \u003cversion\u003e1.1.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\nExample Usages\n========================================\n\nA defspec consists of a name, a function to be tested, an input spec,\nand a validator:\n\n    (defspec integers-closed-over-addition\n      (fn [a b] (+' a b))                    ;; input fn\n      [^long a ^long b]                     ;; input spec\n      (assert (integer? %)))                ;; 0 or more validator forms\n\nTo generate test data, see the fns in the generators namespace. Note\nthat these functions shadow a bunch of clojure.core names.\n\nYou can also create the underlying test data structures directly,\nmarking vars with :clojure.test.generative/specs so they are picked up\nby the runner.  This can be useful e.g. to model relationships between\ninput parameters, or to specify a finite list of special cases. The\nexample below specifies five specific one-argument arg lists:\n\n    (def ^::tgen/specs\n      inc'-doesnt-overflow-specs\n      [{:test 'clojure.test.math-test/inc'-doesnt-overflow\n        :input-gen #(map vector [Long/MIN_VALUE -1 0 1 Long/MAX_VALUE])}])\n\n\nRunning Interactively During Development \n========================================\n\nSpecify the number of threads, the number of msec, and one or more\nvars to test:\n\n    (runner/run 2 1000 #'my/test-var)\n\n\nRunning in a CI environment\n========================================\n\nWire your runner to call runner/-main with a list of directories where\ntests can be found.  You can see bin/test.clj for an example.\n\nYou can use the following system properties to control the intensity\nof your test\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eJava Property\u003c/th\u003e\u003cth\u003eInterpretation\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eclojure.test.generative.threads\u003c/td\u003e\u003ctd\u003eNumber of concurrent threads\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eclojure.test.generative.msec\u003c/td\u003e\u003ctd\u003eDesired test run duration\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nDeveloper Information\n========================================\n\n* [GitHub project](https://github.com/clojure/test.generative)\n* [Bug Tracker](https://clojure.atlassian.net/browse/TGEN)\n* [Continuous Integration](https://github.com/clojure/test.generative/actions/workflows/test.yml)\n\nRelated Projects\n========================================\n\n* [ClojureCheck](https://bitbucket.org/kotarak/clojurecheck) adds\n  property based testing to clojure.test following the lines of\n  [QuickCheck](https://en.wikipedia.org/wiki/QuickCheck) for Haskell.\n* [simple-check](https://github.com/reiddraper/simple-check) is a\n  Clojure property-based testing tool inspired by QuickCheck.\n\nCopyright and License\n========================================\n\nCopyright (c) Rich Hickey. All rights reserved.  The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (https://opensource.org/license/epl-1-0/) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound bythe terms of this license.  You must not remove this notice, or any other, from this software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Ftest.generative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclojure%2Ftest.generative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojure%2Ftest.generative/lists"}