{"id":31065274,"url":"https://github.com/holixon/axon-testing","last_synced_at":"2025-09-15T15:54:24.176Z","repository":{"id":37934269,"uuid":"314334294","full_name":"holixon/axon-testing","owner":"holixon","description":"Extensions that allow better testing of Axon applications","archived":false,"fork":false,"pushed_at":"2025-08-18T21:16:12.000Z","size":1078,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-08-18T22:29:23.375Z","etag":null,"topics":["axon-framework","bdd-style-testing-framework","jgiven","testing-framework"],"latest_commit_sha":null,"homepage":"","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/holixon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/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,"zenodo":null}},"created_at":"2020-11-19T18:21:02.000Z","updated_at":"2025-08-18T21:16:16.000Z","dependencies_parsed_at":"2023-09-23T12:49:09.003Z","dependency_job_id":"3c24516d-b1e1-4295-ac21-2deb86557226","html_url":"https://github.com/holixon/axon-testing","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/holixon/axon-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holixon%2Faxon-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holixon%2Faxon-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holixon%2Faxon-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holixon%2Faxon-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holixon","download_url":"https://codeload.github.com/holixon/axon-testing/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holixon%2Faxon-testing/sbom","scorecard":{"id":410197,"data":{"date":"2025-08-11","repo":{"name":"github.com/holixon/axon-testing","commit":"b1ea98d10136cf410142aa000c3badf8dae2a12d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Maintained","score":10,"reason":"19 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","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":10,"reason":"no dangerous workflow patterns detected","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":-1,"reason":"Found no human activity in the last 29 changesets","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/development.yml:1","Warn: no topLevel permission defined: .github/workflows/master.yml:1","Warn: no topLevel permission defined: .github/workflows/release-notes.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/development.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/development.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/development.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/development.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/master.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/master.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/master.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-notes.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/release-notes.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-notes.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/release-notes.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-notes.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/holixon/axon-testing/release-notes.yml/develop?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":"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":"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":"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 'develop'"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"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-18T22:29:46.046Z","repository_id":37934269,"created_at":"2025-08-18T22:29:46.046Z","updated_at":"2025-08-18T22:29:46.046Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275281932,"owners_count":25437090,"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-09-15T02:00:09.272Z","response_time":75,"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":["axon-framework","bdd-style-testing-framework","jgiven","testing-framework"],"created_at":"2025-09-15T15:54:21.993Z","updated_at":"2025-09-15T15:54:24.167Z","avatar_url":"https://github.com/holixon.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axon Testing\n\n[![stable](https://img.shields.io/badge/lifecycle-STABLE-green.svg)](https://github.com/holisticon#open-source-lifecycle)\n[![Build Status](https://github.com/holixon/axon-testing/workflows/Development%20branches/badge.svg)](https://github.com/holixon/axon-testing/actions)\n[![sponsored](https://img.shields.io/badge/sponsoredBy-Holisticon-RED.svg)](https://holisticon.de/)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.holixon.axon.testing/axon-testing-jgiven-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.holixon.axon.testing/axon-testing-jgiven-core)\n\nThis library is an opinionated collection of testing utilities used along and with Axon Framework.  \n\n## Components\n\n### Axon JGiven\n\nWe believe that scenario testing (BDD style) is useful for tests of systems built with Axon Framework. It starts with tests for \nsingle aggregates and sagas, for which Axon Framework provides Axon Test Fixtures. The test of more complex components and their \ninteraction should follow the same pattern.\n\nFor both kind of tests, we propose to use a JVM Framework for BDD testing called JGiven.\n\n### Axon Upcaster Testing\n\nWriting event upcasters is sometimes difficult. Testing of them require even more effort. The library helps to create \neasy upcaster JUnit 5 tests.\n\nImagine you need to test an upcaster for the `fixture.bankaccount.event.AccountCreatedEvent` in an application using \nJackson serializer. The old event revision was `12` and the new revision is `13`. There are only few steps needed to \nimplement such a test.\n\nPlease put the following dependency on your project classpath:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.holixon.axon.testing\u003c/groupId\u003e\n  \u003cartifactId\u003eaxon-testing-upcaster-junit5\u003c/artifactId\u003e\n  \u003cversion\u003e4.x.x.x\u003c/version\u003e\n  \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nNow create a JUnit 5 test for your upcaster:\n\n```java\n// the package is important to put event data in correct folder inside the test resources\npackage io.holixon.axon.testing.examples.upcaster.junit5.java;\n\n// intentionally left out some trivial imports \n\nimport io.holixon.axon.testing.upcaster.MessageEncoding;\nimport io.holixon.axon.testing.upcaster.UpcasterTest;\n\nimport static io.holixon.axon.testing.upcaster.UpcasterTestSupport.*;\n\n// the class name is important\npublic class AccountCreatedEventUpcastingJavaTest {\n\n\t// must be defined as a static field of type matching the MessageEncoding\n\t// the initialization is extracted to a separate method for simplicity\n\tprivate final static JacksonSerializer jacksonSerializer = createJacksonSerializer();\n\n\t// special annotation in use at least specifying the encoding type\n\t@UpcasterTest(messageEncoding = MessageEncoding.JACKSON)\n\t// important method name as the last folder\n\tpublic void upcasts_account_created_jackson(\n\t\t\t// will contain ordered sequence of source events, see explanation below\n\t\t\tList\u003cIntermediateEventRepresentation\u003e sourceEvents,\n\t\t\t// will contain ordered sequence of result events, see explanation below\n\t\t\tList\u003cIntermediateEventRepresentation\u003e expectedSerializedEvents) {\n\n\t\tAccountCreatedEventUpcaster upcaster = new AccountCreatedEventUpcaster();\n\n\t\tStream\u003cIntermediateEventRepresentation\u003e upcastedStream = upcaster.upcast(sourceEvents.stream());\n\t\tList\u003cAccountCreatedEvent\u003e upcastedEvents = deserializeEvents(upcastedStream, jacksonSerializer).collect(\n\t\t\t\tCollectors.toList());\n\n\t\t// asserts\n\t\tList\u003cAccountCreatedEvent\u003e expectedEvents = deserializeEvents(expectedSerializedEvents, jacksonSerializer);\n\t\tassertThat(upcastedEvents).containExactlyElementsOf(expectedEvents);\n\t}\n}\n```\nThis looks like a miracle that the source events are passed in to the test, can be directly passed to the upcaster under the test\nand the result can be asserted using the collection of expected events. Indeed, the library makes use of JUnit 5 parameterized test\nfunctionality, by defining a custom argument provider reading events from the file system. \n\nWe believe this is a good\npractice for upcaster and upcaster chain testing, where several representations of different versions of the same event exist and must \nbe managed and set-up for the test. In also helps in situations where comparison with the expected event as an object in Java is \nnot feasible because only one version of a class may be available (probably the latest one).\n\nBack to the test class implementation, please pay attention to the `static` `JacksonSerializer` defined in the test class and on \nthe full-qualified name of the test class and the test method name.\n\nThe content of the `src/test/resources` folder is as following:\n\n```\n└── io\n    └── holixon\n        └── axon\n            └── testing\n                └── examples\n                    └── upcaster\n                        └── junit5\n                            └── java\n                                └── AccountCreatedEventUpcastingJavaTest\n                                    └── upcasts_account_created_jackson\n                                        ├── 1__fixture.bankaccount.event.AccountCreatedEvent__12.json\n                                        ├── 2__fixture.bankaccount.event.AccountCreatedEvent__12.json\n                                        ├── 1__fixture.bankaccount.event.AccountCreatedEvent__13__result.json\n                                        └── 2__fixture.bankaccount.event.AccountCreatedEvent__13__result.json\n```\n\nThe full-qualified class name and the test method name are mapped to the directory structure. Inside the test data directory,\nthere are four files. Those two of them without the `__result` suffix are read in and considered to be JSON representations\nof source events. The source events are passed to the test method annotated by the `@UpcasterTest` as a first parameter `sourceEvents`. \nThe other two with the `__result` suffix are considered to be JSON representations of the expected events, received after the \nupcaster run. Those will be passed to the test method as the second parameter `expectedSerializedEvents`. \n\nThe ordering of the files (in each group) is determined based on the first numbers before the first `__` separator. The next part of \nthe file name is considered as the type name of the stored event. Finally, the last number is representing the revision of the event.\n\nYou may want to use only parts of the functionality above. A good starting point for this are our examples. Please consider to look at the \n`io.holixon.axon.testing.upcaster.UpcasterTestSupport` class for helpful methods. In addition, you might want to use the `@UpcasterTest`\nfunctionality in a slightly different way. The method signature of the test method may have one or two parameters (expected events must not be read \nfrom the filesystem) of different types: `List\u003cIntermediateEventRepresentation\u003e` to get intermediate representation, `List\u003cString\u003e` to get\nthe file content of the read-in files or just `List\u003cFile\u003e` to get the files matching criteria. There are some additional options on\nthe `@UpcasterTest` annotation to tune the behaviour of the parameterized test argument provider. You can specify different strategy to \nresolve the payload type and revision and a different content retrieval strategy.\n\n## Changelog\n\n### 4.8.0.0\n\n* BREAKING: we removed support for the `axon-testing-jgiven-junit4` module, as junit5 is the new standard. You can still manually use junit4 by using the `core`module and add missing dependencies.\n* Semantic Versioning: To get a bit more freedom when it comes to versioning this lib, we decided to use only the first 2 digits (`4.8.`) to indicate the axon-framework version, the last two digits (`0.0.`) are used for our own minor/patch versions.\n\n\n### 4.7.4.0\n\n* Beginning with release `4.7.4.0` we changed to a semantic versioning model where the first 3 digits refer to the axon framework version this lib is supposed to work withm the last digit is the build version of this lib against the framework.\n\n\n## License\n\nThis library is developed under\n\n[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](/LICENSE)\n\n## Sponsors and Customers\n\n[![sponsored](https://img.shields.io/badge/sponsoredBy-Holisticon-red.svg)](https://holisticon.de/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholixon%2Faxon-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholixon%2Faxon-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholixon%2Faxon-testing/lists"}