Update TestPlan.xctestplan + tests + docs
Summary: - Tests: TestPlan.xctestplan - Docs: Testing Stats: - 2 files changed, 41 insertions(+)
This commit is contained in:
parent
4a361dd421
commit
16475c69c7
@ -31,3 +31,20 @@ Run all tests from the package root:
|
|||||||
```bash
|
```bash
|
||||||
swift test
|
swift test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Xcode Test Plans
|
||||||
|
For granular control (enabling/disabling specific tests or trying different configurations), use **Xcode Test Plans**:
|
||||||
|
|
||||||
|
1. **Create a Test Plan**:
|
||||||
|
- Go to **Product > Test Plan > New Test Plan...**
|
||||||
|
- Save it in your `Tests/` directory as `LocalData.xctestplan`.
|
||||||
|
2. **Configure Tests**:
|
||||||
|
- Open the `.xctestplan` file.
|
||||||
|
- You will see a list of all test targets, classes, and individual test methods.
|
||||||
|
- Use the **check/uncheck** boxes to include or exclude specific tests.
|
||||||
|
3. **Run the Plan**:
|
||||||
|
- Hold down the **Play** button for the test action or go to **Product > Test > [Plan Name]**.
|
||||||
|
- You can also run it via terminal: `xcodebuild test -plan LocalData`.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Test plans are excellent for CI/CD environments where you might want to run a "Smoke Test" plan (subset of tests) or a "Full Integration" plan.
|
||||||
|
|||||||
24
Tests/TestPlan.xctestplan
Normal file
24
Tests/TestPlan.xctestplan
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"configurations" : [
|
||||||
|
{
|
||||||
|
"id" : "D2951487-F388-4A07-A1E8-3A4B179619B9",
|
||||||
|
"name" : "Configuration 1",
|
||||||
|
"options" : {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"defaultOptions" : {
|
||||||
|
"testTimeoutsEnabled" : true
|
||||||
|
},
|
||||||
|
"testTargets" : [
|
||||||
|
{
|
||||||
|
"target" : {
|
||||||
|
"containerPath" : "container:",
|
||||||
|
"identifier" : "LocalDataTests",
|
||||||
|
"name" : "LocalDataTests"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user