Testing Frameworks

From Plnwiki

Running the LOCKSS daemon in a development/test environment

The daemon can be run in the development environment to facilitate testing and debugging of plugins or the daemon code itself. There are three primary configurations:

  • run_one_daemon. Runs a single daemon which can exercise most daemon and plugin capabilities except polling.
  • run_multiple_daemons. Runs 4 daemons which can communicate with each other to run polls.
  • run_dev. Runs a single daemon which can participate in a PLN.

To run any of these, change to the appropriate directory below test/frameworks and do './start'. To stop the daemon do './stop'.


run_one_daemon

To begin testing a new plugin use run_one_daemon. The simplest way to get a plugin loaded into the daemon is to insert it into the source tree below plugins/src. The path must agree with the plugin's plugin_identifier. E.g., a plugin whose plugin_identifier is edu.institution.plugin.MyPlugin should go in the file plugins/src/edu/institution/plugin/MyPlugin.xml . Compile the plugin with
  ant jar-plugins
then start the daemon
  cd test/frameworks/run_one_daemon
  ./start

Connect to the UI at http://localhost:8081/, with username "lockss-u", password "lockss-p". Error messages and other log output will be written to test.out in the current directory.

To add an AU, go to Journal Configuration/Manual Add/Edit, click the Add button, enter the full plugin_identifier in the class name box, click Continue, enter values for the AU configuration parameters required by the plugin, then click Create.

The daemon will start crawling the AU within a few minutes. (To hurry that along, go to Debug Panel, select the AU in the AU Actions box and click Start Crawl. Go to Daemon Status/Crawl Status to watch the progress. If errors occur, more detailed information can usually be found in the daemon log (./test.out).

run_multiple_daemons

Daemons will be available at: