Skip to main content
Bumped by Community user
edited tags
Link
030
  • 13.3k
  • 16
  • 75
  • 175
Source Link

How can I test native macOS UI software in a container before deployment?

As part of the CI setup, I'd like to run (automated) tests on native macOS GUI software in a 'safe environment' (i.e. without messing with the host software installation too much). Virtual machines (using VirtualBox) work in principle, but they are fairly slow to start/stop and VirtualBox on macOS hosts doesn't seem to be very stable (it works great on Linux hosts though).

After reading macOS testing on Desktop: Docker containers vs. Homebrew installation I learned that using Docker works great for testing software on macOS. However, my understanding is that even with Docker Desktop for Mac (which uses Hyperkit to virtualize the OS as opposed to running VMs using VirtualBox), the software running in the container sees a Linux installation.

Would it be plausible to use Docker anyway (maybe I misunderstood it?) such that the containerized program sees a macOS installation or would some other solution (A plain chroot?) work better here?