<commit_before>## Acceptance Tests

The acceptance tests are for developers to validate changes to the MySQL Release.

To run the MySQL Release Acceptance tests, you will need:
- a running CF instance
- credentials for a CF Admin user
- a deployed MySQL Release with the broker registered and the plan made public
- an environment variable `$CONFIG` which points to a `.json` file that contains the application domain

### BOSH errand

BOSH errands were introduced in version 2366 of the BOSH CLI, BOSH Director, and stemcells.

The acceptance tests requires the same deployment manifest properties as the [smoke tests](/README.md#running-smoke-tests-via-bosh-errand).

By default, the acceptance-tests errand only runs the smoke tests. To enable the full acceptance test suite, set the following property:

- `smoke_tests_only: false`

To run the acceptance tests via bosh errand:

```
$ bosh run errand acceptance-tests
```

### Manually

The acceptance tests can also be run manually.

Reasons to run tests manually:

1. Output will be streamed (bosh errand output is printed all at once when they finish running)

Instructions:

1. Install **Go** by following the directions found [here](http://golang.org/doc/install)
2. `cd` into `cf-mysql-release/src/github.com/cloudfoundry-incubator/cf-mysql-acceptance-tests/`
3. Create file `integration_config.json`

    The following commands provide a shortcut to configuring `integration_config.json` with values for a [bosh-lite](https://github.com/cloudfoundry/bosh-lite)
deployment. Copy and paste this into your terminal, then open the resulting `integration_config.json` in an editor to replace values as appropriate for your environment.

  ```bash
  cat > integration_config.json <<EOF
  {
    "api": "http://api.10.244.0.34.xip.io",
    "apps_domain": "10.244.0.34.xip.io",<commit_msg>Document how to manually run acceptance-tests - In terms of GOPATH, Ginkgo, etc [#89157752]<commit_after>## Acceptance Tests

The acceptance tests are for developers to validate changes to the MySQL Release.

To run the MySQL Release Acceptance tests, you will need:
- a running CF instance
- credentials for a CF Admin user
- a deployed MySQL Release with the broker registered and the plan made public

### BOSH errand

BOSH errands were introduced in version 2366 of the BOSH CLI, BOSH Director, and stemcells.

The acceptance tests requires the same deployment manifest properties as the [smoke tests](/README.md#running-smoke-tests-via-bosh-errand).

By default, the acceptance-tests errand only runs the smoke tests. To enable the full acceptance test suite, set the following property in the BOSH manifest:

- `smoke_tests_only: false`

To run the acceptance tests via bosh errand:

```
$ bosh run errand acceptance-tests
```

### Manually

The acceptance tests can also be run manually. An advantage to doing this is that output will be streamed in real-time (bosh errand output is printed all at once when they finish running).

Instructions:

1. Install **Go** by following the directions found [here](http://golang.org/doc/install)
1. Export the environment variable `$GOPATH` set to the `cf-mysql-release` directory to manage Golang dependencies. For more information, see [here](https://github.com/cloudfoundry/cf-mysql-release/tree/release-candidate#development).
1. Change to the acceptance-tests directory:

    ```
    $ cd cf-mysql-release/src/github.com/cloudfoundry-incubator/cf-mysql-acceptance-tests/
    ```

1. Install [Ginkgo](http://onsi.github.io/ginkgo/):

    ```
    $ go get github.com/onsi/ginkgo/ginkgo
    ```

1. Configure the tests by creating `integration_config.json` and setting the environment variable `$CONFIG` to point to it. The following commands provide a shortcut to configuring `integration_config.json` with values for a [bosh-lite](https://github.com/cloudfoundry/bosh-lite)
deployment. Copy and paste this into your terminal, then open the resulting `integration_config.json` in an editor to replace values as appropriate for your environment.

  ```bash
  cat > integration_config.json <<EOF
  {
    "api": "http://api.10.244.0.34.xip.io",
    "apps_domain": "10.244.0.34.xip.io",
{'fraction_non_alphanumeric': 0.08866522885214474, 'fraction_numerical': 0.013659237958303379, 'mean_word_length': 4.365038560411311, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4704992', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1171, 'n_words': 494}