Testcafe not able to communicate with local zat server (zendesk-app-tools) - testing

I'm building a test suite for our Zendesk apps and testcafe works perfectly fine for our environments but isn't working with a local zat server. When a developer wants to test a change they'll build and run the app within a zat server which talks with the Zendesk instance specified and when ?zat=true is appended to the URL it then loads the local app changes. Testcafe doesn't appear to work with this as the changes don't load and I see no communication with the zat server. We need use a zat server as part of pull requests to test changes before they're merged with other environments. I know this is a rather specific issue but any help would be really appreciated.

This was previously using Zendesk app tools (zat) which is now deprecated. The zcli interface works with testcafe and is the currently supported implementation for Zendesk apps.

Related

Quarkus app runs perfectly on local but does not respond to any request on windows server

I have a simple quarkus api app. I've tested the app on my local machine and its running fine. But when i try to run the same app in windows server it starts perfect but does not respond to any of my api request. It is not showing any error or problems. I've tried multiple ways to run the app also through package and jar files but all led to same result. screenshot of the palce where app gets stuck

How do I kick off a Console App that runs Selenium web driver using a logic app?

I have a Console App that takes advantage of Selenium WebDriver. I'm intending to use this to automate the receipt of an email with an attachment and upload that attachment to a website. The Console App works perfectly. But I'm using WinAutomation to start that process from an .exe on the desktop of a VM.
What I'd like to do is, instead of using winautomation, publish that Console App to an App Service in Azure. This I can do easily. However what I'm wondering is, how would I go about kicking off that App Service and providing the email attachment using a Logic App.
Hope this makes sense
This isn't possible. Selenium requires the use of GDI+ which isn't allowable in an App Service Sandbox. The more plausible course of action is what you're already doing, running your Selenium test during your CI/CD flow on a build agent.

Store selenium tests on a server but run them on local browsers, through a framework like fitnesse

I've been working on a webdriver framework for a while now, I guess it is
keyword driven now. We would like for there to be a central place for users to
store tests, preferably on a wiki, but then when they are run they would open up
the browser on users local machine.
I originally started working using Fitnesse, which works great for storing the
tests however when we hosted it on a server when a user tries to run a test it
opens the browser on the server which the user can't view. Does anyone know a
way that I could force Fitnesse to open the users local browser or display the
browser to the user? Or do you know another framework/way to store tests in a
central place but run them in local.
I've been looking at sending through the local users ip through a fixture to start up the initial framework, I was hoping that fitnesse would already know the ip.
Thanks,
James
You can either find a framework that does what you want, or the bare minimum would be to create a thin wrapper that copies the test dll's and executeable to a machine and executes psexec to execute the tests on the remote machine. You could probably write the entire thing in maybe 20 lines of code.

How to automatically test if offline mode is working in web application

I have mobile web application that has offline capabilities (via HTML5).
I'm currently building automatic build & testing for it (ant, JsTestDriver etc.), until I hit a wall. How can I test if the web application has working offline mode? This is specially painful since if tested by hand; iPhone practically needs full reset between tests (it tends to cling on to some parts of the data).
I'm thinking something around these lines (on a idea level):
Setup Java web server with ant
Fire some sort of headless client, that supports HTML5 offline use
Load the application
Validate that everything is loaded
Disable server
Load the application
Validate that everything is loaded, still
Any suggestions how would I proceed doing something like this?
Not sure I understand your question, but what do you think of:
Not using an iPhone, but chrome on PC with the ripple emulator http://ripple.tinyhippos.com/
Setting a fake proxy or editing the .host file in order to be sure that your chrome session does not have access to your server.

Developing and Testing a Facebook application

Typically I develop my websites on trunk, then merge changes to a testing branch where they are put on a 'beta' website, and then finally they are merged onto a live branch and put onto the live website.
With a Facebook application things are a bit tricky. As you can't view a Facebook application through a normal web browser (it has to go through the Facebook servers) you can't easily give each developer their own version of the website to work with and test.
I have not come across anything about the best way to develop and test a Facebook application while continuing to have a stable live website that users can use. My question is this, what is the best practice for organising the development and testing of a Facebook application?
Try updating your hosts file (for windows users # c:\windows\System32\Drivers\etc\hosts) with an entry that will route all requests from your live domain back to your machine.
So 127.0.0.1 mywebappthatusesfacebook.com.
Then make sure that your app is running at the root of your webserver. # http://localhost/ Then goto mywebappthatusesfacebook.com in your browser and it should redirect right back to your local machine. Facebook won't know the difference. Hope this helps
The way I and my partner did it was we each made our own private Facebook applications, that pointed to our IP address where we worked on it. Since we worked in the same place, we each picked a different port, and had our router forward that port to our local IP address. It was kinda slow to refresh a page, but it worked very nicely.
You'll have to add both trunk and test versions as different applications and test them using test accounts. You may also use a single application and switch its target URL between cycles.
Testing FB apps is still a rather primitive process.
I generally setup a test application that is a complete copy of the production settings inside the FB development environment that uses an SSH tunnel to point to my development server. You can setup as many applications as you need inside FB - I generally have a development application, a staging app and production. Staging and Production are both on "live" servers rather than an SSH tunnel.
In your application you then use whatever language/framework/server tools are at your disposal to switch the FB configuration based on the server. In Rails, the Facebooker gem actually has built in support for different FB configurations.
Once all of that is done, testing is, unfortunately, still a matter of running the app within FB itself. I use Selenium to automate as much of this as possible.
Best way to do this:
Remove 'App Domain' from 'Basic Info'
Set website's 'Site URL' to : "http://localhost/" .
That simple.
(This only apply if you don't have a live system running in parallel to the test env. In that case get yourself another key.)
We have it setup much like Toby. A series of config files for each developer, that has the Facebook APP Id info (a different app for each developer), separate pages where the app is hosted, and git ignores the config files. We're LAMP with Code Igniter, and it's similar to Rails in that we can set the environment in 1 file, which points to the config with the Facebook constants.
Branching out into Selenium, using unit tests for model-testing.
For local testing we simply use a different app than for the server. In our case the Canvas-URL is set to localhost.local:8000.
You only have to make sure that when you use facebook connect that you type in localhost.local into the address field of the browser and not just localhost.
For testing a canvas or tab app it is faster if you use the 'open iframe in new tab' command of Firefox. This way the session and cookies from Facebook are preserved.
Another solution is NGROK
https://ngrok.com/
It opens a public tunnel to your local app
Example on my rails application by simply typing
./ngrok 3000
I get
http://630066fe.ngrok.com -> 127.0.0.1:3000