Skip to content

Commit 025868a

Browse files
committed
update readme with testing section
1 parent 3042c9a commit 025868a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,18 @@ There have been a few breaking changes in recent releases:
134134

135135
See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.
136136

137+
## Development
138+
139+
### Testing
140+
The test suite is broken up into offline unit tests and integration tests that test against actual service instances.
141+
* `npm test` will run the linter and the offline tests
142+
* `npm run test-offline` will run the offline tests
143+
* `npm run test-integration` will run the integration tests
144+
145+
To run the integration tests, a file with service credentials is required. This file must be called `stt-auth.json` and must be located in `/test/resources/`. There are tests for usage of both CF and RC service instances. For testing CF, the required keys in this configuration file are `username` and `password`. For testing RC, a key of either `iam_acess_token` or `iam_apikey` is required. Optionally, a service URL for an RC instance can be provided under the key `rc_service_url` if the service is available under a URL other than `https://stream.watsonplatform.net/speech-to-text/api`.
146+
147+
For an example, see `test/resources/stt-auth-example.json`.
148+
137149
## todo
138150

139151
* Further solidify API

test/resources/stt-auth-example.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"username": "<your-cf-username>",
3+
"password": "<your-cf-password>",
4+
"iam_apikey": "<your-rc-apikey>",
5+
"rc_service_url": "<your-optional-rc-service-url>"
6+
}

0 commit comments

Comments
 (0)