{"id":37023741,"url":"https://github.com/beanfiller/beanfiller-tcases","last_synced_at":"2026-01-14T02:51:29.562Z","repository":{"id":57732567,"uuid":"138708349","full_name":"beanfiller/beanfiller-tcases","owner":"beanfiller","description":"Generate Java beans based on tcases combinatorial testing","archived":false,"fork":false,"pushed_at":"2019-01-06T10:01:55.000Z","size":252,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-28T10:08:36.290Z","etag":null,"topics":["beans","java","junit","testing"],"latest_commit_sha":null,"homepage":null,"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/beanfiller.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-26T08:30:39.000Z","updated_at":"2018-07-16T23:50:45.000Z","dependencies_parsed_at":"2022-09-11T16:41:36.758Z","dependency_job_id":null,"html_url":"https://github.com/beanfiller/beanfiller-tcases","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/beanfiller/beanfiller-tcases","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanfiller%2Fbeanfiller-tcases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanfiller%2Fbeanfiller-tcases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanfiller%2Fbeanfiller-tcases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanfiller%2Fbeanfiller-tcases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beanfiller","download_url":"https://codeload.github.com/beanfiller/beanfiller-tcases/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanfiller%2Fbeanfiller-tcases/sbom","scorecard":{"id":229413,"data":{"date":"2025-08-11","repo":{"name":"github.com/beanfiller/beanfiller-tcases","commit":"83f929344c312cc242d27a913ae1ad28e8a9027d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/2 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":"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":"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":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1","Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"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":"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.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"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-17T04:34:02.928Z","repository_id":57732567,"created_at":"2025-08-17T04:34:02.928Z","updated_at":"2025-08-17T04:34:02.928Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["beans","java","junit","testing"],"created_at":"2026-01-14T02:51:28.958Z","updated_at":"2026-01-14T02:51:29.532Z","avatar_url":"https://github.com/beanfiller.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beanfiller-Tcases\n\n---\n\n**This project is in early alpha stage, expect bugs, missing features, API changes**\n\n---\n[![Build Status](https://travis-ci.org/beanfiller/beanfiller-tcases.svg?branch=master)](https://travis-ci.org/beanfiller/beanfiller-tcases}) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![HitCount](http://hits.dwyl.com/beanfiller/beanfiller-tcases.svg)](http://hits.dwyl.com/beanfiller/beanfiller-tcases)\n\nAn annotation and reflections based java-library to fill Java beans with values according to combinatorial testing principles.\nCombinatorial testing helps to run a useful small subset of tests where full coverage would require too many tests.\nThis is useful for acceptance-testing, integration-testing, and unit-testing of functions with high complexity.\n\n## Short introduction\n\n```java\npublic class EmojiTestInput {\n\n    @Var(value = {@Value(\"^\"), @Value(\"°\"), @Value(\"ಠ\"), @Value(\"≖\"), @Value(\"•\"),\n           @Value(\"ˇ\"), @Value(\"˘\"), @Value(\"ᴗ\"), @Value(\"\\\"\"), @Value(\"\u003c\"), @Value(\"╥\")})\n    char eye;\n\n    @Var(value = {@Value(\"-\"), @Value(\"_\"), @Value(\"‿\"), @Value(\"∇\"), @Value(\"◡\"),\n           @Value(\"³\"), @Value(\"ᴗ\"), @Value(\"﹏\"), @Value(\".\")})\n    char snoot;\n\n    @Var(value = {@Value(\"\\\\/\"), @Value(\"ᕙᕗ\"), @Value(\"ᕦᕤ\"), @Value(\"┌ʃ\")})\n    String arms;\n\n    private String getFace() {\n        return (arms == null ? \"\" : arms.substring(0, 1))\n                + '(' + eye + snoot + eye + ')' // chars cannot be null\n                + (arms == null ? \"\" : arms.substring(1, 2));\n    }\n\n    public static void main(String[] args) {\n        int tupleSize = 2;\n        List\u003cEmojiTestInput\u003e testCases = new FunctionTestsCreator\u003c\u003e(EmojiTestInput.class)\n                        .tupleGenerator(tupleSize)\n                        .createDefs();\n\n        testCases.forEach(test -\u003e System.out.println(test.getFace()));\n\n        System.out.println(\"\\n\" + testCases.size() + \" faces generated with independent \"\n                           + tupleSize + \"-tuples or properties\");\n    }\n}\n```\n\nRunning this class yields:\n\n```\n\\(^-^)/  ᕙ(^-^)ᕗ  ᕦ(^-^)ᕤ  ┌(^-^)ʃ  (^-^)  (^_^)  ᕦ(^◡^)ᕤ  ┌(^◡^)ʃ  ┌(°﹏°)ʃ  (°﹏°)  \\(°.°)/   \\(ಠ-ಠ)/  ᕙ(ಠ-ಠ)ᕗ  ᕦ(ಠ-ಠ)ᕤ  ┌(ಠ-ಠ)ʃ  (ಠ-ಠ) ...\n119 faces generated with independent 2-tuples or properties\n```\n\nOf the total possible combinations (11 x 9 x 5 = 495), this is a smaller subset of 119 faces where for each trait-pair (e.g. eyes and mouth) each combination appears at least once. (TODO: Show how number can be further reduced)\nAs test-inputs, using such subsets instead of all combinations reduces test-time while detecting most bugs that would be found by testing all combinations (some studies suggest 75% of bugs).\n\nThis shows only a small part of the possibilities to define combinations, for boundary-value testing conditions and failure values are very powerful.\n\n## Motivation\n\nWhen automating tests for system with complex inputs, a challenge is maintaining a large set of test input combinations, another challenge is to keep the duration of running all tests low.\nUsing Beanfiller-tcases, java developers can model any number of testcases in a simple java bean and have instances automatically generated to run tests, with the benefit of pairwise testing reducing the total number of tests.\n\nThis project uses [Tcases](https://github.com/Cornutum/tcases), a tool for combinatorial testing.\nTcases is intended as a standalone CLI tool to maintain a set of testcase xml-files over time, possibly maintaining also a set of generated+modified Test sources (in any language) containing expected values for each generated testcase (a.k.a Oracle).\n\nIn contract to Tcases, Beanfiller-Tcases aims to be used as a java library without necessarily handling XML or generated testing code.\nA tester can easily generate a small subset of combinations of test variables, and thus have an easily readable and maintainable testing codebase.\n\n## In-depth example\n\nThe initial Emoji example is just an introduction to how to use the library to manage combinatorial code problems.\n\nTODO: Add an actual test exampe here with conditions and failures.\n\n## How to use\n\n### In Maven\n\n```\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.github.beanfiller\u003c/groupId\u003e\n      \u003cartifactId\u003ebeanfiller-tcases\u003c/artifactId\u003e\n      \u003cversion\u003e[latestVersion]\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\n### In Gradle\n\n```\ndependencies {\n    testCompile 'io.github.beanfiller:beanfiller-tcases:[latestVersion]'\n}\n```\n\nThe library can be used freely in any other Unit testing framework like JUnit or TestNg.\nIt comes with only a few common dependencies:\n\n```\n+--- org.cornutum.tcases:tcases-lib\n     +--- org.apache.commons:commons-lang3\n     +--- org.apache.commons:commons-collections4\n     \\--- org.slf4j:slf4j-api\n```\n\nThere are example projects in the samples subfolder to look at.\n\n## Test design\n\nAs a general approach for using this library, it is recommended to split the test code in 3 parts:\n\n1. The testcase **input definition**\n2. The actual **test input/output** values derived from the **input definition**\n3. A parametrized tests running all tests cases with given **test input** and validate given **test output**\n\nIn simple cases the input definition can also serve as test input (Like in the example at the top), but when adding constraints this approach quickly becomes unmanageable.\n\n\n## Q \u0026 A\n\n### When should I use this?\n\nThe main benefit is for situations where you need to test many combinations of input values and tests are too slow to just run all possible combinations.\nIt might however also be beneficial when you need to run all combinations, and need a good way to define those combinations with nested structures.\n\n### What datatypes can be used?\n\nBy default the library will work with Java primitives, Numbers, Booleans, Strings and Enums.\nCustom Mappers can extend this to other types.\n\n### Why not annotate methods instead of Beans?\n\nSince one test seems to test one function, it might be useful to annotate a function, like\n\n```java\n    public void foo(@Values(@Value(\"\"), @Value(\"x\"), ...) String a,\n                    @Values(@Value(\"\"), @Value(\"x\"), ...) String b,\n                    @Values(@Value(\"\"), @Value(\"x\"), ...) String c, ...)\n```\n\nThen foo could be directly called by the framework.\nHowever this is usually not practical, because a testcase definition needs to define and contain more metadata, and often the testcase values must be transformed into actual function inputs.\n\n\n### How to handle expected test outputs?\n\nIn Tcases, the developer generally has to define the expected test output *after* generating combinations.\nThis can be done in a separate file, or in generated JUnit code.\n\nManaging additional files mapping inputs to expected test outputs is tedious (to write and to maintain later on).\n\nBut in some cases, since the testcase knows moe than the input values, output values can be derived from the test definitions.\nIn particular, the test case has knowledge about:\n\n1. The intended semantics of a value\n2. The indented semantics of a testcase\n3. Additional annotations added to the testcase model\n4. The construction of actual test values\n\nThis knowledge can enable a test to correctly define an expected output without running the system under test.\n\n### Doesn't this approach violate the KISS (Keep it simple stupid) guideline for testing?\n\nYes and no: the principle suggests to use the simplest out of all alternatives.\nMaintaining 1000s of testcase methods that have been first generated and then manually extended can be much more complex than an approach without code generation.\nHowever when your testcode becomes complex, it may be wise to write tests for your testcode itself.\n\n## Resources\n\nOn pairwise testing:\n\n* The Tcases guide: http://www.cornutum.org/tcases/docs/Tcases-Guide.htm\n* Overview of pairwise-testing https://en.wikipedia.org/wiki/All-pairs_testing\n* Overview of combinatorial testing tools: http://www.pairwise.org/tools.asp\n* Overview of Boundary Value testing https://en.wikipedia.org/wiki/Boundary_testing\n\nOn very different approaches that also generate values for testing:\n\n* Overview of Property-based testing https://en.wikipedia.org/wiki/QuickCheck\n* EvoSuite http://www.evosuite.org/\n* Mockaroo https://mockaroo.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeanfiller%2Fbeanfiller-tcases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeanfiller%2Fbeanfiller-tcases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeanfiller%2Fbeanfiller-tcases/lists"}