{"id":13989325,"url":"https://github.com/cuppa-framework/cuppa","last_synced_at":"2025-04-10T00:42:58.305Z","repository":{"id":50224106,"uuid":"47345553","full_name":"cuppa-framework/cuppa","owner":"cuppa-framework","description":"Cuppa - A testing framework for Java 8+","archived":false,"fork":false,"pushed_at":"2024-04-18T08:12:39.000Z","size":852,"stargazers_count":18,"open_issues_count":22,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-10T00:42:51.992Z","etag":null,"topics":["bdd","bdd-framework","java","java-8","java8","tdd","tdd-framework","testing","testing-tools","unit-test","unit-testing","unittest"],"latest_commit_sha":null,"homepage":"http://cuppa.forgerock.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuppa-framework.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":"2015-12-03T16:42:45.000Z","updated_at":"2025-01-06T08:26:43.000Z","dependencies_parsed_at":"2024-09-28T23:20:36.455Z","dependency_job_id":"8436f109-5780-4ff8-acb6-c684f7964570","html_url":"https://github.com/cuppa-framework/cuppa","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppa-framework%2Fcuppa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppa-framework%2Fcuppa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppa-framework%2Fcuppa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppa-framework%2Fcuppa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuppa-framework","download_url":"https://codeload.github.com/cuppa-framework/cuppa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137998,"owners_count":21053775,"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":["bdd","bdd-framework","java","java-8","java8","tdd","tdd-framework","testing","testing-tools","unit-test","unit-testing","unittest"],"created_at":"2024-08-09T13:01:36.379Z","updated_at":"2025-04-10T00:42:58.270Z","avatar_url":"https://github.com/cuppa-framework.png","language":"Java","readme":"# [Cuppa](http://cuppa.forgerock.org/) [![Build Status](https://travis-ci.org/cuppa-framework/cuppa.svg?branch=master)](https://travis-ci.org/cuppa-framework/cuppa) [![Coverage Status](https://coveralls.io/repos/github/cuppa-framework/cuppa/badge.svg?branch=master)](https://coveralls.io/github/cuppa-framework/cuppa?branch=master)\n\nCuppa is a testing framework for Java 8. It makes writing tests productive and fun.\n\n * **Be descriptive:** Use strings – not identifiers – to clearly describe the behaviour you are testing. Test reports\n produced by Cuppa read like good documentation.\n * **Group tests together:** Create structure in your test files to reduce repetition and improve readability. Groups of\n tests can share setup and teardown steps.\n * **Define tests at runtime:** Cuppa makes it trivial to write parameterised tests. It's as simple as a \u003ccode\u003efor\u003c/code\u003e loop.\n Cuppa is also easy to extend - there's no need to write annotations.\n\n## Example\n\n```java\n@Test\npublic class ListTest {\n    {\n        describe(\"List\", () -\u003e {\n            describe(\"#indexOf\", () -\u003e {\n                it(\"returns -1 when the value is not present\", () -\u003e {\n                    List\u003cInteger\u003e list = Arrays.asList(1, 2, 3);\n                    assertThat(list.indexOf(5)).isEqualTo(-1);\n                });\n            });\n        });\n    }\n}\n```\n\nCheck out [the website](http://cuppa.forgerock.org/) for more examples.\n\n## Getting Started\n\nFor full details see [the getting started guide](http://cuppa.forgerock.org/docs/getting-started) on the\nwebsite.\n\n#### Maven\n\nAdd a test dependency for Cuppa in your project's POM:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.forgerock.cuppa\u003c/groupId\u003e\n    \u003cartifactId\u003ecuppa\u003c/artifactId\u003e\n    \u003cversion\u003e1.4.0\u003c/version\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nSee the [Maven integration guide](http://cuppa.forgerock.org/docs/maven-integration) for details on how to get Maven to\nrun the tests automatically.\n\n### Plain Old Jar File\n\nAlternatively, you can download binaries for the\n[latest release](https://github.com/cuppa-framework/cuppa/releases/latest).\n\nTo run your Cuppa tests, use the Cuppa API:\n\n```java\npublic class EntryPoint {\n    public static void main(String[] args) {\n        Runner runner = new Runner();\n        TestBlock rootBlock = runner.defineTests(Collections.singletonList(MyTestClass.class));\n        runner.run(rootBlock, new DefaultReporter());\n    }\n}\n```\n\n## Contribute\n\n### Prerequisites\n\nYou'll need JDK 8 installed and available on the path.\n\n### Building\n\nCuppa is built using [Gradle](https://gradle.org/):\n\n```shell\n$ cd cuppa\n$ ./gradlew build\n```\n\nRun `./gradlew tasks` to see a list of all available tasks.\n\n## License\n\nCuppa is licensed under an [Apache 2.0 license](./LICENSE). The documentation is licensed under a\n[Creative Commons license](./LICENSE-docs).\n\nCuppa is inspired by the wonderful \u003ca href=\"https://mochajs.org\"\u003eMocha\u003c/a\u003e, a testing framework for JavaScript.\n","funding_links":[],"categories":["Java","测试"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppa-framework%2Fcuppa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuppa-framework%2Fcuppa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppa-framework%2Fcuppa/lists"}