{"id":16895825,"url":"https://github.com/bnorm/junit5-contingent","last_synced_at":"2025-03-20T13:54:32.846Z","repository":{"id":57717924,"uuid":"285313457","full_name":"bnorm/junit5-contingent","owner":"bnorm","description":"JUnit5 extension for making unit tests contingent on other unit test success","archived":false,"fork":false,"pushed_at":"2020-08-09T17:29:12.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-25T13:22:20.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/bnorm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-05T14:29:50.000Z","updated_at":"2020-08-09T17:26:03.000Z","dependencies_parsed_at":"2022-08-24T07:11:07.719Z","dependency_job_id":null,"html_url":"https://github.com/bnorm/junit5-contingent","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fjunit5-contingent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fjunit5-contingent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fjunit5-contingent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fjunit5-contingent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnorm","download_url":"https://codeload.github.com/bnorm/junit5-contingent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244623029,"owners_count":20483060,"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-10-13T17:26:27.895Z","updated_at":"2025-03-20T13:54:32.822Z","avatar_url":"https://github.com/bnorm.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# junit5-contingent\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.bnorm.junit5.contingent/junit5-contingent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.bnorm.junit5.contingent/junit5-contingent)\n\nAllows for JUnit 5 tests to be contingent on the success of other tests.\n\n## Why?\n\nUnit tests can fail for all sorts of reasons. Sometimes a multitude of failures\ncan hide the unit test failures which expose the actual bug. If unit tests,\nwhich implicitly depended on functionality tested by other unit tests, failed\nearly with a clear message what implicit dependency failed, then it could be\neasier pinpoint the actual problem. That's the problem this library is\nattempting to solve.\n\nAlso, I wanted to see if it could be done using JUnit 5 extensions. Yeah,\nmainly this reason.\n\n## Example\n\nIn the following example, tests `required1` and `required2` will be executed\nfirst. If none of them fail, then tests `dependent1` and `dependent2` will be\nallowed to run.\n\n```java\n@ContingentExtension\nclass ContingentTests {\n    @Test @Tag(\"required\")\n    public void required1() {}\n\n    @Test @Tag(\"required\")\n    public void required2() {}\n\n    @Test @Contingent(\"required\")\n    public void dependent1() {}\n\n    @Test @Contingent(\"required\")\n    public void dependent2() {}\n}\n```\n\n## What's Next?\n\n- API: I'm not happy with the use of Tags to mark required tests. I don't like\n  having to match raw strings for creating this link. The whole API layer could\n  be greatly improved.\n\n- Cross-Class Linking: Right now unit tests are only linked if they exist in\n  the same class. It would be great if they could be linked for all discovered\n  unit tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnorm%2Fjunit5-contingent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnorm%2Fjunit5-contingent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnorm%2Fjunit5-contingent/lists"}