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

There is only one failed test in report #23

Closed
filipehb opened this issue Feb 27, 2019 · 18 comments
Closed

There is only one failed test in report #23

filipehb opened this issue Feb 27, 2019 · 18 comments

Comments

@filipehb
Copy link
Contributor

Describe the bug
After executing suit with 2 tests or more, the report of all tests isn't generated.

To Reproduce
Steps to reproduce the behavior:

  1. Create two test cases.

    tests
  2. Execute tests.
  3. See report.

Expected behavior
All tests should be in report.

Screenshots
report
Report

Desktop (please complete the following information):

  • OS: Win 10 Pro
  • Browser Chrome
  • Version 72.0.3626.119

Additional context

@filipehb
Copy link
Contributor Author

@jz-jess, I can analyze this problem and submit a pull request. What do you think?
test.zip

@jessezach
Copy link
Owner

jessezach commented Feb 28, 2019

@filipehb You can try running reportgen path/to/results folder(empty if not within a folder) to fix this issue.
The report autogeneration could be buggy, because it tends to delete report whose last modified at is more than 5 seconds. Feel free to analyse it though.

@jessezach
Copy link
Owner

@filipehb I think this could be happening because of the slowing down of selenium execution by using set selenium speed.

@jessezach
Copy link
Owner

@filipehb I have raised a PR with a possible fix since previous time difference calculation was wrong.
Can you please run your tests using this branch?
#24

@filipehb
Copy link
Contributor Author

@jz-jess, i got this error sometimes, and visual report has the same behavior.

image
reports.zip

@jessezach
Copy link
Owner

@filipehb Thank you! Let me take a look at this issue. Keep you posted.

@jessezach
Copy link
Owner

jessezach commented Feb 28, 2019

@filipehb I was able to reproduce the issue. The issue is caused because of keyword set selenium speed 1. The slow execution results in time difference of more than 10 seconds between tests. Auto generation of report works in the following way.

  • Since a new RobotEyes instance is created for each test, there is no way of knowing if the visualReport.html file belongs to the current test run.
  • Code checks for the last modified time of visualReport.html and gets the difference between last modified and current time. If the difference is more than 5 seconds, it assumes that visualReport.html belongs to an older test run. It deletes the file and creates a new file. The current test result gets written to it.

In your case the difference crosses 10+ seconds between each test, which is why you only see the last test in the execution in the report. I would suggest you to run an alternative command to generate the report manually. reportgen path/to/result folder or reportgen if there is no result folder.

You can also view an interactive report by running eyes /path/to/results or eyes if there is no result folder.

@filipehb
Copy link
Contributor Author

filipehb commented Mar 1, 2019

@jz-jess, i remove the keyword set selenium speed 1 and timeout=5 parameter of Wait Until Element Is Visible, but the issue continues to me.

testrobot

@jessezach
Copy link
Owner

@filipehb I could not reproduce the issue after removing set selenium speed.
You don't have to remove timeout of wait until element is visible.

Did you try using the fix in the pull request?

@filipehb
Copy link
Contributor Author

filipehb commented Mar 1, 2019

@jz-jess, i got this error if use PR:

image

@jessezach
Copy link
Owner

@filipehb I have fixed that issue. Please pull the code and try once again.

@filipehb
Copy link
Contributor Author

filipehb commented Mar 1, 2019

@jz-jess, sorry i didn't see the new commit. The TypeError problem is solved, but in the report i got the same issue.

reports.zip

image

@jessezach
Copy link
Owner

@filipehb okay. After you run your tests, please run command reportgen <results folder> or reportgen if no results folder. This should generate a fresh report. Does this solve your issue?

@jessezach
Copy link
Owner

@filipehb I have pushed another commit which doubles the threshold. Please give it one last shot and see if it fixes your problem. I dont see any issues in my system. I dont have a windows system
screenshot 2019-03-01 at 6 32 29 pm

@filipehb
Copy link
Contributor Author

filipehb commented Mar 1, 2019

@filipehb okay. After you run your tests, please run command reportgen <results folder> or reportgen if no results folder. This should generate a fresh report. Does this solve your issue?

Yes, solved :D. Thx!

@filipehb I have pushed another commit which doubles the threshold. Please give it one last shot and see if it fixes your problem. I dont see any issues in my system. I dont have a windows system
screenshot 2019-03-01 at 6 32 29 pm

I will test with new PR.

@filipehb
Copy link
Contributor Author

filipehb commented Mar 1, 2019

@jz-jess, nice PR! Issue resolved for me 🥇.

@jessezach
Copy link
Owner

@filipehb Great. Deploy this soon in the next release

@filipehb filipehb closed this as completed Mar 1, 2019
@jessezach
Copy link
Owner

Fix released in version 0.64

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

2 participants