<commit_before># Vagrant for functional Testing

This directory contains a `Vagrantfile` that points to a Vagrant Box that is
already configured with `grails` and `webstest.sh`. These are both installed
in `/usr/local` and the proper paths for JAVA_HOME, GRAILS_HOME etc. are 
already set for you.

## Usage

### Preparation
1. You'll need [Virtualbox](http://virtualbox.org)
2. You'll also need [Vagrant](http://vagrantup.com)

After installing both of these, you're ready to start!

### Starting the box

1. In the `vagrant` directory, use `$ vagrant up` to start the testing machine.

This creates a testing environment with this repo's directory mapped 
to `/ossim-geotools` within the virtual machine.

2. You can now use `$ webtest.sh` to create and run functional tests.

### Stopping the box (Equivalent to power off)
1. Use `$ vagrant halt`

#### Destroy the box
1. Use `$ vagrant destroy`

This wipes the box clean of everything may have done and resets it again. Don't 
worry about your code being deleted though. Since it is in the `/vagrant` directory
it is shared with your local machine.
<commit_msg>Instructions for using spock and geb and removal of webtest testing framework.<commit_after># Vagrant for functional Testing

This directory contains a `Vagrantfile` that points to a Fedora based 
Vagrant Box that is already configured with `grails` and `webstest.sh`. 
These are both installed in `/usr/local` and the proper paths for _JAVA_HOME_ , _GRAILS_HOME_ etc. are already set for you.

## Getting Started

### Preparation
1. You'll need [Virtualbox](http://virtualbox.org)
2. You'll also need [Vagrant](http://vagrantup.com)

After installing both of these, you're ready to start!

### Starting the box

1. In the `ossim-geotools/vagrant` directory, use `$ vagrant up` to start the testing machine.
    - This creates a testing environment with this repo mapped to the `/ossim-geotools` directory within the virtual machine.

### Stopping the box (Equivalent to power off)
1. Use `$ vagrant halt`

#### Destroy the box
1. Use `$ vagrant destroy`
    - This wipes the box clean of everything may have done and resets it again. Don't 
      worry about your code being deleted though. Since it is in the `/vagrant` directory
      it is shared with your local machine.

## Creating and Running Tests

Within the `tilestore` directory, you'll find `test/functional`. The functional tests reside here.

You can run the tests with `$ grails test-app functional:`

The output is stored in `target/geb-reports`.
{'fraction_non_alphanumeric': 0.08188291139240507, 'fraction_numerical': 0.00435126582278481, 'mean_word_length': 4.140243902439025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '186129', 'n_tokens_mistral': 760, 'n_tokens_neox': 731, 'n_words': 356}