{"id":22432540,"url":"https://github.com/runforesight/jexter","last_synced_at":"2026-01-11T16:55:04.809Z","repository":{"id":47695881,"uuid":"396680729","full_name":"runforesight/jexter","owner":"runforesight","description":"Extensions/Plugins for JVM test frameworks","archived":false,"fork":false,"pushed_at":"2021-08-17T19:02:25.000Z","size":49,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-28T10:17:11.060Z","etag":null,"topics":["junit","junit4","junit5","test","testing"],"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/runforesight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-16T07:46:00.000Z","updated_at":"2023-02-20T20:49:48.000Z","dependencies_parsed_at":"2022-08-30T12:10:57.121Z","dependency_job_id":null,"html_url":"https://github.com/runforesight/jexter","commit_stats":null,"previous_names":["thundra-io/jexter"],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runforesight%2Fjexter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runforesight%2Fjexter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runforesight%2Fjexter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runforesight%2Fjexter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runforesight","download_url":"https://codeload.github.com/runforesight/jexter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228377712,"owners_count":17910449,"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":["junit","junit4","junit5","test","testing"],"created_at":"2024-12-05T22:12:04.246Z","updated_at":"2026-01-11T16:55:04.803Z","avatar_url":"https://github.com/runforesight.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jexter\n\n![Build Status](https://github.com/thundra-io/jexter/actions/workflows/build.yml/badge.svg)\n[![License](https://img.shields.io/github/license/thundra-io/jexter.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n![Lifecycle](https://img.shields.io/osslifecycle/thundra-io/jexter.svg)\n\nExtensions/Plugins for JVM test frameworks (JUnit 4, JUnit 5, ...)\n\n## Get Jexter\n\nBinaries are available from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cio.thundra).\n\n|Group|Artifact|Latest Stable Version|\n|-----------|---------------|---------------------|\n|io.thundra|jexter-*|[![Maven Central](https://img.shields.io/maven-central/v/io.thundra/jexter.svg)]()|\n\nFor Maven:\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003eio.thundra\u003c/groupId\u003e\n\t\u003cartifactId\u003ejexter-...\u003c/artifactId\u003e\n\t\u003cversion\u003e\u003c!--...--\u003e\u003c/version\u003e\n\t\u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nFor Gradle:\n\n```groovy\ntestCompile group: 'io.thundra', name: 'jexter-...', version: /*...*/\n```\n\nBelow are the various artifacts published:\n\n|Artifact|Description|\n|-----------|---------------|\n|[jexter-core](jexter-core)|Core module|\n|[jexter-junit4-core](jexter-junit4-core)|JUnit4 core module|\n|[jexter-junit5-core](jexter-junit5-core)|JUnit5 core module|\n\n## Versioning\n\nArtifact versions are in `X.Y.Z` format\n- `X`: Major version number. \n  - Increases only when there are big API and/or architectural changes. \n  - Breaks backward compatibility.\n- `Y`: Minor version number. \n  - Increases for small API changes and big improvements. \n  - Breaks backward compatibility.\n- `Z`: Patch version number. \n  - Increases for bug fixes and small improvements. \n  - Doesn’t break backward compatibility. \n\n## Requirements\n\n* JDK 1.8+ (for build and execution)\n* Maven 3.x (for build)\n\n## Build\n\nTo build:\n\n```\n$ git clone git@github.com:thundra-io/jexter.git\n$ cd jexter/\n$ mvn clean install\n```\n\n## How to Use\n\n### Utilities/Helpers\n\n#### **`EnvironmentVariableHelper`**\n\n##### Set environment variable\n```java\nimport io.thundra.jexter.core.envvar.EnvironmentVariableHelper;\n\n...\n\nEnvironmentVariableHelper.set(\"env-var-name\", \"env-var-value\");\n\n```\n\n##### Remove environment variable\n```java\nimport io.thundra.jexter.core.envvar.EnvironmentVariableHelper;\n\n...\n\nEnvironmentVariableHelper.remove(\"env-var-name\");\n\n```\n\n### JUnit 4 Rules\n\n#### **`EnvironmentVariableSandboxRule`**\n\nStores environment variables before the test and restores them back to original value after the test.\n \n- Add `jexter-junit4-core` dependency\n- Define `EnvironmentVariableSandboxRule` as test or class level rule\n \n**Method level:**\n```java\nimport io.thundra.jexter.junit4.core.envvar.EnvironmentVariableSandboxRule;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @Rule\n    public EnvironmentVariableSandboxRule rule = new EnvironmentVariableSandboxRule();\n\n    ...\n\n}\n```\n**Class level:**\n```java\nimport io.thundra.jexter.junit4.core.envvar.EnvironmentVariableSandboxRule;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @ClassRule\n    public static EnvironmentVariableSandboxRule rule = new EnvironmentVariableSandboxRule();\n\n    ...\n\n}\n```\n\n#### **`SystemPropertySandboxRule`**\n\nStores system properties before the test and restores them back to original value after the test.\n \n- Add `jexter-junit4-core` dependency\n- Define `SystemPropertySandboxRule` as test or class level rule \n\n**Method level:**\n```java\nimport io.thundra.jexter.junit4.core.sysprop.SystemPropertySandboxRule;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @Rule\n    public SystemPropertySandboxRule rule = new SystemPropertySandboxRule();\n\n    ...\n\n}\n```\n**Class level:**\n```java\nimport io.thundra.jexter.junit4.core.sysprop.SystemPropertySandboxRule;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @ClassRule\n    public static SystemPropertySandboxRule rule = new SystemPropertySandboxRule();\n\n    ...\n\n}\n```\n\n#### **`StopwatchRule`**\n\nMeasures the elapsed time of a test or test suite (class) execution.\n \n- Add `jexter-junit4-core` dependency\n- Define `StopwatchRule` as test or class level rule \n\n**Method level:**\n```java\nimport io.thundra.jexter.junit4.core.sw.StopwatchRule;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @Rule\n    public StopwatchRule rule = new StopwatchRule();\n\n    ...\n\n}\n```\n**Class level:**\n```java\nimport io.thundra.jexter.junit4.core.sw.StopwatchRule;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @ClassRule\n    public static StopwatchRule rule = new StopwatchRule();\n\n    ...\n\n}\n```\n\n### JUnit 5 Extension\n\n#### **`EnvironmentVariableSandboxExtension`**\n\nStores environment variables before the test and restores them back to original value after the test.\n\n- Add `jexter-junit5-core` dependency\n- Annotate test method or class by `@EnvironmentVariableSandbox` annotation\n\n**Method level:**\n```java\nimport io.thundra.jexter.junit5.core.envvar.EnvironmentVariableSandbox;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @EnvironmentVariableSandbox\n    @Test\n    public void test() {\n        ...\n    }\n\n    ...\n\n}\n```\n**Class level:**\n```java\nimport io.thundra.jexter.junit5.core.envvar.EnvironmentVariableSandbox;\n\n...\n\n@EnvironmentVariableSandbox\npublic class TheTest {\n\n    ...\n\n    @Test\n    public void test() {\n        ...\n    }\n\n    ...\n\n}\n```\n\n#### **`SystemPropertySandboxExtension`**\n\nStores system properties before the test and restores them back to original value after the test.\n\n- Add `jexter-junit5-core` dependency\n- Annotate test method or class by `@SystemPropertySandbox` annotation\n\n**Method level:**\n```java\nimport io.thundra.jexter.junit5.core.sysprop.SystemPropertySandbox;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @SystemPropertySandbox\n    @Test\n    public void test() {\n        ...\n    }\n\n    ...\n\n}\n```\n**Class level:**\n```java\nimport io.thundra.jexter.junit5.core.sysprop.SystemPropertySandbox;\n\n...\n\n@SystemPropertySandbox\npublic class TheTest {\n\n    ...\n\n    @Test\n    public void test() {\n        ...\n    }\n\n    ...\n\n}\n```\n\n#### **`StopwatchExtension`**\n\nMeasures the elapsed time of a test or test suite (class) execution.\n\n- Add `jexter-junit5-core` dependency\n- Annotate test method or class by `@Stopwatch` annotation\n\n**Method level:**\n```java\nimport io.thundra.jexter.junit5.core.sw.Stopwatch;\n\n...\n\npublic class TheTest {\n\n    ...\n\n    @Stopwatch\n    @Test\n    public void test() {\n        ...\n    }\n\n    ...\n\n}\n```\n**Class level:**\n```java\nimport io.thundra.jexter.junit5.core.sw.Stopwatch;\n\n...\n\n@Stopwatch\npublic class TheTest {\n\n    ...\n\n    @Test\n    public void test() {\n        ...\n    }\n\n    ...\n\n}\n```\n\n## Issues and Feedback\n\n[![Issues](https://img.shields.io/github/issues/thundra-io/jexter.svg)](https://github.com/thundra-io/jexter/issues?q=is%3Aopen+is%3Aissue)\n[![Closed issues](https://img.shields.io/github/issues-closed/thundra-io/jexter.svg)](https://github.com/thundra-io/jexter/issues?q=is%3Aissue+is%3Aclosed)\n\nPlease use [GitHub Issues](https://github.com/thundra-io/jexter/issues) for any bug report, feature request and support.\n\n## Contribution\n\n[![Pull requests](https://img.shields.io/github/issues-pr/thundra-io/jexter.svg)](https://github.com/thundra-io/jexter/pulls?q=is%3Aopen+is%3Apr)\n[![Closed pull requests](https://img.shields.io/github/issues-pr-closed/thundra-io/jexter.svg)](https://github.com/thundra-io/jexter/pulls?q=is%3Apr+is%3Aclosed)\n[![Contributors](https://img.shields.io/github/contributors/thundra-io/jexter.svg)]()\n\nIf you would like to contribute, please \n- Fork the repository on GitHub and clone your fork.\n- Create a branch for your changes and make your changes on it.\n- Send a pull request by explaining clearly what is your contribution.\n\n\u003e Tip: Please check the existing pull requests for similar contributions and consider submit an issue to discuss the proposed feature before writing code.\n\n## LICENSE\n\nCopyright (c) 2018 Thundra, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunforesight%2Fjexter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunforesight%2Fjexter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunforesight%2Fjexter/lists"}