Skip to content

Commit 2656033

Browse files
authored
Update integration testing docs (#5490)
Prefer the emulator by default but give alternate instructions for prod.
1 parent 7c3744b commit 2656033

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

Firestore/README.md

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,30 @@ command script import ~/path/to/firebase-ios-sdk/scripts/lldb/firestore.py
2323
2424
### Running Integration Tests
2525
26+
Prefer running the integration tests against the Firestore Emulator. This is
27+
much faster than running against production and does not require you to
28+
configure a Firestore-enabled project.
29+
30+
* In a new terminal, run `scripts/run_firestore_emulator.sh` and leave it running.
31+
* In Xcode select the `Firestore_IntegrationTests_iOS` scheme (or macOS or tvOS).
32+
* ⌘-u to build and run the integration tests.
33+
34+
### Running Integration Tests - against production
35+
36+
Occasionally it's useful to run integration tests against a production account.
37+
38+
2639
* [Set up a `GoogleServices-Info.plist`](//github.com/firebase/firebase-ios-sdk#running-sample-apps)
2740
file in `Firestore/Example/App`.
41+
* Ensure your Firestore database has open rules (the integration tests do not
42+
authenticate).
2843
* In Xcode select the Firestore_IntegrationTests_iOS scheme
2944
* ⌘-u to build and run the integration tests
3045
31-
### Running Integration Tests - using the Firestore Emulator
32-
33-
Note: this does not give full coverage, but is much faster than above.
34-
b/hotlists/1578399 tracks outstanding issues.
46+
If you want to switch back to running integration tests against the emulator:
3547
36-
* Ensure that `GoogleServices-Info.plist` is back in its default state (`git
48+
* Ensure that `GoogleServices-Info.plist` is in its default state (`git
3749
checkout Firestore/Example/App/GoogleServices-Info.plist`).
38-
* [Install the Firebase CLI](https://firebase.google.com/docs/cli/).
39-
Essentially:
40-
```
41-
npm install -g firebase-tools
42-
```
43-
* [Install the Firestore
44-
emulator](https://firebase.google.com/docs/firestore/security/test-rules-emulator#install_the_emulator).
45-
Essentially:
46-
```
47-
firebase setup:emulators:firestore
48-
```
49-
* Run the emulator
50-
```
51-
firebase serve --only firestore
52-
```
53-
* In Xcode select the Firestore_IntegrationTests_iOS scheme
54-
* ⌘-u to build and run the integration tests
5550
5651
### Building Protos
5752

0 commit comments

Comments
 (0)