-
Notifications
You must be signed in to change notification settings - Fork 8
Automated Testing
The KBPlus functional test relies upon selenium and the firefox driver. It also requires an administrative "admin" user with the password "admin". This can be configured in ~/.grails/demo-config.groovy. Bear in mind that the functional test starts every run with an empty database. Using the config file to set up the initial test user is an ideal way of getting a repeatable environment. The following stanza will add the test user:
sysusers = [
[
name:'admin',
pass:'admin',
display:'Admin',
email:'admin@localhost',
roles: [ 'ROLE_USER', 'ROLE_ADMIN']
]
]
Functional tests are run with the command
grails test-app functional:
Note also that the functional tests refer to data files in the manual_test_data directory of the project, and a path relative to the grails project home directory is used. Therefore, tests should be run from the app directory at the top level of the project.
FF Version problems: To use a specific version of FF for testing purposes, add to your demo-config.groovy :
geb.firefox=/home/user/path/to/ff