Skip to content

Commit 8745aa9

Browse files
authored
Merge pull request #3 from flowable/feat/update_readme_tests
Update README to add integration test documentation
2 parents b4d5c0f + b027e4e commit 8745aa9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,33 @@ flowable.SetEnableLogging(false) // disable
6666

6767
When logging is disabled the library will suppress internal `log.Printf` messages.
6868

69+
## Integration Tests With Cached HTTP Cassettes
70+
71+
Integration tests in `test/flowable_integration_test.go` use a VCR-style recorder (`go-vcr`) and store HTTP cassettes in `test/fixtures/cassettes`.
72+
73+
### First run (record cassettes)
74+
75+
Requires a running Flowable Work instance.
76+
77+
```bash
78+
FLOWABLE_INTEGRATION=1 \
79+
FLOWABLE_CASSETTE_MODE=record \
80+
FLOWABLE_BASE_URL=http://localhost:8090 \
81+
FLOWABLE_USERNAME=admin \
82+
FLOWABLE_PASSWORD=test \
83+
go test ./test -run Integration -v
84+
```
85+
86+
### Run from cache (no Flowable required)
87+
88+
```bash
89+
FLOWABLE_CASSETTE_MODE=replay go test ./test -run Integration -v
90+
```
91+
92+
### Cassette behavior
93+
94+
- Default behavior:
95+
- With `FLOWABLE_INTEGRATION=1`: replay existing cassette interactions and record missing ones.
96+
- Without `FLOWABLE_INTEGRATION=1`: replay only from existing cassettes.
97+
- If a cassette is missing and `FLOWABLE_INTEGRATION` is not set, that test is skipped.
98+
- To re-seed all cassettes, delete `test/fixtures/cassettes/*.yaml` and run in `record` mode again.

0 commit comments

Comments
 (0)