Skip to content

Commit dab4904

Browse files
committed
experimenting with test plans
1 parent 439a04b commit dab4904

File tree

7 files changed

+81
-11
lines changed

7 files changed

+81
-11
lines changed

bk1ch09p358universal/bk1ch09p358universal/ViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ class ViewController: UIViewController {
2121
let device = self.traitCollection.userInterfaceIdiom == .pad ? "iPad" : "iPhone"
2222
print(device)
2323

24+
let r = self.view.frame
25+
2426
var d = Dog()
2527
var dd = d // breakpoint here and hover over d
2628
print(dd)
29+
print(r)
2730

2831

2932
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"configurations" : [
3+
{
4+
"name" : "EmptyWindowConfig",
5+
"options" : {
6+
7+
}
8+
}
9+
],
10+
"defaultOptions" : {
11+
"codeCoverage" : false,
12+
"commandLineArgumentEntries" : [
13+
14+
]
15+
},
16+
"testTargets" : [
17+
{
18+
"target" : {
19+
"containerPath" : "container:bk1ch09p380unitTesting.xcodeproj",
20+
"identifier" : "814A1AA11D109B13008F3FF6",
21+
"name" : "EmptyWindowUITests"
22+
}
23+
},
24+
{
25+
"target" : {
26+
"containerPath" : "container:bk1ch09p380unitTesting.xcodeproj",
27+
"identifier" : "814A1AAF1D109C1F008F3FF6",
28+
"name" : "EmptyWindowTests"
29+
}
30+
}
31+
],
32+
"version" : 1
33+
}

bk1ch09p380unitTesting/EmptyWindowUITests/EmptyWindowUITests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ class EmptyWindowUITests: XCTestCase {
2626
app.buttons["Howdy"].tap()
2727
app.alerts["Howdy!"].buttons["OK"].tap()
2828

29-
30-
31-
32-
3329
}
3430

3531
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"configurations" : [
3+
{
4+
"name" : "TestPlanConfig",
5+
"options" : {
6+
7+
}
8+
}
9+
],
10+
"defaultOptions" : {
11+
12+
},
13+
"testTargets" : [
14+
{
15+
"target" : {
16+
"containerPath" : "container:bk1ch09p380unitTesting.xcodeproj",
17+
"identifier" : "814A1AAF1D109C1F008F3FF6",
18+
"name" : "EmptyWindowTests"
19+
}
20+
},
21+
{
22+
"skippedTests" : [
23+
"EmptyWindowUITests"
24+
],
25+
"target" : {
26+
"containerPath" : "container:bk1ch09p380unitTesting.xcodeproj",
27+
"identifier" : "814A1AA11D109B13008F3FF6",
28+
"name" : "EmptyWindowUITests"
29+
}
30+
}
31+
],
32+
"version" : 1
33+
}

bk1ch09p380unitTesting/bk1ch09p380unitTesting.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
814A1AB01D109C1F008F3FF6 /* EmptyWindowTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EmptyWindowTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4848
814A1AB21D109C1F008F3FF6 /* EmptyWindowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyWindowTests.swift; sourceTree = "<group>"; };
4949
814A1AB41D109C1F008F3FF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50+
8185E5BE22D0EED2004AD7E2 /* TestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan.xctestplan; sourceTree = "<group>"; };
51+
8185E5BF22D0EFD2004AD7E2 /* EmptyWindow.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = EmptyWindow.xctestplan; sourceTree = "<group>"; };
5052
/* End PBXFileReference section */
5153

5254
/* Begin PBXFrameworksBuildPhase section */
@@ -77,6 +79,8 @@
7779
32080BE71AFE632800DB7A17 = {
7880
isa = PBXGroup;
7981
children = (
82+
8185E5BE22D0EED2004AD7E2 /* TestPlan.xctestplan */,
83+
8185E5BF22D0EFD2004AD7E2 /* EmptyWindow.xctestplan */,
8084
32080BF21AFE632800DB7A17 /* bk1ch09p380unitTesting */,
8185
814A1AA31D109B13008F3FF6 /* EmptyWindowUITests */,
8286
814A1AB11D109C1F008F3FF6 /* EmptyWindowTests */,

bk1ch09p380unitTesting/bk1ch09p380unitTesting/Base.lproj/Main.storyboard

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14269.14" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
3-
<device id="retina4_7" orientation="portrait">
4-
<adaptation id="fullscreen"/>
5-
</device>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14835.7" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
3+
<device id="retina4_7" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14252.5"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14790.5"/>
97
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
108
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
119
</dependencies>
@@ -18,7 +16,7 @@
1816
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1917
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2018
<subviews>
21-
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KSR-PR-fGd">
19+
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KSR-PR-fGd">
2220
<rect key="frame" x="44" y="45" width="61" height="30"/>
2321
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2422
<state key="normal" title="Howdy"/>

bk1ch09p380unitTesting/bk1ch09p380unitTesting/ViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class ViewController: UIViewController {
1717
self.present(alert, animated: true)
1818
}
1919

20-
20+
override func viewDidAppear(_ animated: Bool) {
21+
super.viewDidAppear(animated)
22+
}
23+
2124
}
2225

0 commit comments

Comments
 (0)