简体   繁体   中英

How to automate MacOS OS user interaction tests?

At work I am setting up a product that sets up and manages security policies on MacOs systems among others. Unfortunately I could not find in the documentation of this product exactly which OS mechanism is used for the application and local management of the policies, but I think for my question this knowledge is not essential. I am looking for a solution to test the policy itself. Currently, I have to manually log in to the test system and manually call various apps and services to check if the policy blocks or allows the correct actions. Are there any tools/libraries in the Mac world to automate this task? For GUI testing I found this library by a quick google https://github.com/google/EarlGrey/tree/earlgrey2 . But I don't know if it is suitable for testing any apps/services in the sense of my use case. For example, would I have to find all the window ID's etc. by hand before I can write the test? Can I use them in my scenario at all? Are there any other Swift/Objective-C libraries for this kind of tests? Or maybe even some in Ruby? It would be ideal if this solution could also be integrated into a CI/CD pipeline.

Thanks a lot for your help!

You might be able to make your own set of test scripts based on some existing helper tools and scripts (potentially many different ones).

Some pointers are:

For CI if you are able to wrap running your manual workflow in a shell script, that produces a well-defined output (an expected screenshot or a text file), then it could be a base for your test suite. This test suite itself could be coded in any language as long as it has access to the shell (Ruby, Python, etc. including bash/zsh itself).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM