How to configure my app with capability "PrivateNetworkClientServer" and keep possibility to pass "WACK" test - apache-cordova

I am working on Apache Cordova Win 10 Windows-x86 Store app for the data exchanging with the microcomputers collecting measurements, connected entirely to a local network.
I tested this app with capability "PrivateNetworkClientServer" and
deployed it in a form of "*.appx" package. It is working.
But "PrivateNetworkClientServer" capability is forbidden for Windows Store
with the setting in "package.windows10.appxmanifest" as this:
"uap:Rule Match="ms-appx-web:///" Type="include" WindowsRuntimeAccess="all" "
I have tried to change this setting or remove it (by default WindowsRuntimeAccess="none"),
but after running "build" this part of manifest was returned to its initial state.
How to configure my app with capability "PrivateNetworkClientServer" and keep
possibility to pass "WACK" test.
I appreciate any suggestions.
Thank you.

To have access from my Win Store App to web API in the local network I am using the "Fiddler4" exemption for now, but still hope to find more simple solution. The same Cordova app, but built with Visual Studio for Android, works in the same local network without any quirks.

Related

Can't get local testing working with BrowserStackLocal.exe desktop app on Windows 10

Browserstack has discontinued its chrome extension for local app testing and has moved to a desktop app/.exe that you have to download to do local testing.
I can't seem to get this working running Windows 10 and I'm wondering if anyone else has had this problem and resolved it.
When I download and execute their desktop app, it tells me local testing is enabled:
https://imgur.com/a/2ey7N3U
When I then use Browserstack Live to test local development I get an error message saying local testing is not enabled and it gives me the option to download their desktop app, which I have and says local testing is enabled:
https://imgur.com/a/YMd0LOj
I have tried uninstalling and reinstalling the desktop app/.exe, it gives me the same results.
I've confirmed with our network team that I am not behind a proxy which is an option to manage the desktop app (under "advanced settings" in the first screenshot above).
Our network team has also whitelisted all traffic from (asterisk).browserstack.com (the actual asterisk character is stripped here) and they're telling me "Additionally I watched his traffic on the firewall as he tried to use the browserstack software and no traffic was blocked
I've also been in contact with browserstack support but have basically been feeding their responses to our network team and our network team's responses back to browserstack. At the end of the day, I still can't get local testing working.
Does anyone have any ideas what might be happening and how I can resolve it?
I encountered the same behavior while setting up Local Testing with the BrowserStack Local Desktop app that was released after the announcement by Google about the end of support for Chrome apps (Click here). However, I was able to set-up Local Testing post configuring the proxy server details as mentioned over here.
I would suggest checking with your IT team if traffic for *.browserstack.com is being routed via a specific proxy at your end and configuring the proxy details in the 'Advanced Settings' for the desktop app.
In case this doesn't work, do contact BrowserStack Support

What to use instead of Azure Web Apps to allow installation of google chrome in app environment?

I've just created a feature for our application which generates a powerpoint report from the data a given user has in our system.
In short, the server spawns an instance of google chrome using Selenium's ChromeDriver, and from there scrapes out the charts from our application running in chrome. It was done this way to ensure the charts in the report look exactly the same as they appear in the clients' browsers.
We use Azure Web Apps to host our development and production environments, and while my reporting feature works fine in local environments, it doesn't work once deployed to any other environments, because it depends on chrome being installed, and I can't get it installed in the Azure Web App sandboxed environment.
(you can see this other question of mine for a bit of a reference to where things are going wrong: PowerShell StartProcess: invalid handle )
SO
What I pretty much want to know is, if an Azure Web App environment isn't going to allow me to install google chrome, where should I look next?
It looks like using Service Fabric may allow me to install what I need appropriately (https://learn.microsoft.com/en-us/azure/app-service/choose-web-site-cloud-service-vm), but it seems like a big change to make just to be able to facilitate this small part of the feature.
Another option is to just re-architect the feature so it doesn't depend on the server spawning an instance of google chrome.. but I'd just prefer to avoid that if there's a straightforward way for me to get what I have working.
Ideally, there'd just be a way to get google chrome installed in the given environment, but I've spent a good 10 hours trying to get that to happen now, and it's not looking promising.
There's a couple of solutions which would work - depending on your code and framework dependencies.
IMO - the simplest way would be to build your code in a docker container (that runs the Selenium ChromeDriver) and deploy it either through the container features on Web Apps or run it on demand through ACI (Azure container instances) and have it create the report and drop it in Azure Storage. In a container you have a lot more options - and you have a great amount of options on how to run it. Spinning up an ACI on-demand to do the job can be done in multiple ways (e.g. from Code or through logic-apps or Powershell/Azure automation).
Here are some links on running containers in your App Service:
https://learn.microsoft.com/en-us/azure/app-service/containers/
https://learn.microsoft.com/en-us/azure/app-service/containers/tutorial-custom-docker-image
You could start off by building and adding your code from this image: https://github.com/SeleniumHQ/docker-selenium
Other alternatives of course - you could have a VM that you can install and do what you want with on-demand - however - it'd add more management overhead and other implications to think about.
Many options - but in the regual Web App Sandbox - you're limited.
I have found myself this problem with chromedriver.exe needing a real Chrome. As I cannot install Chrome in Azure App Service I am trying a portable version of Chrome. When using the chrome webdriver I tell it where to find the chrome binary.
var options = new ChromeOptions();
options.AddArguments("headless"); // any options you need
options.BinaryLocation = "YOUR CHROME BINARY PATH HERE";
var driver = new ChromeDriver("YOUR CHROME DRIVER PATH HERE", options);
You should be able to copy the chrome portable files as no installation is required. Although it is heavy, 250 MB, because it includes the non portable version inside.
Be sure to use a Chrome version compatible with your ChromeDriver as pointed in the documentation

What Mongo GUI tools can I use to connect to my deployed Meteor app?

Tools like MongoLab remote connection and RockMongo require a permanent URL, so the URLs generated by "meteor mongo --url" that are only valid for 1 minute don't work for long.
If you're on a mac I would recommend that fononauts build of MongoHub you put up, the ordinary Mongohub is quite buggy & on Windows use MongoVue which is perhaps the best one i've used of all.

If i run Mobile Flex app "On Device" mode.Does the device access the database from my computer

My application is a cloud based app.Back-end Mysql. middle-ware is Jboss.
I didn't deployed the data into cloud.but i want to run app on device,Does it can access the data base from my pc.
The setting "on device" in Flash Builder run configurations only does one thing: It runs the app on the device you are building for. As in: "Right now, deploy the app to my device, so I can see how it performs when it doesn't have PC hardware to run on".
I haven't deployed to Android, so I don't know for sure what goes on there, but for iOS devices, this means compiling and packaging for LLVM execution and creating a deployable .ipa package.
There are restrictions that apply for iOS: You can't load and run Flash/Flex executable code in SWF format, to name the most important one. But Regardless of what device you are deploying to, a simple compilation setting won't create a local database to replace an external server - how could it, when its setup, characteristics and database schema aren't included anywhere in your code? And it won't disable internet connections.
Since you are probably using the internet to access your enterprise middleware, you should not run into problems. Why don't you just give it a try?

How to run automated GUI tests on a remote headless ESXi Virtual Machine?

I'm trying to setup automated GUI tests in ESXi Virtual Machines using TestComplete. The problem, as I understand it, is that when no remote desktop connection is made to the ESXi virtual machine, then it is impossible for TestComplete to perform screen captures and therefore automate the GUI testing. As far as I understand it, this is due to the fact that Windows does not generate any user interface when nobody is viewing it.
I'm sure other have experienced this problem. How did you solve it ? Are you using a third party computer which automatically launch remote desktop connections prior to running the tests ?
Would it be possible to launch a remote desktop from a head-less virtual machine to another to fake somebody viewing ?
Any other smarter solutions I haven't thought about ?
You should be able to log in to Windows on the VM's console using the vSphere client, then close vSphere, and Windows will still believe the user is viewing the console. Simple as that. :)
So there shouldn't be a need to involve remote desktop in the mix.
As long as your tests then run as that logged-in Windows user, you should be fine.
This technique has always worked like a charm for me with certain Watir, Selenium, and MS UI Automation tests that depend on having an interactive desktop.
If you need to reboot the VM automatically before/during the test, instead of logging in manually in the vSphere client, you can make Windows log in as an arbitrary user automatically - check the "control userpasswords2" command, or you can use the Sysinternals app "Autologin":
http://technet.microsoft.com/en-us/sysinternals/bb963905
Only catch with this technique is that you need to be able to launch your tests while not viewing the console on the VM, but it sounds like you've already taken care of that?
If you need a solution for launching your tests remotely, I highly recommend using Jenkins or Hudson to kick off tests/collect results from the VM. Jenkins has changed my life in this regard.
You may consider using the Network Suites functionality of TestComplete:
http://smartbear.com/support/viewarticle/16849/
It can open Remote Desktop connections on its own, control tests on remote PCs, and pull the logs back to the "master" project. This feature is designed to be used for distributed tests, and looks like it's just what you need.
As for opening RDP to a head-less VM, it should not be a problem - it's up to Windows to "think" about this. You just open RDP and it works even if there is no monitor attached to the remote PC/VM.
I hope this helps,
Alex
You can always use VNC with checking the option "Do nothing" when disconnecting viewer. This way you'll trick windows to generate the image.

Resources