3

I have developed an application and I want to test it in a fresh environment (e.g. as if this is a clean OSX, no custom /usr/local, a fresh ~/Library, etc.). What would be the simplest way?

2

1 Answer 1

3

Since Lion it is possible to run a virtual copy of Mac OS X on Apple hardware (e.g., with VirualBox, Parallels, VMWare).

You could install a clean copy, take a snapshot and use this fresh installation for tests.

5
  • 1
    That is quite a heavy/slow solution. Isn't there something simpler? I would guess it's maybe possible somehow with the buildin sandbox function. Or some chroot script.
    – Albert
    Commented Sep 3, 2012 at 5:03
  • 3
    Parallels & friends are not slow at all, you really should give it a try. The alternative would be to either buy a cheap Mac mini or install OS X on a second partition/drive.
    – nohillside
    Commented Sep 3, 2012 at 5:40
  • @patrix: Why do you think that it is not possible via the builtin sandbox or via chroot?
    – Albert
    Commented Sep 3, 2012 at 5:54
  • 2
    You asked for the simplest way, not the most challenging. Even with ignoring the huge effort to setup OS X in a chroot environment at all: How do yo want to login into a chroot'ed environment in OS X? How would you chroot the System Event queue and other Cocoa-level stuff? Using VirtualBox or an installation on a second drive is way simpler. Or you can just create a new user if you are primarily interested in user-level sandboxing (which should be enough in most cases, you can even run the application directly from the home folder of the user).
    – nohillside
    Commented Sep 3, 2012 at 6:00
  • It doesn't really matter for the System Event queue (at least in my cases but probably in most cases). I'm not sure what you mean about Cocoa-level stuff but I guess it also doesn't matter. All apps I know, or at least the apps I have in mind here, store their settings and read their settings just from the filesystem. Basically, user-level sandboxing would exactly do what I want. Or the builtin MacOSX sandbox feature would also exactly do what I want. I am mostly searching for some description how I could easily achieve it.
    – Albert
    Commented Nov 20, 2012 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .