You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: _drafts/2021-03-08-ios-test-multiple-configuration-test-plan.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,16 +33,27 @@ The first thing to do in order to be able to use Test Plans is enable for your s
33
33
* go in the scheme selection panel and click on `Edit schemes` while your target is selected
34
34
* go to the test phase and click on the button in the bottom right corner `Convert to use Test Plans`
35
35
36
-
[Image]test-plans-button
36
+
{% include blog-lazy-image.html description="Convert your scheme tests to Test Plan" width="1500" height="927" src="/assets/images/posts/test-plans-button.jpg" %}
37
37
38
38
After that you will see a new window where you can choose how to create your first test plan. In my case I chose to create an empty test plan and I clicked on continue.
39
39
40
-
[Image]test-plans-choose
40
+
{% include blog-lazy-image.html description="Create an empty Test Plan" width="1500" height="927" src="/assets/images/posts/test-plans-choose.jpg" %}
41
41
42
+
When I converted the `RangeUISlider` tests to use test plan I had the following tests in place:
42
43
43
-
- descrivi le varie suite di test
44
-
- descrivi qualii hanno bisogno di conf diverse
45
-
- fai vedere la creazione dei vari test plans
44
+
* a set of unit tests suite
45
+
* some UI test suites to test all the behavioural features (e.g. custom scale, step increment, SwiftUI integration etc.) You can find this test in the `MixedFeatureTest`, `InsideTableViewTests` and `SwiftUITests` test classes (see the repository link at the beginning of this post).
46
+
* some UI test suites to test the programmatic setup features (e.g. programmatic scale change, knob starting and current position). You can find this tests inside the `ProgrammaticDefaultKnobValueChangeTests`, `ProgrammaticKnobChangeTests` and `ProgrammaticScaleChangeTests` test classes.
47
+
48
+
As you can understand from the list above, these are three group of separated tests types that I want to execute indipendently based on the code piece I'm working on. So I decided to create 3 test plans. The first one is `UnitTestPlan.xctestplan`. In this test plan I added all the unit tests I had at the time in order to be able to execute them when I modify a piece of code that is related to all the collaborators that contains the logic related to the range selected or the step increment calculations. This test are executed with a single configuration. They can be executed in parallel so I checked also the option `Execute in parallel (if possible)`. I also wanted that new tests added to this suite should be added automatically to this test plan, so I checked the option `Automatically include new tests`.
49
+
50
+
{% include blog-lazy-image.html description="The unit test plan" width="1500" height="927" src="/assets/images/posts/test-plan-unit.jpg" %}
0 commit comments