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?
-
1@Matteo: I really would like to. I just read this. For most of the answers on my questions so far, I feel that they don't perfectly answer my question in a way that they provided the information/solution I was searching for.– AlbertCommented Sep 3, 2012 at 5:04
-
See here for two similar unanswered questions: apple.stackexchange.com/q/102803/14319 and apple.stackexchange.com/q/86516/14319– nalplyCommented Oct 15, 2013 at 10:20
Add a comment
|
1 Answer
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.
-
1That 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.– AlbertCommented Sep 3, 2012 at 5:03
-
3Parallels & 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?– AlbertCommented Sep 3, 2012 at 5:54
-
2You 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.– AlbertCommented Nov 20, 2012 at 15:01