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

Logs which are located in afterEach hooks, are not sent to reportportal #50

Open
uladzis opened this issue Feb 16, 2021 · 5 comments
Open
Assignees

Comments

@uladzis
Copy link

uladzis commented Feb 16, 2021

Hello,
I found out some bug, it's related with issue #44.

The solution to resolve the bug is to remove the line. The problem is that we remove currentTest, and logs in afterEach hooks can't be sent to reportportal when currentTest value is null.

If you have contribution guide, I can create pull request to resolve this problem.

Regards,

@AmsterGet
Copy link
Member

Hello @grib9544!
You can fork this repo and create a PR to the develop branch.
Update the tests if needed.
Also please add a note describing your feature/fix to the CHANGELOG.MD.
Also add me (@AmsterGet) as a reviewer.
Thanks for your contribution!

@AmsterGet AmsterGet self-assigned this Mar 2, 2021
@ostrovanka
Copy link

Hi, I wanted to give some update on this issue.

I debugged this a little bit and this is what I've got:
Reporter configuration:
reporterOptions: { token: 'f', endpoint: 'http://localhost:8080/api/v1', project: 'PIT', launch: PIT Run, skippedIssue: false, reportHooks: true, }

Logs for beforeEach/afterEach methods are added to test itself, beforeEach/afterEach are present in report but are empty

Logs for beforeAll/afterAll methods are not added anywhere at all, although they are also present in report.

While debugging mochaReporter.sendLog() method I see that tempId for hook is different from tempId of test itself, but logs are still added to test, not hook.

So to sum it up:

  • adding logs for beforeEach/afterEach - works partially, because logs are added to the wrong place
  • adding logs for beforeAll/afterAll - seems like this doesn't work at all

@n0rm4l-real
Copy link

Hello guys, any update on this?

@had0uk3n
Copy link

had0uk3n commented Jun 1, 2023

also want to up this topic. still need logs in beforeEach/afterEach

@NeginMn
Copy link

NeginMn commented Jun 26, 2023

@AmsterGet Can you please add this fix to the new version that is being released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants