Skip to content

Dev install and running tests

greg-westnine edited this page Oct 8, 2018 · 5 revisions

This page shows you how to get the Open Voice Factory server running locally. You don't need this page if you only want to have a commuication aid running locally.

This page is for people interested in writing code for the project.

Commands used by Joe to get the OVF server running on his brand new local machine:

git clone https://github.com/eQualityTime/TheOpenVoiceFactory

sudo easy_install pip

pip install mock --user

pip install python-pptx --user

Python Tests

To run the tests (takes a while, lots of regression)

cd tests python test_grab_text.py

To generate a communication aid from the command line you want:

./localcreate.sh nameoftemplate.pptx 5

(assuming it's a 5 by 5 template)

Javascript Tests

We're using Karma. There are 2 sets of tests to consider, testing upload and testing display. The commands needed to get this working on a fresh clone on Joe's Desktop were:

cd templates/javascript

npm install karma karma-jasmine karma-firefox-launcher karma-chrome-launcher jasmine-core --save-dev

npm install karma-cli -g --save-dev

...and then to run from the same directory.

karma start ovf.conf.js

Some explanation

karma is a tool which runs automates the running of tests. It ensures that our tests are run every time there is a change to any of the source files, so you can know immediately if you make a change which causes regression. Karma can test against multiple browsers, including firefox, chrome and IE.

jasmine is a testing framework, it takes our definition of tests and makes the run. Jasmine-core contains the library, karma-jasmine is the jasmine plugin for karma.

karma-cli is a karma command line interface which we install globally to enable it to be run from anywhere. using the --save-dev option updates the package.lock.json file, which locks the dependency tree for the solution.

You can install these packages anywhere. Installing them in the local directory makes things easy in one sense, but if this is also your development environment, and mapped to a git fork/branch, git will think you're adding these packages to the solution and want to add them to your commit. You can avoid this by installing in a separate directory, but then you may need to edit your PATH variable.