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

Best approached to cross device testing #29

Open
gedw99 opened this issue Jan 1, 2023 · 2 comments
Open

Best approached to cross device testing #29

gedw99 opened this issue Jan 1, 2023 · 2 comments
Labels
bug Something isn't working enhancement New or improved feature for existent plugins

Comments

@gedw99
Copy link

gedw99 commented Jan 1, 2023

Most of the things in gio-plugins rely on native features and so are specific to the OS.

Windows 10 and windows 11, mac ( latest ) are the main ones for Desktops.

I was wondering what peoples thoughts are on doing this. This stuff is not easy, and there maybe be innovative ways to get it sot of decent using github actions.

Some ideas :)

Dialogue box: In am integration test, trigger opening a naive dialog and take a screenshot and save it as part of the test and compare it to a golden image.

Software update: Install an old version, and then trigger the "Check for update" page and button, and then take a screenshot. then sleep waiting for the Update to install, and then take another screen shot on the "About" page that shows the installed version.

There is also a golang robot software that seems designed for exactly this crazy stuff !
https://github.com/go-vgo/robotgo

I personally lean towards robotgo, and installing it as part of the github workflow and then running it on each OS.
Looks like its heavily used too: https://github.com/go-vgo/robotgo/network/dependents

here is one that use Robotgo with Fyne: https://github.com/GavinTan/autoTyper/blob/main/main.go
Its written like an integration test...

I noticed some of the example us https://github.com/robotn/gohook, which looks like it maybe useful.

@gedw99 gedw99 added the bug Something isn't working label Jan 1, 2023
@inkeliz
Copy link
Contributor

inkeliz commented Jan 8, 2023

That is something that needs to be improved, I will take a look further into that.

@inkeliz inkeliz added the enhancement New or improved feature for existent plugins label Apr 23, 2023
@inkeliz
Copy link
Contributor

inkeliz commented Apr 25, 2023

I have made some changes, and I'm sending some PR. There's many bugs features and some new features. Also, one of the key changes is split between each "plugin" and "gio-plugin" packages. This separation has two main benefits:

  • It allows for the use of each package independently without having to rely on the "plugin" package, which currently heavily relies on unsafe and can break due to changes in Gio. This separation provides greater control over each package without the need to use op.Ops.

  • It enables the use of each package without a dependency on Gio. One example of a package that uses this is gio-plugins/safedata, which contains "giosafedata" as a sub-package. Additionally, this opens up the possibility of supporting other frameworks such as Fyne and Ebiten.

I'm also working on adding support for Google/Apple/Microsoft OAuth on the client-side (the server-side implementation is not part of gio-plugins).

After all those changes, I am also planning to add some tests to the package:

  • Basic build-tests and static tests will be run when Gio changes, so that we can identify issues that could break the package easily and publicly. So, we know if some unsafe code is broken due to Gio change.

  • I'll also run more elaborate tests that compare results by image. This will help protect against regression bugs. However, the most challenging part of this will be testing the package against multiple versions of Android and iOS, as well as multiple browsers.

Since some changes will be a break-change, I don't think make sense to include tests right now. Overall, I believe that these changes and tests will improve the reliability and flexibility of the package, and I look forward to hearing your thoughts on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New or improved feature for existent plugins
Projects
None yet
Development

No branches or pull requests

2 participants