Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/innoq/junit5-logging-extension
JUnit 5 extension for testing log statements
https://github.com/innoq/junit5-logging-extension
java junit junit-extension junit-jupiter junit-jupiter-extension junit5 logback logging slf4j
Last synced: 2 months ago
JSON representation
JUnit 5 extension for testing log statements
- Host: GitHub
- URL: https://github.com/innoq/junit5-logging-extension
- Owner: innoq
- License: apache-2.0
- Created: 2022-09-10T14:39:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T14:20:38.000Z (3 months ago)
- Last Synced: 2024-11-04T15:29:12.714Z (3 months ago)
- Topics: java, junit, junit-extension, junit-jupiter, junit-jupiter-extension, junit5, logback, logging, slf4j
- Language: Java
- Homepage:
- Size: 195 KB
- Stars: 4
- Watchers: 9
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# JUnit 5 logging extension
*- Sometimes logging is important*[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.innoq/junit5-logging-extension/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.innoq/junit5-logging-extension)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Open Issues](https://img.shields.io/github/issues/innoq/junit5-logging-extension.svg)](https://github.com/innoq/junit5-logging-extension/issues)
[![Build Status](https://github.com/innoq/junit5-logging-extension/actions/workflows/main.yml/badge.svg)](https://github.com/innoq/junit5-logging-extension/actions/workflows/main.yml)[JUnit 5](https://junit.org/junit5/) extension for testing log statements.
## Quick Start
Add junit5-logging-extension as dependency within test scope to your project.
### Apache Maven
```xml
com.innoq
junit5-logging-extension
0.2.0
test```
### Gradle Groovy DSL
```
testImplementation 'com.innoq:junit5-logging-extension:0.2.0'
```### Gradle Kotlin DSL
```
testImplementation("com.innoq:junit5-logging-extension:0.2.0")
```Use the extension within your JUnit 5 tests:
### Usage
```java
@Logging
class SomeTest {Logger LOG = LoggerFactory.getLogger(SomeTest.class);
@Test
void someTest(LoggingEvents events) {
LOG.info("Some log message");assertThat(events.isEmpty()).isFalse();
}
}
```## Code of Conduct
[Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this
project you agree to abide by its terms.## License
junit5-logging-extension is Open Source software released under the
[Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).