Skip to content

Commit 1efb7a0

Browse files
authored
Merge pull request #3668 from SwiftPackageIndex/local-dev-test-plan
Update the local development guide to explain how to disable test parallelization
2 parents fe62dbe + 5a44915 commit 1efb7a0

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
54.5 KB
Loading
182 KB
Loading

LOCAL_DEVELOPMENT_SETUP.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ Close the scheme editor and run the application by selecting "Run" from the Xcod
3838
[ NOTICE ] Server starting on http://127.0.0.1:8080 [component: server]
3939
```
4040

41+
When Xcode opens the `Package.swift` file, it will auto-create a test plan based on all tests in the project. This works for most cases, but we need to tell Xcode to run our tests sequentially, not in parallel. The first thing to do is to persist the autocreated test plan. From the Product menu, select "Test Plan" then "Manage Test Plans...", then click the small arrow button:
42+
43+
![A screenshot of Xcode's scheme editor showing a small arrow next to 'SPI-Server-Package (Autocreated)'.](.readme-images/manage-test-plans.png)
44+
45+
Once you open the autocreated test plan, you will be asked if you would like to persist the test plan. Click "Save" and accept the default location in the `.swiftpm` directory. Then, for each item in the test plan, click the "Options" and select "Disabled" for the "Paralellization" setting.
46+
47+
![A screenshot of Xcode's test plan editor showing the parallelization options.](.readme-images/test-plan-options.png)
48+
4149
When working locally, it's helpful to have a database with pre-populated data from the live system. [Talk to us on Discord](https://discord.gg/vQRb6KkYRw), and we'll supply you with a recent database dump that you can load with `./scripts/load-db.sh`.
4250

4351
### Setup the Front End
@@ -310,4 +318,4 @@ psql 'postgres://[email protected]:5432/spi_test' -c 'select count(*
310318
psql 'postgres://[email protected]:6432/spi_dev' -c 'select count(*) from packages;'
311319
```
312320

313-
##
321+
##

0 commit comments

Comments
 (0)