kubernetes can you install an entire OS in a pod? And perform selenium tests - macos

So i'm trying to find a good way of testing the Safari web browser. I've been looking at kubernetes which seems like a good fit for most browser testing for browsers such as Chrome or Firefox with Selenoid or Moon. Safari is a different beast however. It seems like you need to install the entire OS just to test the browser. So what would be a good solution to this? Should i even bother with a cluster?

No you cannot install safari in container.
Safari can be installed only on MacOS, but unfortunately, you cannot run full OS in a container.
Even if you could, I could not help you because MacOS is a proprietary software and macos licence doesn't allow for installing macOS on devices other then Apple's.

Related

Unable to uninstall app consuming lot of memory

I am using MacBook Air with Catalina OS. When I hit top command it shows an app Electron consuming about 50% RAM.
I tried uninstalling it but can't find in application list. I have not installed this Electron app explicitly and don't know how it came on my machine.
How to uninstall this as I am not using it?
Top command output:
A quick search shows that Electron is a framework on which google chrome (to name one) runs. So you cant really uninstall it, however you could try, closing a few chrome windows or tabs. A blog gives a solution to this issue by replacing Electron apps as a whole (like using safari instead of chrome), which is not an option for everyone but is worth considering.
https://medium.com/macoclock/5-apps-that-eat-your-ram-and-how-to-replace-them-91f9f856cd66
Personally my advice would be to upgrade to Mac OS Big Sur(if your mac is supported) as I experience some performance increase and found that it was generally more optimised.

How to disable SIP on macOS VMs for macOS UI testing in CI/CD environment?

I have been trying to run my macOS UI tests on a remote machine(VM), and it does not work. On a local machine, it works after giving the permissions related to accessibility. After digging through, I realised that you need to have SIP disabled and add the relevant permission.
So, how can I disable SIP on a headless machine in a CI/CD?
Unfortunately, it is not possible to disable SIP on a remote machine. You have to boot in safe mode and disable it from the terminal. And that requires direct access to the machine.
You can ask your provider if they can disable SIP for a specific machine for you, or you can look for providers that do.
There are a few out there, with Codemagic being one of them.
We released SIP disabled macOS images with the latest and beta Xcode versions so you can run macOS UI tests without any extra configuration.
It was frustrating not being able to test the UI of a Mac app, but I’m happy with what we managed to release.
I also wrote a blog post if you are interested in getting started with macOS UI testing.
Full disclosure - I’m a DevRel at Codemagic CI/CD, focusing on helping the community build for Apple platforms.

Can not choose chrome browser on Cypress

On cypress IDE I can't choose another browser except than 'Electron'. I would like to choose Chrome browser. Before it was possible to choose. But now it is impossible. How can I fix issue?
Thanks in advance for your help
As per the official documentation "Cypress automatically detects available browsers on your OS" (https://docs.cypress.io/guides/guides/launching-browsers#Browsers).
On linux, I would also recommend to use .deb files to install the browsers, using flatpak didn't work for me.
Windows and macos is the same, just make sure to have it installed.
I would also recommend checking the following:
Cypress 5.0 - Unable to find installed browsers
https://github.com/cypress-io/cypress/issues/2834
https://docs.cypress.io/guides/references/troubleshooting#Common-GitHub-issues

Apple and Internet Explorer

Someone smart who I know just mentioned that the idea of downloading Internet Explorer onto a Mac seems counterintuitive, even though it might make sense to do since Safari seems to have problems on a certain site for a project we're working on. I'm just wondering why this is and would greatly appreciate any clarification. In summary:
Why does it not make sense to download Internet Explorer onto a Mac?
Much thanks in advance!
If you're looking for a serious answer:
The best way to test something with IE7 for Windows is to use IE7 for Windows. Just because you have a Mac doesn't mean you can't do that. You can run Windows through BootCamp. Or buy a used $99 Windows box and borrow the Mac's keyboard/mouse/etc. Of course it's much more convenient, and almost certainly good enough, to run Windows in a VM under OS X via Parallels, VMware, etc. Wine will mostly work, but it can be fiddly to configure, and may crash and/or have visual glitches that don't happen with real Windows; if you really want to get serious about that you may want to look at Crossover.
But the next best way to test IE7 for Windows is actually Opera. Of course in the case of bugs and quirks that are still present in later versions of IE, they'll do a perfect job of emulating IE7, but for bugs that were fixed, that's not a particularly important focus. Opera, on the other hand, works hard to be able to emulate the quirks of all of the important browsers. Make sure to enable IE quirks mode, and set the user agent to pretend to be IE7 for Windows, and you should be golden.
But for the question you actually asked, there is no blanket answer to this that could possibly be correct. There are many reasons it may not make sense to download Internet Explorer onto a Mac, and also many reasons why it might.
You can't run IE for Mac on any modern Mac.
If you have an ancient Mac, and it's running 10.2 or 10.3 rather than 10.4, it already has IE (and if you want to reinstall it, it's part of the OS X install), so there's no reason to download IE.
You also can't legally download IE for Mac from anywhere anymore (except as part of old versions of OS X).
And IE for Mac is actually far less like IE7 for Windows than any modern browser is.
You can't run IE for Windows (or Pocket IE for Windows Mobile) on Mac OS X.
But you can run it under wine.
And you can run it in a virtual machine running Windows.
Except that Windows comes with Internet Explorer, so there's no reason to download it.
Unless your Windows comes with an older version and you want to update it.
And a Mac can run Windows instead of OS X if you want (e.g., via BootCamp).
Same caveats as with a VM.
And there may be other reasons to download it other than running it.
If your Mac has access to a fast internet connection and your Windows box doesn't, you might want to download the installer on the Mac to copy it locally to Windows.
Sometimes you just want to use up internet bandwidth.
Maybe you're testing your download speeds.
Maybe you're about to dump your boyfriend, and first you want to run him $300 over his monthly bandwidth limits.
Someone at Microsoft might find it entertaining when they notice in the logs that you've downloaded IE on a Mac, and it's always nice to bring a smile to a stranger's face.
The last version of Internet Explorer for Macintosh was 5.2, out in 2003. It wouldn't even run on a modern machine. The build is just not compatible.
If you want to try a different browser, both Chrome and Firefox run on OSX.
To run internet explorer on the Mac, you'd need to use some sort virtualization, running Windows either through Boot Camp or Parallels.
I had to do it because I'm developing software and the client wants to have it styled for IE 7 (the version they have on all their machines).
If I had my druthers, I'd run it under virtualization (e.g., VMWare), but I've misplaced my old XP CDs, so I settled for Wine (which works 'okay', but crashes from time-to-time).
I suggest using VirtualBox which would enable you to run MSIE on your Mac directly:
https://www.virtualbox.org/
...and here are the VMs for MSIE 6, 7, 8 and 9:
https://github.com/xdissent/ievms
Good luck!
It's definitely not a good idea to install Internet Explorer for Mac. It simply doesn't work properly as it was discontinued by Microsoft in 2005. However, if you have to use it to view certain websites that will only work in IE, this is the easiest way to download and install it for Mac: http://machow2.com/download-internet-explorer-for-mac/

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

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.

Resources