Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So far, the test model is very simple. It contains 4 user accounts, so you will not need to create them in your tests. The model records that each of the users has already logged in, so you will not need to do a first-time password change in your tests.

UseremailPasswordRole
testAdmintestAdmin@cornell.eduPasswordsystem administrator
johnCuratorjohnCurator@cornell.eduPasswordcurator
sallyEditorsallyEditor@cornell.eduPasswordeditor
joeUserjoeUser@cornell.eduPasswordself-editor

Prepare your working environment

...

You will need to have a VIVO development area on your computer, along with things like Java and Tomcat. This document won't tell you how to create a development area.

In these instructions,

the term [VIVO] will refer to the top directory of VIVO source code fetched from the GitHub,

the term [VIVO_HOME] will refer to the top directory of your Vivo development area, and
the term [VITRO_HOME] will refer to the top directory of your Vitro development area.
(For some developers, this will be within the Vivo area, but for most developers it will be a separate area).

Clean your

...

database

As you develop the acceptance tests, you will frequently want to clean your MySQL database, so it will contain exactly the same data each time the tests are run. It may be helpful to create a script that will do this. Create You should create a script file, called something like cleanMySQLlike cleanDatabase.sh (Unix) or cleanMySQLcleanDatabase.bat (Windows).

If you are using TDB storage, it is necessary to reinitialize the content of the VIVO triplestore. To do this it is necessary to delete the directories rdf, tdbContentModels, tdbModels contained in[VIVO_HOME].

Copy the text below into the script. Substitute the VIVO_HOME with the path to the top directory of your Vivo development area. Moreover, check the path to the tdbContentTripleSource directory in [VIVO_HOME]/config/applicationSetup.n3 


Code Block
cd $VIVO_HOME
rm -r rdf
rm -r tdbContentModels
rm -r tdbModels


If you are using SDB storage preserved in MySQL, copy the text below Copy this text into the script. This should all go on a single line:

...

Stop Tomcat if it is running, and run this script to clean the MySQL database. The next time you start VIVO, you may need to allow some extra time for it to load the default model data files into the database.

...

Copy the test model data file

from here:
[VITRO_HOMEVIVO]/utilities/testrunner/src/edu/cornell/mannlib/vitro/utilities/testrunner/selenium/test-user-model.owl
to here:
[VIVO_HOME]/rdf/auth/firsttime/test-user-model.owl

Build the application

Run ant deploy Rebuild VIVO (mvn install -s example-settings.xml) and start Tomcat.

Confirm that the test data is available

...

Some tips for using XPath