Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/testmonkeys/cucumber-spring-logback
This is a cucumber-jvm, spring and logback integration to provide an appender that will write logs to the cucumber report.
https://github.com/testmonkeys/cucumber-spring-logback
cucumber-jvm cucumber-report logging spring spring-boot
Last synced: about 1 month ago
JSON representation
This is a cucumber-jvm, spring and logback integration to provide an appender that will write logs to the cucumber report.
- Host: GitHub
- URL: https://github.com/testmonkeys/cucumber-spring-logback
- Owner: TestMonkeys
- License: apache-2.0
- Created: 2020-10-17T18:24:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-13T13:57:16.000Z (almost 2 years ago)
- Last Synced: 2024-11-13T17:49:18.722Z (3 months ago)
- Topics: cucumber-jvm, cucumber-report, logging, spring, spring-boot
- Language: Java
- Homepage:
- Size: 182 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cucumber-spring-logback
[![TestMonkeys](https://circleci.com/gh/TestMonkeys/cucumber-spring-logback.svg?style=svg)](https://circleci.com/gh/TestMonkeys/cucumber-spring-logback)This is a cucumber-jvm, spring and logback integration to provide an appender that will write logs to the cucumber report.
This helps make use of logs provided by other libraries, as well as using logs in your tests, customizing the log level wanted in the report.
To use this you just need to log some information using your logger:
```
@When("I log a message")
public void logAMessage() {
log.info("LoggedInformation");
}
```
And this will be automatically added to the output of this step:![Image of the report](https://github.com/TestMonkeys/cucumber-spring-logback/blob/master/util/CucumberReportSample.PNG)
To test this project - clone it then run:
```
mvn test -Dtest=org.testmonkeys.test.cucumber.spring.logback.TestRunner
```
this will generate the cucumber.json report, then run
```
mvn cucumber-reporting:generate
```
to generate the masterthought html report in target/report/# integration in your project
Either copy the classes defined in java/main or use the project packagedTo tie it to your tests:
* import the spring configuration class ```org.testmonkeys.cucumber.spring.logback.CucumberSpringLoggingConfiguration.class```
* add the ```org.testmonkeys.cucumber.spring.logback``` package to your glue.
* configure your logback.xml file and define the cucumber appender:
```
```