running Karma in grunt with IE launcher in Linux box - linux

We're creating a Linux build box for an angular and node application, we have setup grunt to run unit tests against 3 browsers (IE, Chrome and FF).
Now that we're automating the build, we won't be able to run unit tests against IE.
I've read Karma docs and I've learned about PhantomJS, but from what I read it is build on webkit which is chrome.
Searching the internet gave me no answer to my questions:
1. Is PhantomJS sufficient to cover IE, chrome and FF? because it seems the only straight forward solution I got from Karma.
2. Is there any way I can run karma unit tests on IE in a Linux box? it seems like a common requirement but I'm surprised I found no answer.
I've installed GNOME on the build box to try to get at least Chrome and FF covered, but the problem was that if I run the grunt build from a terminal (ie. Putty) it won't launch Chrome or FF, I have to log in from the GUI to be able to launch the browsers through Karma.
I've also tried to install wine to install IE on the build box, but it installed only IE6!! :)
Our team is relatively new to NodeJs and Angular, how would you setup your build box and how would you cover unit tests in IE??

We ended up removing IE tests in Linux, but we run them in our windows dev boxes, and kept only Chrome and FF which are both working.

Related

Appium Inspector don't open on Linux Ubuntu

I cannot open Appium inspector on Linux Ubuntu.
In the same folder I have 3 files:
Appium-Inspector-linux-2022.2.1.AppImage /
Appium-Server-GUI-linux-1.22.2.AppImage /
latest-linux.yml
When I open the Appium-Server-GUI-linux-1.22.2.AppImage file, start the server e click on the button to open Appium Ispector, it open a web page.
to fix this, it was necessary:
1: Start Appium Server
I did this, executing Appium-Server-GUI-linux-1.22.2.AppImage file.
2: Start Appium Inspector through of file Appium-Inspector-linux-2022.2.1.AppImage
3: Create the capabilities
After that, the Appium Inspector still don't open throught on Appium Server button, but it make it open and you can use.
Since the release of Appium v1.22 they have changed how the Appium Inspector works. I refer you to their official documentation on GitHub https://github.com/appium/appium-inspector, citing:
Appium Inspector is released in two formats:
As a desktop app for macOS, Windows, and Linux. You can get the most
recent published version of this app at the Releases section of this
repo. Simply grab the appropriate version for your OS and follow
standard installation procedures (but see the note below for macOS).
As a web application, hosted by Appium Pro. (It's currently a known
issue that the web version does not work on Safari). Please make sure
to read the note below on CORS as well.
If you like to work the old way, download Appium Desktop v1.21 or below.
install latest appium-inspector
open appium-inspector and insert "/wd/hub" in Remote Path

How to run detox for react-native projects on windows and linux?

I am currently using windows 10. I want to be able to run detox test scripts on android emulators. Is this possible?
I tried to do it many times but failed. Each time I do it, some configuration issue pops up and build gets failed.
The CI/CD server is hosted on a Linux machine, so assuming we can do this, will it run there?
Also is there any good guide available to help in setting up and running detox for react-native projects on windows?

Can I compile/package a Node-Webkit (NW.js) app into an exe for windows and a version for Linux?

I've looked on the Node-Webkit site and it appears to say that I can make an application with HTML5 and compile it for Windows, Linux of Mac so it will run without the need for the user to install Node.js separately. However, when I try their sample apps (e.g. https://github.com/leanote/desktop-app found on the official NW.js page: https://github.com/nwjs/nw.js/wiki/List-of-apps-and-companies-using-nw.js ), the ".exe" file does not run the app (on either Win 7 or XP). It just opens a simple browser window with the address "nw:blank" and a gray page says "NW.JS" and does nothing.
Can these apps be packaged and run without requiring the user to install node.js?
https://github.com/leanote/desktop-app 's nw folder is not the distribute leanote app, it's just the NW. You must build the desktop-app. The README has written How to build it, How to develop it
You can download the distributed version via: https://github.com/leanote/desktop-app/releases
You might try... node-webkit-builder ... which is supposed to build a huge .EXE file which is self-contained for you. Otherwise, the instructions for distributing... how to package and distribute, see Step 2b.

Grunt Server and WebStorm javascript debugging (and SpyJS) not working

I have an app that I made with yeoman, grunt an angular JS (typical setup - image included below). I'm trying to debug my project with spyjs (or even regular javascript debugging) but I can't seem to get it working when I run "grunt serve" - the file that's loaded from WebStorm clearly isn't going through the grunt server (but localhost:63343 instead). Any ideas how I could configure things properly to get debugging to work?
Here's my SpyJS configuration:
I've also tried localhost:9000 for the URL to trace (which is the port that grunt serve runs on), and I've tried using another node interpreter.
You need using the server your client code runs on (localhost:3000) and not WebStorm built-in webserver to debug your Angular application served by Grunt. See Debugging grunt with Intellij for some hints
Note: haven't tried this with spyjs - only with a regular debugger
You need to upgrade to Webstorm 9. As per spy-js
Node.js tracing is now supported in WebStorm 9 EAP, including multi process and node cluster tracing support.
Then instead of using Spy-js profile, use Spy-js for Node.js profile.
This screenshot is from Webstorm 9 RC.
I am using too the Yeoman generator (AngularJs + grunt), and I am debugging the application using the JavaScript Debug configuration like this:
(source: ignaciosuay.com)
Have a look to this post about how to debug angularJS with Intellij (It should work too for web storm)

Running Flash Player on Headless Linux Server

Warning: I'm not that good at using Linux, so be easy on me.
I'm running a CentOS 6 x64 Server. I have a swf designed to generate complex images on command. I did a lot of searching, and the best answer I could find is install Xvfb and Flash Player to run the SWF.
So I installed Xvfb fine, and downloaded the standalone flash player debugger for Linux. I use
xvfb-run ./flashplayerdebugger screenapp.swf
to generate the image. Flash player debugger is designed for x86, and was throwing an error. I googled it, and found a page telling me to install the x86 dependencies. I did it, and the errors are gone. Unfortunately the swf doesn't seem to work on the server. For testing purposes it contacts a php file which creates a text file, so I know it's working, which works fine on my Windows computer for testing.
All it does is after I run the command is hang, after waiting a bit nothing still happens. I'm not sure if it's supposed to be like that, but it's not running the simple code I have on the swf to just load a URL
[root#ms1 ~]# xvfb-run ./flashplayerdebugger screenapp.swf
Xlib: extension "RANDR" missing on display ":99".
^Z
[3]+ Stopped xvfb-run ./flashplayerdebugger screenapp.swf
I'm no Linux expert, but the test SWF works fine on Windows, just can't get it to run on Linux. If the problem is flashplayerdebugger, how can I install the correct flash player?
Try this
xvfb-run +extension RANDR ./flashplayerdebugger screenapp.swf
Also, I found that its very useful that in Linux you can just copy-paste any console error or message by ctrl+shift+c (various for different consoles) and just google about it possible solutions.

Resources