GithubHelp home page GithubHelp logo

lowkick's Introduction

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

It aims to:

  • Publish JavaScript tests at a specified URL
  • Run the tests through drivers (VMs, Remote Machines etc)
  • Provide test frameworks an API to save test results
  • Let developers setup remote test servers

Install

$ npm install lowkick

The Concept

See test/config.json 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 [email protected]: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!

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

lowkick's People

Stargazers

thdtjsdn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.