I've developed an application using Polymer 1.0. My developer computer is a Mac, and I've not had any problems during development process.
However, when I clone my application on a Windows machine (Windows 10), the tests don't work at all.
Whenever I execute polymer test or wct the command blocks the terminal and never ends.
On MACOS or Linux it works perfectly.
The following environment variable values have saved me in Win10 environment:
LAUNCHPAD_BROWSERS=chrome
LAUNCHPAD_CHROME=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
It is not obvious from Polymer and launchpad documentation the need to set only single browser with known location to minimize the test run time during ongoing development. Of course for multiple browsers autodetection it will take more time and traverse over all PATH with guess on all possible browsers takes forever. It would be reasonable not to rely on auto-detection and list in LAUNCHPAD_BROWSERS only browsers you have set in LAUNCHPAD_xxx location.
I finally found a workaround.
It seems that there is a bug in Web Component Tester. When it tries to find all the browsers installed on a windows machine it takes ages to locate some of them.
To solve this problem, just adds an environment variable that tells WCT which browsers are installed, so it can skip this step:
LAUNCHPAD_BROWSERS= _{coma delimited list of browsers}_
For instance:
LAUNCHPAD_BROWSERS=chrome,firefox,opera
Once this variable has been set, all the tests execute just like on any other OS.
More information about this feature here
Related
I have a cross-platform desktop application written in Xamarin.Forms that runs both in Windows and MacOS. I want to do some UI automation on top of that application.
After some research it seems like the most cross-platform friendly option is to use Something like Sikuli. As the default stack on our team is centered on the .NET stack we want to use SikuliSharp or Sikuli4Net to perform the automated UI tests.
However, despite of the fact that we've been able to run Sikuli4Net successfully on Windows, automating several flows so far. We have a dire situation on MacOS. Our team (myself included) doesn't have a lot (or maybe any) knowledge of Java applications.
I've installed the JDK 8, but was unable to run the tests in the same way we did on Windows. The code builds, but it seems like something in the environment is lacking.
With Sikuli4Sharp when starting the APILauncher like this:
launch = new APILauncher(true);
launch.Start();
I get the following error:
With SikuliSharp when trying to run a simple demo application on our software I have this error:
I have tried to set up the SIKULI_HOME environment variable using this answer as a reference, but still the same problem (and I did restart the console and IDE, even my machine).
When I run echo $SIKULI_HOME on the terminal I do get the directory that cointains the .jar files:
So I'm kind of lost about were to go from here. These problems made me unsure about being possible to run Sikuli4Net or SikuliSharp on MacOS environments. Is this the case? If not, what am I doing wrong?
as mentioned in the error message: sikuli-script.jar is missing.
You have to check on what version of Sikuli/SikuliX your SikuliSharp or Sikuli4Net are depending on.
In doubt you have to dive into the sources of those Net packages.
I'm working with an old (Delphi 2010) app with a number of very specific components that have to be installed, some from compiled from sources. It's a pain to set up, is what I'm getting at.
Currently, I have it on a Windows 10 machine, but I haven't upgraded Windows 10 in quite some time. If I upgrade Windows, it breaks the debugger (and I haven't been able to fix that so I've downgraded Windows).
I'm trying to find any way to move the Delphi environment without having to go through the various steps to get it to work, like making a VM out of it. Or, if I have to go through the steps again, only do it one more time in such a way that I can push-button recreate it. (There are a lot of things I need to try to upgrade the app itself, but many of those strategies will break the environment for me.)
Any strategies?
So I'm working on a Chef cookbook for Windows, meaning it is generally executed on a Windows Server instance (2012r2 in this case). Specifically I am installing MSYS2 which uses Cygwin under the hood. I noticed that package installs were very slow and tracked down an article showing how the default nsswitch.conf in Cygwin uses the slower dynamic SAM/AD integration. For most users, and especially for my test environment this isn't needed so I tried following those steps to use only file-based users/groups. This resulted in a massive speedup (roughly 6x).
But there is a weirdness. It only works if I've logged in to the server via RDP at least once. Otherwise back to slows-ville.
Since this isn't hugely useful to automated testing, I've tried to figure out what exactly is causing the issue. The most likely candidate is that the first RDP connection (i.e. non-WinRM/headless session) is populating some piece of the user profile that headless sessions don't load, but I can't figure out what. I've tried calling LoadUserProfile, which is supposed to create a profile it doesn't exist, but this is not enough.
Any ideas on what piece of this I'm missing?
I am creating Selenium test using Chrome Driver. To run test on my machine, I run Chrome Driver from the path in my computer like,
Instance = new ChromeDriver(#"C:\Users\..\);
But the point is, if somebody want to run my test using NUnit, it doesn't work because the path of the Driver is the one associated to my machine no to the machine that the other person is using.
So, is it possible somehow to attach the Driver to the project without writing path and be able to run in all machines without changing anything?
I have not used NUnit. But I understand your issue & This is how i do.
I use TestNG framework to run my selenium-webdriver regression scripts. I run the scripts periodically using jenkins in different slave machines (windows/mac). Chrome and IE driver servers are part of my project. (i just added to my project folder). I find the absolute path to these drivers # runtime and use it to start the service. So this way it does NOT depend on the machines or users who runs it. It works great. I would suggest you the same!
I am trying to build and deploy a gaia build from git repo in Windows. I am trying to deploy it in অ Flame.
I am trying to do it in a windows 7 with cygwin installed. After installing everything this is the error I am getting
This works just fine in a Linux machine, but I need to do this in Windows since right now I have access to it only.
Any pointers to what I am doing wrong here?
I'm afraid it's not going to work without significant effort for several reasons. Much better to use a VM with Linux on as even if it did work it will be really slow. Windows is slow at handling lots of file access and Cygwin slows it down even more.
For example in making a simple change to config.sh (full stack build) so it works on Cygwin I found it took hours to run (on a decent PC). And then I had a couple of corrupt git repos I had to hand fix.
I also looked at getting gaia's make to work, but stopped after the problem just got bigger.
Here's what I found for future reference
The build is not really portable, it expects a linux like environment
While cygwin gives good linux emulation most of the tools run are win32 native and handling path conversion for them requires not trivial changes due to assumptions. For example you can switch to the Win32 XPCshell and hack the command line paths to use cygpath, but environment variable are an extra source of dependency in the JS scripts and are all unix paths. ( I did manage this part).
these path and environment dependencies get magnified with the C build chain and other tools.
You need to change the mount to use noacl or else cygwin attaches ACLs to simulate file properties, thus breaking things. It's might even be a little faster without ACLS
I also tried MinGW which provides native versions without the emulation so should be faster. However it falls short of the requirements and its automatic path conversion heuristics get in the way.
you need to turn of any antivirus prog as they slow it down. in fact the very first time I used the old FIrefox WIndows build it would crash after a long time. Turned out to be a mem leak in the AV :(
So all-in-all it's too much hassle in terms of dev time to convert and probably maintain. A true Windows build would be better but then it's so easy these days to run a VM. You can even share directories between the guest and host so could flash from Windows.
I also tried with cygwin, but was unable to build the gaia source code on windows.
It's not straightforward to build the gaia source code on windows. Please follow these steps:-
Download Mozilla Build from MozillaBuild - Mozilla Wiki and install the tools in c:/mozilla-build (preferred). It includes everything (make, wget, python etc) you need to build gaia source code.
Run start-shell.bat. If build process failed with this batch file then run start-shell-msvc2013.bat if you have Visual Studio 2013 or start-shell-msvc2015.bat if you have Visual Studio 2015. (You need Visual Studio for the second step).
Browse to the gaia source code directory using the command cd Mozilla/gaia.
Run DEVICE_DEBUG=1 make command. Don't run DEVICE=1 make or make command (because you won't be able to debug the apps, I was able to connect to the Firefox OS 2.2 but was not able to debug the apps when I ran these commands).
If you are running this command for the first time, it will download the b2g_sdk otherwise it will create a folder profile with your custom profile.
Open the WEBIDE using Firefox (Nightly preferred) and point to the profile folder you just created.
Links for your reference:-
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Developing_Gaia
https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Different_ways_to_run_Gaia
https://developer.mozilla.org/en-US/docs/Tools/WebIDE/Troubleshooting
https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Making_Gaia_code_changes
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites