{"id":30388567,"url":"https://github.com/droolsassert/droolsassert","last_synced_at":"2025-08-21T07:17:34.560Z","repository":{"id":43768477,"uuid":"187173144","full_name":"droolsassert/droolsassert","owner":"droolsassert","description":"Drools unit and integration testing with JUnit and jbehave","archived":false,"fork":false,"pushed_at":"2025-03-07T13:46:55.000Z","size":1925,"stargazers_count":18,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-14T20:13:39.560Z","etag":null,"topics":["code-coverage","drools","jbehave","junit","performance-analysis","spring"],"latest_commit_sha":null,"homepage":"","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/droolsassert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/droolsassert"]}},"created_at":"2019-05-17T07:59:25.000Z","updated_at":"2025-03-07T13:45:50.000Z","dependencies_parsed_at":"2022-09-01T10:51:23.742Z","dependency_job_id":"8d518ff8-df9d-4ee2-b9e9-43365dbefc21","html_url":"https://github.com/droolsassert/droolsassert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/droolsassert/droolsassert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droolsassert%2Fdroolsassert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droolsassert%2Fdroolsassert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droolsassert%2Fdroolsassert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droolsassert%2Fdroolsassert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droolsassert","download_url":"https://codeload.github.com/droolsassert/droolsassert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droolsassert%2Fdroolsassert/sbom","scorecard":{"id":356686,"data":{"date":"2025-08-11","repo":{"name":"github.com/droolsassert/droolsassert","commit":"5d698f3dce3fcff71b38f6b48fbb7e6a12f57665"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"56 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-7rjr-3q55-vv33","Warn: Project is vulnerable to: GHSA-8489-44mv-ggj8","Warn: Project is vulnerable to: GHSA-p6xc-xr62-6r2g","Warn: Project is vulnerable to: GHSA-4jrv-ppp4-jm57","Warn: Project is vulnerable to: GHSA-2p3x-qw9c-25hh","Warn: Project is vulnerable to: GHSA-2q8x-2p7f-574v","Warn: Project is vulnerable to: GHSA-3ccq-5vw3-2p6x","Warn: Project is vulnerable to: GHSA-43gc-mjxg-gvrq","Warn: Project is vulnerable to: GHSA-4hrm-m67v-5cxr","Warn: Project is vulnerable to: GHSA-56p8-3fh9-4cvq","Warn: Project is vulnerable to: GHSA-59jw-jqf4-3wq3","Warn: Project is vulnerable to: GHSA-64xx-cq4q-mf44","Warn: Project is vulnerable to: GHSA-6w62-hx7r-mw68","Warn: Project is vulnerable to: GHSA-6wf9-jmg9-vxcc","Warn: Project is vulnerable to: GHSA-74cv-f58x-f9wf","Warn: Project is vulnerable to: GHSA-7chv-rrw6-w6fc","Warn: Project is vulnerable to: GHSA-8jrj-525p-826v","Warn: Project is vulnerable to: GHSA-cxfm-5m4g-x7xp","Warn: Project is vulnerable to: GHSA-f6hm-88x3-mfjv","Warn: Project is vulnerable to: GHSA-f8cc-g7j8-xxpm","Warn: Project is vulnerable to: GHSA-g5w6-mrj7-75h2","Warn: Project is vulnerable to: GHSA-h7v4-7xg3-hxcc","Warn: Project is vulnerable to: GHSA-hfq9-hggm-c56q","Warn: Project is vulnerable to: GHSA-hph2-m3g5-xxv4","Warn: Project is vulnerable to: GHSA-hrcp-8f3q-4w2c","Warn: Project is vulnerable to: GHSA-hvv8-336g-rx3m","Warn: Project is vulnerable to: GHSA-hwpc-8xqv-jvj4","Warn: Project is vulnerable to: GHSA-j563-grx4-pjpv","Warn: Project is vulnerable to: GHSA-j9h8-phrw-h4fh","Warn: Project is vulnerable to: GHSA-p8pq-r894-fm8f","Warn: Project is vulnerable to: GHSA-qpfq-ph7r-qv6f","Warn: Project is vulnerable to: GHSA-qrx8-8545-4wg2","Warn: Project is vulnerable to: GHSA-rmr5-cpv2-vgjf","Warn: Project is vulnerable to: GHSA-xw4p-crpj-vjx2","Warn: Project is vulnerable to: GHSA-599f-7c49-w659","Warn: Project is vulnerable to: GHSA-36p3-wjmg-h94x","Warn: Project is vulnerable to: GHSA-hh26-6xwr-ggv7","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264","Warn: Project is vulnerable to: GHSA-g5mm-vmx4-3rg7","Warn: Project is vulnerable to: GHSA-6gf2-pvqw-37ph","Warn: Project is vulnerable to: GHSA-rfmp-97jj-h8m6","Warn: Project is vulnerable to: GHSA-558x-2xjg-6232","Warn: Project is vulnerable to: GHSA-564r-hj7v-mcr5","Warn: Project is vulnerable to: GHSA-9cmq-m9j5-mvww","Warn: Project is vulnerable to: GHSA-wxqc-pxw9-g2p8","Warn: Project is vulnerable to: GHSA-2rmj-mq67-h97g","Warn: Project is vulnerable to: GHSA-2wrp-6fg6-hmc5","Warn: Project is vulnerable to: GHSA-4wrc-f8pq-fpqp","Warn: Project is vulnerable to: GHSA-ccgv-vj62-xf9h","Warn: Project is vulnerable to: GHSA-hgjh-9rj2-g67j"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T09:46:13.783Z","repository_id":43768477,"created_at":"2025-08-18T09:46:13.783Z","updated_at":"2025-08-18T09:46:13.783Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271442275,"owners_count":24760353,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-coverage","drools","jbehave","junit","performance-analysis","spring"],"created_at":"2025-08-21T07:17:31.854Z","updated_at":"2025-08-21T07:17:34.543Z","avatar_url":"https://github.com/droolsassert.png","language":"Java","funding_links":["https://www.buymeacoffee.com/droolsassert"],"categories":[],"sub_categories":[],"readme":"## Goal\n\nRelieve Drools JUnit testing \n\n## Audience\n\nThe goal of unit testing is to isolate each part of the program and show that the individual parts are correct. You can achieve this easier when working with drools using this library. Be certain about the rules being activated and the facts retained in your session for a scenario you need.\n\n## Approach\n\nUnit test is about taking minimum piece of code and test all possible usecases defining specification. With integration tests your goal is not all possible usecases but integration of several units that work together. Do the same with rules. Segregate rules by business meaning and purpose. Simplest 'unit under the test' could be file with single or [high cohesion](https://stackoverflow.com/q/10830135/448078) set of rules and what is required for it to work (if any), like common DSL definition file or decision table. For integration test you could take meaningful subset or all rules of the system. \n\n## Usage\n\nSpecify any combination of rules you want to test in single session using `@DroolsSession`, `logResources` to see what was actually included.  \nSpring ant-like [PathMatchingResourcePatternResolver](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html) gives you robust tool to include functionality you want to test together or segregate.  \n\n    @DroolsSession(\"**/project/rules/ruleUnderTest.drl\")\n\nDeclare JUnit5 [extension](https://junit.org/junit5/docs/current/user-guide/#extensions) for the test ([rule](https://www.baeldung.com/junit-4-rules) for JUnit4)\n\n    @RegisterExtension\n    public DroolsAssert drools = new DroolsAssert();\n\nSpecify list of rules expected to be activated for a scenario with `@TestRules` annotation in addition to assertions inside test method and use other useful utilities to deal with the session.\n\n    @Test\n    @TestRules(expected = \"atomic int rule\")\n    public void testInt() {\n        drools.insertAndFire(new AtomicInteger());\n        assertEquals(1, drools.getObject(AtomicInteger.class).get());\n    }\n\n## Examples\n\n[Dummy assertions](https://github.com/droolsassert/droolsassert/wiki/Dummy-assertions)  \n[Complex event processing](https://github.com/droolsassert/droolsassert/wiki/Complex-event-processing)  \n[Spring integration test](https://github.com/droolsassert/droolsassert/wiki/Spring-integration-test)  \n[Extend it with your application specific utilities](https://github.com/droolsassert/droolsassert/wiki/Extension-example)  \n[Gather performance statistic](https://github.com/droolsassert/droolsassert/wiki/Performance-stats)  \n[Activation report](https://github.com/droolsassert/droolsassert/wiki/Activation-report)  \n[State transition report](https://github.com/droolsassert/droolsassert/wiki/State-transition-report)  \n[Run tests in parallel](https://github.com/droolsassert/droolsassert/wiki/Parallel-run)  \n[Jbehave integration](https://github.com/droolsassert/droolsassert/wiki/Jbehave-integration)  \n[Jbehave Spring example](https://github.com/droolsassert/droolsassert/wiki/Jbehave-Spring-example)  \n[Jbehave extention](https://github.com/droolsassert/droolsassert/wiki/Jbehave-extention)  \n[JUnit vs jbehave](https://github.com/droolsassert/droolsassert/wiki/JUnit-vs-jbehave)  \n\n## Maven dependency\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.droolsassert\u003c/groupId\u003e\n        \u003cartifactId\u003edroolsassert\u003c/artifactId\u003e\n        \u003cversion\u003ex.x.x\u003c/version\u003e\n        \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n\n## Compatibility matrix\n\u003ctable style=\"border-spacing: 10px;\"\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cb\u003eDrools\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eJunit5\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eJunit4\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eJava\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cb\u003e10.x.x\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e3.4.2\u003c/td\u003e\u003ctd\u003e2.8.2\u003c/td\u003e\u003ctd\u003e17+\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cb\u003e9.x.x\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e3.3.4\u003c/td\u003e\u003ctd\u003e2.7.8\u003c/td\u003e\u003ctd\u003e11+\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cb\u003e8.x.x\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e3.1.10\u003c/td\u003e\u003ctd\u003e2.6.10\u003c/td\u003e\u003ctd\u003e11+\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cb\u003e7.x.x\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e3.0.19\u003c/td\u003e\u003ctd\u003e2.5.19\u003c/td\u003e\u003ctd\u003e1.8+\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003cb\u003e6.4+\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e2.4.12\u003c/td\u003e\u003ctd\u003e2.3.13\u003c/td\u003e\u003ctd\u003e1.8+\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n## Support\n[Buy me a coffee](https://www.buymeacoffee.com/droolsassert)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroolsassert%2Fdroolsassert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroolsassert%2Fdroolsassert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroolsassert%2Fdroolsassert/lists"}