Weblocks Selenium tests
- tests for different weblocks components
- environment for testing external (own) components/widgets.
To run tests do 3 things
selenium-server(in this repository) from shell
This will start selenium-server-standalone which will control browser.
This will start weblocks test app and swank. No packages required to install, all packages must load from .quicklisp directory
(weblocks-selenium-tests:all-tests)from started application.
This package contains environment for tests, selenium tests and two weblocks applications.
You can use both applications for rendering and testing your own weblocks widgets.
Adding tests for own widgets
To add your own tests for your widgets using weblocks-selenium-tests environment you need 4 things.
- define page(s) containing demo of widget.
- start tests server with your test package included.
- define test suite(s) for your package
- define tests inside your test suite(s)
To define new page in demo list use
(see function documentation for details).
To make sure it was defined and to run tests on it, you should tell
weblocks-selenium-tests about it. This is done by running
test packages as parameters. It will try to load packages but you should care about
loading corresponding .asd files automatically before starting server (you can use .sbclrc
for example or quicklisp with .quicklisp/local-projects directory).
Defining test suites
To define your own test suite use weblocks-selenium-tests:def-test-suite, it is
stefil:defsuite*. Tests will be defined inside of
all-tests suite which is
root for weblocks-selenium-tests.
You'll need also
stefil:deftest and probably some other stefil functions.
Other test helpers provided by weblocks-selenium-tests are
Please refer to stefil or selenium documentation for more information.
Package is tested only with sbcl.