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

Testing: use proper Moo-based inheritance for Kernel::System::UnitTest::Selenium #690

Closed
bschmalhofer opened this issue Dec 29, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request selenium Related to fixing or improving testing with Selenium
Milestone

Comments

@bschmalhofer
Copy link
Contributor

Kernel::System::UnitTest::Selenium inherits from Selenium::Remote::Driver by adding Selenium::Remote::Driver to its ISA array. This kind of works. But Selenium::Remote::Driver is a proper Moo class which already has support for subclassing. I think it is good practice to use the standard way.

Changing this should also fix the nuissance that _execute_command() emits a OK testing event, but later throws an exception.

Interaction with Kernel::System::ObjectManager should be no problem, as the object manager simply decides whether an object should be created, or an existing object should be used. That using the object manage is not really sensible, is a different issue.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Dec 29, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0.7 milestone Dec 29, 2020
@bschmalhofer bschmalhofer self-assigned this Dec 29, 2020
@bschmalhofer
Copy link
Contributor Author

Also check whether subclassing from Test::Selenium::Remote::Driver and from Test::Selenium::Remote::WebElement is sensible.
This classes provide some testing methods that might be useful.

bschmalhofer added a commit that referenced this issue Jan 6, 2021
At least AgentSetting.t works.
Don't yet try to use the Test::Selenium classes, because there were errors.
This is fine, as the extra testing methods are not used anyways.
TODO: avoid using package and file scoped variables.
bschmalhofer added a commit that referenced this issue Jan 7, 2021
@bschmalhofer
Copy link
Contributor Author

Kernel::System::UnitTest::Selenium now uses 'extends'. Closing this issue.

@bschmalhofer
Copy link
Contributor Author

There were some fallouts from this change. Disabling Selenium testing did not work seamlessly. Fixes are added for the issue #682.

@bschmalhofer bschmalhofer added the selenium Related to fixing or improving testing with Selenium label Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request selenium Related to fixing or improving testing with Selenium
Projects
None yet
Development

No branches or pull requests

1 participant