Skip to content

azer/lowkick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplifies executing JavaScript code on varied environments, from command-line.

Install

$ npm install lowkick

Concept

LowKick can be considered as a JavaScript evaluation server coming with several utilities and APIs that provide developers a unified way of JavaScript execution. It abstracts the differences of varied platforms by defining drivers and commands.

See example configuration files:

And following screenshots:

First Steps

To give LowKick a try, you can run the tests of LowKick. It uses itself to test its frontend API.

$ git clone git@github.com:azer/lowkick.git
$ cd lowkick
$ make publish # equivalent of "lowkick publish test/config.json"

It'll start publishing the frontend tests at http://localhost:1314. Visit this page with any web browser.

$ $BROWSER http://localhost:1314

It'll execute specified the JavaScripts, and save the result of execution to a JSON file defined at the config file

After running the tests on varied environments, you can see the summary of the results;

$ make verify # equivalent of "lowkick verify test/config.json"
Passed: chrome, v8, webkit, safari
Not Tested: ie6, ie, dom, ie8, gecko, ie7, node, firefox

Revision: 0.0.1
Results Source: test/results.json
Config: test/config.json

The summary above shows that the tests are run by Google Chrome successfully and the other target environments such as IE6, firefox haven't been tested yet.

Testing IE Headlessly

You can simply open the test URL with Internet Explorer, if you feel comfortable with that way. For those who hate seeing IE should LowKick's drivers and commands.

If you have a VirtualBox VM named "ie6" (ie7 or ie8 counts, as well) on your system, following command should work;

$ make test-ie6 # equivalent of "lowkick command ie6 test/config.json"

First question came to your mind is probably "Does LowKick provide these commands?", the answer is no. Commands are defined in config files. Which means, you can edit the IE command above if it doesn't work for you.

Defining Commands

The config file of LowKick defines the commands IE6, IE7 and IE8 to run its tests through virtual machines, using the VirtualBox driver, like below;

"ie8": {
  "driver": "virtualbox-ie",
  "vm": "ie8",
  "url": "http://10.0.2.2:1314"
}

As you may notice, it uses the driver virtualbox-ie, instead of virtualbox, to not duplicate some details that can be seen below;

"ie8": {
  "driver": "virtualbox-ie",
  "vm": "ie8",
  "exec": "C:\\Program Files\\Internet Explorer\\iexplore.exe",
  "params": "http://10.0.2.2:1314"
}

REST API

FIX ME

Working with Test Frameworks

LowKick itself is not a test framework and doesn't provide anything test frameworks already accomplish. It aims to let developers run all kind of tests on varied environments, from command-line.

Jasmine

Download and add those following files to on top of the scripts defined your config file and you're all set to go!

Setting Up Remote Servers

Projects Using LowKick

Troubleshooting

  • Resetting VMs solves problems.
  • Make sure that the VM on which you're trying to run tests is saved.
  • To reset a VM running headlessly; vboxmanage controlvm "$1" reset

About

simplifies running javascript tests on varied environments, from command-line.

Resources

Stars

Watchers

Forks

Packages

No packages published