reportportal / logger-java-logback Goto Github PK
View Code? Open in Web Editor NEWLogback appender for Report Portal
License: Apache License 2.0
Logback appender for Report Portal
License: Apache License 2.0
Describe the bug
Typo in the https://github.com/reportportal/logger-java-logback/blob/develop/README.md
Steps to Reproduce
Expected behavior
com.epam.reportportal
logger-java-logback
5.1.6
test
Actual behavior
com.epam.reportportal
logger-java-log4j
5.1.6
test
Dependency versions
Additional context
Hello!
I am trying to attach an xlsx file to the report as in the example https://github.com/reportportal/logger-java-logback
However, when downloading it, I get a file called attachment_8146539.x-tika-ooxml
Report Portal Build: 5.4.0
File file = File.createTempFile("test-file", ".xlsx");
log.info("RP_MESSAGE#FILE#{}#{}", file.getAbsolutePath(), "I'm logging content via temp file");
Please help me to solve this problem.
Thank you!
Describe the bug
I added the logger-java-logback
dependency of version 5.1.3, then added the logback-classic
dependency itself of version 1.2.10. Added all required configurations as suggested here, in documentation. My test logs were streamed to Report Portal. Then I realised that the latest Logback version is 1.4.3 and updated it in my pom.xml. After that, my test logs stopped appearing on Report Portal.
By experimenting with the Logback versions, I found that Report Portal's logger-java-logback works only with Logback 1.2.11, and afther that - no logs are streamed to RP.
Steps to Reproduce
<configuration><appender name="ReportPortalAppender" class="com.epam.reportportal.logback.appender.ReportPortalAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n</pattern> </encoder> </appender> <root level="all"> <appender-ref ref="ReportPortalAppender" /> </root> </configuration>
Expected behavior
Test logs appear on Report Portal when using the latest (1.4.3) version of Logback
Actual behavior
Test logs do not appear on Report Portal if Logback dependency of version higher than 1.2.11 used.
Dependency versions
Additional context
Add any other context about the problem here.
Hi All.
Is there any solution in the report portal for parallel execution.
I integrated, RP with TestNG, and I implemented a grid also but I want multiple launches depends on nodes in grid how I can achieve this.
I want different launches with respective nodes.
Hello!
I have came across an issue when I'm trying to log messages into reportportal from junit 5 extension context callbacks.
https://junit.org/junit5/docs/current/user-guide/#extensions-lifecycle-callbacks-before-after-execution
Steps to reproduce:
Here is the class which should ensure logging to be executed before each test(log does not apperar in reportportal)
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class MyCallback implements BeforeEachCallback {
@Override
public void beforeEach(ExtensionContext extensionContext) throws Exception {
log.info("Logging from BeforeEach");
}
}
Test class itsef:
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import com.epam.reportportal.junit5.ReportPortalExtension;
import com.ferratum.testing.MyCallback;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@ExtendWith({ReportPortalExtension.class,MyCallback.class})
public class RpTest {
@Test
void simpleTest() {
log.info("Logging from test");
}
}
Log output in intelliJ
12:47:12.501 INFO MyCallback - main - Logging from BeforeEach
12:47:12.519 INFO RpTest - main - Logging from test
Process finished with exit code 0
Dependecies
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-junit5</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>logger-java-logback</artifactId>
<version>5.0.3</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
Can you please check whether this is issue or currently unsupported functionality?
Thanks in advance!
I am able to send the attachment and view the attachment in corresponding test with
@Test
public void logJsonBase64() throws IOException {
here we are logging some binary data as BASE64 string
LOGGER.info(
"RP_MESSAGE#BASE64#{}#{}",
`BaseEncoding.base64().encode(Resources.asByteSource(Resources.getResource(JSON_FILE_PATH)).read()),`
"I'm logging content via BASE64"
);
}
But it's not getting worked when testcase screenshot's as a attachment.
sample code :
TakesScreenshot screenShot = ((TakesScreenshot) driver
logger.info(
"RP_MESSAGE#BASE64#{}#{}",
Base64.getEncoder().encodeToString(screenShot.getScreenshotAs(OutputType.BYTES)),
"I'm logging content via BASE64"
);
Any idea?
It would be much easier for commercial products development, if this library had an Apache 2.0 license. I would like to use agent-java-testNG, overriding some methods, in my commercial project and also use classes from logger-java-logback in imports. I cannot do this, if it has GPL license, only use it as a dependency as is.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.