For general information about the Lively Kernel, see lively-kernel.org.
For feedback, announcement and discussions, please feel invited to subscribe to our mailing list.
This repository is a fork of the Lively Kernel Webwerkstatt wiki at HPI.
To learn more about the motivation and long-term vision for this repository see the wiki.
First you need node.js. Then you need npm, the "Node Package Manager". Install npm with: curl http://npmjs.org/install.sh | sh
Clone the Lively Kernel repository.
git clone [email protected]:rksm/LivelyKernel.git ~/LivelyKernel
Then initialize the project dependencies. Currently we are using express.js and nodemon for file serving.
cd ~/LivelyKernel
npm install
Now you can start the server with
make start_server
and visit blank.xhtml to start a minimal version of Lively Kernel.
In /apache_config you can find sample config files for Apache. Soon there will be more documentation on how to install Lively locally on different systems.
Note: Make sure you have all required node.js modules installed. Run npm install
to do so.
To start the Lively tests from the command line first start the server:
make start_server
To initiate a test run do
make kernel_tests
This runs tests in the browser you specified in testing/config.js. Alternatively, you can use the make targets kernel_tests_firefox or kernel_tests_chrome.
Behind make kernel_tests
there is the script testing/run_lively_tests_cli.js
. Start it with
node testing/run_lively_tests_cli.js --help
to see all available options. A few useful ones are:
- Change the browser with
-b
. We currently supportchrome
andfirefox
. - Filter tests to run with
-f
, e.g.-f "testframework|.*|filter"
will only run those tests that are in modules matching '"testframework' (there is justlively.TestFramework
) and are defined in those test methods that match 'filter'. Generally, there are three parts to a filter that are interpreted as regular expressions. The first one matches modules, the second test classes, and the third test methods. You don't need to specify all parts. This makes it very easy to run focus tests. - Output the results via a notification system lile 'growlnotify' with
-n growlnotify
.
The mini server provides a HTTP interface for running and reporting tests. When a new test run is requested, a Chrome instance is started and a URL to a Lively Kernel world opened. Alongside are passed queries that will the world instruct to load a test script that is executed as soon as the world is loaded.
A test run is requested by POSTing to http://localhost:9001/test-request.
This will by default open the world http://localhost:9001/testing/run_tests.xhtml and run the script testing/run_tests.js
. The server will also add an id parameter that is later used for reporting. run_tests.js
determines what tests should be loaded, how to run them, and how the reporting happens.
By default, a POST request to http://localhost:9001/test-report will inform the server about results and close the browser session (if the browser was started from inside the server).
To try it out manually visit: http://localhost:9001/testing/run_tests.xhtml?testRunId=1&loadScript=run_tests.js&stayOpen=true
We use Travis-CI to run tests continuously on every commit into the Master branch:
Please that wiki page for some best practices.
You can install all the cool tools from Webwerkstatt's PartsBin. Have a look at the HOWTO.