DUT Chrome App Automated Testing on Chromebook using Autotest and Chromedriver - testing

My company has a Chrome App I have been running automated testing on using Selenium and Chromedriver on Mac and Windows. They recently asked if it would be possible to get an automation setup going on an actual ChromeBook. I had initially looked into this ~three years ago, but the Autotest and Chromedriver integration into the Chromium test builds wasn't in place then.
From all of the research I have done thus far it appears to be possible. However there really seems to be a lack of instructions and documentation for Autotest, test_that (Autotest's Chromium script), and how to get it hooked to the DUT (Device Under Test). Chromedriver is built into the Chromium test images (and I have located it on my own Chromium test build) and supposedly can be launched using Autotest on the DUT from a host chronos root.
If anyone knows of a good resource or has first hand knowledge please let me know. I'll post links to all the Chromium resources I have been reading.
Is there a decent resource for autotest and test_that script usage within a Chromium test build?
Many thanks!
https://chromium.googlesource.com/chromiumos/third_party/autotest/
https://sites.google.com/a/chromium.org/chromedriver/getting-started/chromeos

Related

How does the elixir community recommend setting up integration tests with chromedriver?

I am using Hound (https://github.com/HashNuke/hound) for integration testing a Phoenix application. I have chrome and chrome headless working. To get it working I have another terminal window running chromedriver (installed via brew). This feels odd to me. Is there a library or test setup that would feel more "integrated" into the application? What's the Elixir way of doing this?
In the Ruby world there's the webdrivers gem (https://github.com/titusfortner/webdrivers). As far as I know it downloads a specified driver (lets say chromedriver) to $HOME. Then with every test run, the test uses the driver downloaded to that destination to execute the tests.
Before the webdrivers gem there was chromedriver-helper gem. Before that it was phantomjs. These implementations made it so running integration tests required 1: downloading the driver 2: running the test
In Elixir (with Hound) I have my tests working by first running chromedriver --verbose in a terminal split, and in the other screen I run mix test. This works fine but feels disjointed. This adds extra steps, 1: download the driver 2: start the driver 3: run the test 4: stop driver
I could write a script manually to run chromedriver in the background, and stop it after the tests are run.
I am new to the Elixir community and so I've researched a lot. It's still not clear to me if there is a "traveled path" I should go down vs just hooking everything up manually.
Have I missed a recommended abstraction? Is this intentional? Is this "just not created, yet"?
Thank you
Have you checked out wallaby? See https://github.com/keathley/wallaby

MicrosoftWebDriver 16299, 15063 doesn't work when I minimise Edge browser window

When I execute tests using MicrosoftWebDriver for Edge all works fine, but when I minimise the window all tests become failed. Does Edge or MicrosoftWebDriver have any options to avoid that behavior?
As you have been trying to minimise the Browser Window while your Test Execution is In Progress it will be against all the Best Practices. At this point it is worth to mention that as Selenium mocks the User Actions hence Selenium needs Browser focus. If the focus is lost Selenium won't be able to execute the lines of code. Consider the following steps while your Test Execution :
Browser Maximize : While you execute your tests always keep the Web Browser maximized so majority of the elements are within the Viewport
As per best practices, you should try to execute your Test Scripts / Automation Framework in an isolated Test Environment away from Manual Intervention with all the required Software and Hardware configurations and setup.
You can find a detailed discussion in How to run chrome driver in background using selenium with Ruby for Mac OSx?
You also have an option to use Google Chrome or Mozilla Firefox in Headless version.
For Firefox you can find a detailed discussion in How to make firefox headless programatically in Selenium with python?
For Chrome you can find a detailed discussion in selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH error with Headless Chrome
For Ghost Browser you can find a detailed discussion in Which drivers support “no-browser”/“headless” testing?

Watir Integration tests with phantomjs not working with internet

The project I'm trying to do uses watir-webdriver and selenium-webdriver and phantomjs to write tests. And these tests go green while internet is not connected, but when internet is connected ,it gives a net:timeout error. What could be the possible reasons?

Are there NPAPI testing tools?

I'm using firebreath to build a plugin that downloads an application and runs it (something very simple). I know that some browsers are dropping npapi support, but I need to run this plugin just in old versions of browsers (e.g. IE 6, Firefox 38, Chrome 31). I'd like to know if there are any tools that could help testing the plugin's in a variety of environments (e.g. Firefox on Linux,windows, Safari on OSX). So far, what I'm doing, is setting up each environment (windows, linux, Mac) and building/installing the plugins manually. I think cross browser testing tools that I've found on internet won't help, because they don't allow plugin install.
I couldn't find anything on my research, so thanks in advance
Any browser automation tool capable of instrumenting pages on all of those platforms can test NPAPI, since it runs in a browser...
so, Selenium, for example.

Run Geb tests with chromeDriver without opening the browser

I want to run my Geb specs with chrome driver without having to watch the tests on the browser? can this be done?
P.D.: I know I can use the HtmlUnitDriver, but this driver sometimes gives my errors (caused mainly by timeouts) that the chrome driver don't.
There is currently no way to do this with Chrome, Safari, Opera or FireFox, however there are multiple options you can do. First is to pipe the "window" into a virtual frame buffer (if you're using Linux). This process will pop open the browser, only in memory. I talk about this in my blog post (http://www.ensor.cc/2011/05/maven-javascript-unit-test-using.html) during the maven pre-integration phase
The other option is to use the brand new GhostDriver. GhostDriver is a WebDriver implementation of PhantomJS which is a headless WebKit. This is WAY better than HtmlUnit but still has some features being built out. GhostDriver is currently not in Maven Central, so you will need to manually add it to the common repository. You can then use it as a WebDriver. This has worked for me with moderate success (90% of my test cases dropped in without any changes needed).
Read this first: http://blog.ivandemarino.me/2012/12/04/Finally-GhostDriver-1-0-0
Then refer to the GitHub README and code: https://github.com/detro/ghostdriver