Git Product home page Git Product logo

logger-java-logback's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

logger-java-logback's Issues

xlsx attachment is defined as x-tika-ooxml

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!

Logback logger doesn't work with Logback versions higher than 1.2.11

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

  1. Add logger-java-logback latest dependency (5.1.3) to pom.xml
  2. Add logback-classic latest dependency (1.4.3) to pom.xml
  3. Add logback.xml to the /resources folder.
    <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>
  4. Run the tests, check if test logs appeared on Report Portal.

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

  • agent-java-junit5: 5.1.5
  • logger-java-logback: 5.1.3
  • logback-classic: 1.4.3

Additional context
Add any other context about the problem here.

Multiple Launch in RP with Grid Execution

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.

Logging from junit extension doesn't work

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

ReportPortal output
image

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!

Unable to view the Failure Testcase screenshot as a attachment to ReportPortal

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?

Is it possible to change the licence to Apache 2.0?

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.