Skip to content
gnomet edited this page May 16, 2012 · 7 revisions

Kassi can be used with an Aalto Social Interface (ASI) https://github.com/sizzlelab/ to allow storing user accounts to a centralized server that can serve multiple different applications with the same accounts. If you only want to run Kassi, it's simpler without ASI. That is also the default configuration of Kassi. You can adjust this by changing the use_asi parameter in config.yml.

Running tests with and without ASI

NOTE: you only need this part if you are developing Kassi.

As Kassi can be used in two modes, with or without ASI, to run the complete test suite it should be done with and without using ASI. Normal test commands as instructed at the bottom of https://github.com/sizzlelab/kassi/wiki/Coding-guidelines will run the tests for all functionality in single mode, which is determined by the environment variable KASSI_TESTS_WITH_ASI. If it's not set, it is considered false and tests are run without using ASI. Then it makes sense to skip those Cucumber tests that focus on ASI functionality (and are tagged with @only_with_asi), by using: cucumber --tags ~@pending --tags ~@only_with_asi

Here are examples for aliases that you can put to .bash_login for example, to make it easy to test with and and without ASI:

alias tests="testsnoasi;testsasi"
alias testsasi="export KASSI_TESTS_WITH_ASI=true;rake spec;cucumber --tags ~@pending --tags ~@only_without_asi"
alias testsnoasi="export KASSI_TESTS_WITH_ASI=false;rake spec;cucumber --tags ~@pending --tags ~@only_with_asi"

Remember that these aliases change the ENV variable and it stays that way, so if you run a single test after testsasi command, the KASSI_TESTS_WITH_ASI is still true and the test will be run in ASI mode.

If you are using Growl (and have growlnotify installed and want to be notified when tests finished, you can add growlnotify -m finished Tests in the end of the alias, separated by ; from the earlier commands, e.g. alias tests="testsnoasi;testsasi;growlnotify -m finished All Tests"

Clone this wiki locally