assertj / assertj-swing

Fluent assertions for Swing apps
Other
108 stars 52 forks source link

takeScreenshotOf(Component): Component out of Frame #234

Closed NaridaL closed 5 years ago

NaridaL commented 5 years ago

screenshotfail

On our CI using Xvfb, test will randomly fail with AssertJ Swing not being able to find a component or not properly clicking a button. Our tests are set up so that a screenshot is taken before every click. When the tests fail, the screenshot will generally also be broken like the one above. The dimensions of the image match the target component (the bottom right one in the screenshot above, with the table), but the location of the screenshot is clearly wrong.

croesch commented 5 years ago

Hello @NaridaL

thanks for opening the issue - sorry for the delay.

On which OS are you running the tests? Could you provide some environmental details?

AssertJ Swing still contains some problems which cause some behavior like this. I struggled getting the cause for those, so any information might help. I didn't see the dislocated screenshots before.. so that looks interesting. Who is taking those screenshots? Do you use AssertJ Swing for that?

NaridaL commented 5 years ago

This was/ is opensuse sles. I've since switched from xvfb to tightvnc which has stopped the misaligned screenshots as well as a number of random failures.

croesch commented 5 years ago

So the number of random failures dropped to an acceptable percentage!?

And the misaligned screenshots don't appear at all? Then I'd say it's a problem outside AssertJ Swing (besides the stability issues I'd too love to fix). Do you agree?

NaridaL commented 5 years ago

Upon further analysis, the remaining failures seem to be unrelated to this.