Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send attachment to ReportPortal #75

Open
bhagyaISS opened this issue Jul 28, 2023 · 1 comment
Open

Unable to send attachment to ReportPortal #75

bhagyaISS opened this issue Jul 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@bhagyaISS
Copy link

Describe the bug
I am unable to send scrrenshotOnFailure as an attachment to Report Portal.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Logger used to send attachment to reportPortal : public static final Logger logger = LoggerFactory.getLogger("binary_data_logger");
  2. We are sending compressed file as, reportportal doesn't support file greater than specific size.
  3. Code snippet:
    String screenShotFilePathCompressed = attachments.get(1);
    try {
    logger.info("RP_MESSAGE#FILE#{}#{}", screenShotFilePathCompressed, "Attachment");
    logger.info("File Location : " + screenShotFilePath);
    } catch (Exception e) {
    logger.info("Test failed, cannot attach screenshot");
    }

Expected behavior
To log screenshot as attachment into report portal

Actual behavior
Screenshot not attached.

Dependency versions
Include version info of the following libraries:
selenium-java: 3.141.59
Java:11

com.epam.reportportal agent-java-testng 5.1.0 com.epam.reportportal logger-java-log4j 5.1.8 org.apache.logging.log4j log4j-api 2.20.0 org.apache.logging.log4j log4j-core 2.20.0

Additional context

Log4j2.xml configuration as below:

@bhagyaISS bhagyaISS added the bug Something isn't working label Jul 28, 2023
@HardNorth
Copy link
Member

HardNorth commented Feb 14, 2024

@bhagyaISS You didn't provide any Log4j configuration actually. And I recently updated and tested Log4j integration on our examples, it is working.
So, please do the following things:

  1. Provide Log4j2.xml config and Log4j2 dependencies, which you use.
  2. Check out our examples:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants