Mutliplatform application: (Automated) Testing for Mac OSX howto? - macos

I have a firefox based application(ff extension) that is supposedly/allegedly working on Mac OSX too. I wish to make the application formally supported in Mac OSX. For that, I need to incorporate automated tests in the build process specific to Mac OSX.
With ubiquitous availability of Windows and Linux as cloud offering, executing automated tests for these platforms is easy. Not so with Mac OSX.
Any suggestions on how to go about the (light) automated testing for Mac OSX?
[PS:I have come across MediaTemple's OSX cloud in private beta. No luck for me in getting an invite.]

I don't know what kind of testing you'd like to perform, but why don't you install OS X on VMWare and test within the virtual machine? See this SO question if that is an option for you:
https://stackoverflow.com/questions/39159/is-it-possible-to-run-osx-in-a-virtual-machine

Maybe a combination of Selenium(www.seleniumhq.org) and Sikuli (http://sikuli.org/) would work for you?
Selenium to drive anything web based in FireFox and Sikuli to do all the rest. The tools work all fine together with Java API support. Both tools platform independent.
Cheers,
Stefan

I don't know what test you are trying to automate, but if it is command line based (as the comments seem to suggest it is php code under test), then you can install a VM with darwin on it and perform your tests there. Mac OS X being based on darwin should give you similar results. However as I don't know what the test entails there is no guarantee.
You can find the darwin release for Snow Leopard here, 10.5 is here, and 10.4 is here

If it were me, I'd look at Selenium Grid. It should be possible to create a set of Selenium RC tests initially then use Grid to run the tests on your various platforms, including OS X as well as Windows and Linux. I haven't tried it with running tests in the cloud, but that might even be a possibility.

Related

How To Write Acceptance Tests for Internet Explorer with: Selenium, PHPUnit and Mac OS X?

I'm trying to write acceptance tests for a project using multiple browsers. All the tests run fine with: Firefox, Chrome and Safari.
However, I don't know how to run them in Internet Explorer. I use: PHPUnit, Selenium and Mac OS X. I also use VirtualBox with Windows 8 and Windows XP.
I was thinking of running the tests in the virtual machine but I would have to copy the test to the VM and run them from there.
Is there a better way to do it?
Thanks in advance.
In general you have 2 opportunities:
To use cloud-based test execution platform which supports Selenium like following ones:
https://www.browserstack.com
https://saucelabs.com/
http://crossbrowsertesting.com/
http://testingbot.com/
To use the solution with virtual maschine you're already using. Even in this case you can optimize your approach by using specially prepared OS image exclusively for Internet Explorer testing from IE6 to IE11 from here.

Using Mac OS X (Xcode 4.1) for FreeBSD development

Hi stackoverflow community!
I am about to start developing patches for FreeBSD Ports Collection (pkgng utility) using C programming language.
The problem is that I am using Mac OS X and I am really do not want to switch to another operating system. I have installed Freebsd 9.0 on Parallels Desktop VM. Xcode 4.1 seems to be rather nice development tool for C.
Is it possible to implement development for FreeBSD via Xcode 4.1? How to set up project environment for such form of development and compile source for FreeBSD?
I am also opened for any other suggestions concerning cross-platform development using MacOS X to develop patches for FreeBSD. Which is the best way to organize all necessary stuff?
Since you want to develop patches for pkgng, I would strongly suggest that you compile and test the code on FreeBSD, because it is the only system that uses the ports and packages system that pkgng interfaces with. So unless it can cross-compile for FreeBSD, using any OS X IDE is probably not a good idea.
I'm not familiar with Parallels, but there is probably a file-sharing mechanism that you can set up between OS X and the FreeBSD running in the VM. That way you can edit your files on OS X and use them under FreeBSD.
X Code is really nice, and I would lean toward using it but then doing regular builds on a system actually running FreeBSD. If you have source for everything you're using (except standard libraries whose interfaces match), there is no reason not to work on OS X with Xcode. You can build your own libraries if need be. One thing writing cross platform does (provided you regularly build on the other platform) is make your code more portable. It's easier to avoid using platform specific "extensions".

Writing code for a Mac using Lazarus

I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus.
Question is. I have only a virtual machine running mac OSX, this means that i do not really want to develop on the mac. However, i just cannot seem to get the applications that i have written in lazarus on windows to work on the mac. I have tried the deployment using the Lazarus Wiki and the MACOS folder is empty and so when i put it on the mac it doesn't run the application.
What is the best way of doing this or am i barking up the wrong tree?
It seems you want to do cross-compiling, which is theoretically possible, but may not be practical, for the reasons mentioned by Marco above.
As an alternative, you could install XCode, FreePascal, and Lazarus on a MacOX machine. You could still do your development and some testing on Windows/Linux. When you hit a certain milestone, you can copy your source code to the Mac and compile your application to test and give to the user.
Even if it were possible to easily cross-compile, there some minor differences between platforms, so (especially if it's a GUI app), you would want to test it on an actual MacOS box before giving it to the client.
I've taken the route described by Noah - and I was incredibly surprised that after about three weeks development on Windows, it took about 10 minutes to get the application running on the Mac.
My route was to install Xcode 4.3 on an old Mac Mini running snow leopard, then install Lazarus using the fink version as described here. This took a while but was done in an evening.
Then I just copied my folder across to the Mac, opened the lpi on the Mac, compiled it. It failed so I removed a windows references, recompiled, and it was working. I was truly amazed.
What linker and assembler do you use to generate binaries? To my best knowledge the linker for recent OS X versions is not available in source.
Afaik what you want (crosscompiling to Mac) is not possible for recent versions (and I've done it for PowerPC myself in the past).
The easiest is to use the Unix "file" command on the binary to see what is generated, and make sure it reads something with "MachO" in it. Easiest is if you have a Linux install (where this command is pretty standard), but versions can be found for windows too (cygwin, mingw and 3rd party)

MonoTouch on OS X VM within Windows?

We're getting into iOS development with MonoTouch. All of our machines are Mac Pros with Windows 7 installed via BootCamp. I'm not crazy about rebooting into OS X just to access the MonoTouch IDE. I'm wondering if it's legal and possible to install OS X on a VM within Windows (if I'm already on Apple hardware, it should be ok, right?). Any other issues with Apple's SDK in a VM (I heard they do some hardware checking of some sort). Thanks in advance for any suggestions!
You can't really run OSX on a VM under windows without going the hacking route. The only way to properly virtualize OSX is to run OSX Server under OSX itself, which is not what you want.
The best option for you is to do what I do: run OSX on your Mac, then use something like VMWare or Parallels to run the Windows you have on your BootCamp as a VM. Works beautifully.
Yup, Eduardo is right, running OSX under non-apple hardware is considered illegal according to apple's license. Moreover, you may run into some issues when creating your developer's account or sumbitting apps.
However, if you still want go the hack way, you can refer to osx86project or just search google for "how to create a hackintosh".

Use of an IDE when my server is on a VM

I mostly develop in PHP, but I'm using Python and Ruby more and more. I edit the code in my OS (I'm on a Mac, so OS X Snow Leopard), but my server is on a VM (VM Fusion).
I use the IDEs mostly for their syntax checking - something TextMate, Espresso, et al, are not so good at. However, I can see that all these IDEs have vastly more power than syntax checking, but I'm not using it because the server is a VM.
For example, being able to set breakpoints and step through code. I've used these features with JavaScript, so I know how useful they are, but I can't use them because my server is on a VM instead of running natively inside the same OS as the IDE.
Is there a way of taking advantage of all these powerful features, without either developing inside the VM or running the server in Mac OS X?
I don't know what sort of server you have that couldn't be run natively in Mac OS X for development -- pretty much anything would work great. Alternatively, you can run the IDE in the VM along with the server -- desktop apps work just fine in VMWare too. So you have two excellent alternatives facing you -- do whichever one is easier!

Resources