gchq / gaffer-tools

gaffer-tools is deprecated. Use https://github.com/gchq/gafferpy instead
Apache License 2.0
50 stars 29 forks source link

Fix temperamental selenium tests #926

Closed t92549 closed 1 year ago

t92549 commented 3 years ago

Sometimes, but not always, fails like so:

Errors: 
Error:    QueryBuilderST.shouldBeAbleToRunParameterisedQueries:259->enterText:296 » ElementNotInteractable
[INFO] 
Error:  Tests run: 6, Failures: 0, Errors: 1, Skipped: 0
t92549 commented 3 years ago

As well as this, the other jasmine-tests are very temperamental due to phantomjs (https://github.com/ariya/phantomjs/issues/11526), which is no longer maintained. We probably just remake all the ui tests so that they actually pass reliably.

t92549 commented 2 years ago

Moved to v2_backlog as it seems this won't be reliably fixed without rewriting the UI in a newer framework (angular 2 or react)

GCHQDeveloper314 commented 2 years ago

The selenium version will be upgraded to a much newer version in #987, with that version I saw far fewer issues.

GCHQDeveloper314 commented 2 years ago

With the newer selenium I cannot reproduce this problem locally. It seems the problem only occurs on GitHub actions. It seems to happen 30-50% of the time. Increasing the delay may help, although tests pass locally even with a much reduced delay.

The error itself relate to an element which is not interactive but should be. This may be caused by slowness within Firefox inside the runner. The runners do not have much performance and any graphical elements will have poor performance due to virtualised rendering. If there was enough of a delay rendering UI elements, this might cause an element to not be interactive because an animation had not completed in time. If this is the case, increasing the wait time between interactions could fix the problem. Adding other delays (such as to the action steps) might also be able to reduce load on the runner.

GCHQDeveloper314 commented 2 years ago

When tried, increasing the wait time variable did't fix this problem. The specific error is:

QueryBuilderST.shouldBeAbleToRunParameterisedQueries:262->enterText:299 » ElementNotInteractable

It might be that this test is missing a delay.

n3101 commented 1 year ago

The UI fails to meet our Accessibility policy. It is unmaintainable and will be removed shortly.