All Projects → glytching → Junit Extensions

glytching / Junit Extensions

Licence: apache-2.0
JUnit5 extensions library including JUnit5 equivalents of some of the common JUnit4 rules: ExpectedException, TemporaryFolder etc

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Junit Extensions

three-musketeers
A simple module to introspect, debug and test any THREE.js application.
Stars: ✭ 30 (-23.08%)
Mutual labels:  unit-testing, testing-tools
JUnitPerf
API performance testing framework built using JUnit
Stars: ✭ 48 (+23.08%)
Mutual labels:  junit, testing-tools
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging 🤗
Stars: ✭ 20 (-48.72%)
Mutual labels:  unit-testing, testing-tools
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (+5.13%)
Mutual labels:  unit-testing, testing-tools
Awesome Unit Testing Swift
A curated collection of awesome blog articles, books, talks, podcasts, tools/frameworks and examples.
Stars: ✭ 272 (+597.44%)
Mutual labels:  testing-tools, unit-testing
scalatest-junit-runner
JUnit 5 runner for Scalatest
Stars: ✭ 30 (-23.08%)
Mutual labels:  junit, testing-tools
angular-karma test-explorer
vscode extension for easy angular testing and debugging
Stars: ✭ 67 (+71.79%)
Mutual labels:  unit-testing, testing-tools
Bats Core
Bash Automated Testing System
Stars: ✭ 2,820 (+7130.77%)
Mutual labels:  testing-tools, junit
jdbdt
JDBDT: Java Database Delta Testing
Stars: ✭ 12 (-69.23%)
Mutual labels:  junit, testing-tools
dummyjdbc
dummyjdbc answers database requests with dummy data to be independent of an existing database.
Stars: ✭ 20 (-48.72%)
Mutual labels:  unit-testing, junit
toster
DSL framework for testing Android apps
Stars: ✭ 31 (-20.51%)
Mutual labels:  unit-testing, testing-tools
Deepstate
A unit test-like interface for fuzzing and symbolic execution
Stars: ✭ 603 (+1446.15%)
Mutual labels:  testing-tools, unit-testing
Junit Dataprovider
A TestNG like dataprovider runner for JUnit with many additional features
Stars: ✭ 226 (+479.49%)
Mutual labels:  testing-tools, junit
jest-teamcity
Jest Teamcity Reporter
Stars: ✭ 29 (-25.64%)
Mutual labels:  unit-testing, testing-tools
Simple Headless Chrome
Simple abstraction to use Chrome as a Headless Browser with Node JS
Stars: ✭ 216 (+453.85%)
Mutual labels:  testing-tools, unit-testing
EasyUtAndroid
Android unit testing example 全面的android应用单元测试方法及案例
Stars: ✭ 21 (-46.15%)
Mutual labels:  unit-testing, junit
Acutest
Simple header-only C/C++ unit testing facility.
Stars: ✭ 170 (+335.9%)
Mutual labels:  testing-tools, unit-testing
Mocktopus
Mocking framework for Rust
Stars: ✭ 179 (+358.97%)
Mutual labels:  testing-tools, unit-testing
trx2junit
Transforms XML from trx-Testresults to JUnit-Testresults / trx to JUnit XML and the other way round
Stars: ✭ 42 (+7.69%)
Mutual labels:  unit-testing, junit
System Rules
A collection of JUnit rules for testing code which uses java.lang.System.
Stars: ✭ 492 (+1161.54%)
Mutual labels:  unit-testing, junit

JUnit Extensions

Build Status Coverage Status Scrutinizer Javadoc Maven Central GitHub Release

With thanks and appreciation to the authors of JUnit5.

There have been discussions amongst the JUnit community (see this and this) about providing official JUnit Jupiter Extensions for the most popular JUnit4 Rules. The upshot of these discussions seems to be enabling limited support for JUnit4 rules on JUnit5. For anyone who would rather move entirely to JUnit5, this library provides JUnit5 implementations of some of the commonly used JUnit4 rules.

Documentation

Extensions

  • BenchmarkExtension: publishes test elapsed time to the console, by default, but also available via the EngineExecutionListener for customised reporting.
  • ExpectedExceptionExtension: allows you to run a test method with an expected exception and (optionally) exception message, delegating responsibility for making the assertion to the extension.
  • RandomBeansExtension: allows you to inject random instances of classes into your tests, useful when you need a class instance to test with but you don't care about its contents.
  • SystemPropertyExtension: allows you to set system properties before test execution and reverts these changes on test completion.
  • TemporaryFolderExtension: allows you to create temporary files and directories in your test, any such files or directories created in your tests are removed for you when the tests complete.
  • TestNameExtension: allows you to use the name of the currently executing test within your test cases.
  • WatcherExtension: logs test execution flow including entry, exit and elapsed time in milliseconds.

Using JUnit-Extensions

The junit-extensions library is available on Maven Central:

Maven

<dependency>
    <groupId>io.github.glytching</groupId>
    <artifactId>junit-extensions</artifactId>
    <version>2.4.0</version>
    <scope>test</scope>
</dependency>

Gradle

testCompile 'io.github.glytching:junit-extensions:2.4.0'

Building JUnit-Extensions

$ git clone https://github.com/glytching/junit-extensions.git
$ cd junit-extensions
$ mvn clean install

This will compile and run all automated tests and install the library in your local Maven repository.

Note: the code is formatted using the Google Code Formatter.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.###
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].