SprocketMonkey - (in)finite monkey theorem about Sprocket
Testing a web browser can be approached from several different angles. One can test performance, responsiveness, correctness of page layout or even the behavior of a web site in different user interactions.
If you have read our previous blog post you may know that we have a web browser project - named Sprocket. Even though the underlying components - for example Content API - are tested thoroughly, we would like to improve the testing process with an additional test-framework using monkey testing. Monkey testing is one of the most popular blackbox testing methods. Its point is to give random inputs to a program in order to discover unexpected behavior.
Monkey testing can be easily automated with the help of an already implemented test framework, Selenium, which is an especially good option for blackbox testing of browsers or web applications. It consists of two parts: a client and a server. The client part is called the Selenium client driver and the server part is the webdriver.
If you would like to get into the details you can also check out how we have added the support of Chromium’s Developer Tools to our browser. In addition, if you would like to try out the tool, the following example shows how to connect to Sprocket on Linux through Selenium’s Python API.
First, ChromeDriver should be in your path. Launch a Python shell:
Now an empty Sprocket window should be shown. To load a webpage, execute:
You can check out how SprocketMonkey deals with the connection to the WebDriver both on Linux and on Android platforms. Currently SprocketMonkey supports the following actions:
If you are interested, try out SprocketMonkey on your website / web application!
Happy Monkey Dance!
On behalf of the Sprocket team