xcfit 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +140 -59
- data/XCFit.podspec +1 -1
- data/XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +134 -0
- data/XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +17 -0
- data/XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +13 -0
- data/XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m +25 -0
- data/XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h +1 -0
- data/XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift +35 -0
- data/XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h +28 -0
- data/XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist +155 -0
- data/XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +12 -0
- data/XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +33 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns +0 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png +0 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png +0 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +40 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns +0 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png +0 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png +0 -0
- data/XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist +59 -0
- data/homebrew/xcfit +3 -22
- data/lib/XCFit/main.rb +0 -12
- data/lib/XCFit/version.rb +1 -1
- metadata +21 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d4d07481662168eea20e68f82474623092a4efe
|
4
|
+
data.tar.gz: 6f97bffa272f18912f77c43f819a8c67170d9579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df65408330510894af036d33ae3fbcd0958c16d9c4f214241956fba0730c05de0d1cc054b96dfe363e9b6b09c63aa8e205500dbaad63b19789ff6dd17040a46c
|
7
|
+
data.tar.gz: 3642931a4f2f939d1d1f7c191791feee03c7e39b2032f853f001cb4d456e9cf1995bc5a9afd2922bcdbe25515992979ad8aa3df8f9b22d784219548175330e49
|
data/README.md
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
|
8
8
|
**XCFit a.k.a ([XCUI](https://developer.apple.com/videos/play/wwdc2015/406/0), [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish) and [Fitnesse](https://github.com/paulstringer/OCSlimProject) Integration Tests) is a full stack Xcode BDD framework for iOS apps written in [Swift](https://swift.org). XCFit allows us to write BDD Style API/Contract level, UI and Acceptance Tests with Swift in human readable language using tools like [Cucumber](https://cucumber.io/) and [Fitnesse](http://fitnesse.org/) in Xcode. We can still use Apple's brand new UI Testing framework (XCUI) under the hood of XCFit and Cucumberish. XCFit provides automated Xcode templates to setup skeleton of BDD which are available on [Homebrew](http://brew.sh), [RubyGem](https://rubygems.org/gems/xcfit). XCFit also packaged asSwift Framework to provide pre-defined BDD Steps written in Swift. XCFit Swift framework is available on [CocoaPods](http://cocoadocs.org/docsets/XCFit), Carthage and Swift Package Manager.**
|
9
9
|
|
10
|
+
> Important Note : XCFit does not support macOS application.
|
11
|
+
|
10
12
|
### XCFit
|
11
13
|
|
12
14
|
|
@@ -31,7 +33,7 @@
|
|
31
33
|
# XCFit Features
|
32
34
|
***
|
33
35
|
- You can now write Given When Then (Gherkin), Predefined BDD Steps and Decision Table in Xcode. In Short, you can do BDD in Xcode for your iOS app.
|
34
|
-
- XCFit supports Swift so no need to use other languages like Ruby, Java, Python to write acceptance and UI tests for iOS.
|
36
|
+
- XCFit supports Swift so no need to use other languages like Ruby, Java, Python to write acceptance and UI tests for iOS.
|
35
37
|
- XCFit provides automated Xcode Target Templates for Cucumberish, Fitnesse and Page Object Pattern(XCUI) targets which reduce hectic Xcode configuration steps. It also arrange code in Xcode groups.
|
36
38
|
- XCFit will setup Xcode Templates with skeleton code and provide BDD Style Steps with Swift Framework which is available on Cocoapods, Carthage and Swift Package Manager.
|
37
39
|
|
@@ -78,16 +80,16 @@ You must have Mac Operating System with OSX/MacOS Sierra.
|
|
78
80
|
|
79
81
|
|
80
82
|
* **[Xcode 8.3](https://developer.apple.com/xcode/)**
|
81
|
-
- XCFit only Supports Xcode 8.3 and above.
|
83
|
+
- XCFit 4 only Supports Xcode 8.3 and above however XCFit 3 can be used with **Xcode 8.2**
|
82
84
|
* **[Swift 3.1](https://swift.org/download/)**
|
83
|
-
- Use Swift 3.1-dev snapshot and toolchain. Swift 3.1 is currenly in beta.
|
85
|
+
- Use Swift 3.1-dev snapshot and toolchain. Swift 3.1 is currenly in beta.XCFit 3 can be used with **Swift 3.0.2**
|
84
86
|
* **[Ruby](https://www.ruby-lang.org/en/)**
|
85
87
|
- Ruby is required to setup XCFit templates either using Homebrew or Rubygem. Use [RVM](https://rvm.io/) for GEM management. Ideally Ruby > 2.X. You can use system Ruby with sudo.
|
86
88
|
* **[Curl on Mac](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/curl.1.html)**
|
87
89
|
- Might be pre-installed but worth double checking.
|
88
90
|
* **[Homebrew](http://brew.sh)**
|
89
|
-
* **Fitnesse only Optional** : You might need to have [iOS-Sim](https://www.npmjs.com/package/ios-sim), [Java](https://www.java.com/en/) if you want to use Fitnesse.
|
90
|
-
|
91
|
+
* **Fitnesse only Optional** : You might need to have [iOS-Sim](https://www.npmjs.com/package/ios-sim), [Java](https://www.java.com/en/) if you want to use Fitnesse.
|
92
|
+
|
91
93
|
|
92
94
|
---
|
93
95
|
|
@@ -100,7 +102,7 @@ XCFit installation has two steps.
|
|
100
102
|
* **Xcode Template Installation**
|
101
103
|
|
102
104
|
|
103
|
-
This will install Xcode Templates with skeleton code to support BDD in iOS app. The templates are XCUI Page Object Templates, Cucumberish BDD Templates and OCSlim Fitnesse Templates (optional). The templates can be installed with [xcfit-RubyGem](https://rubygems.org/gems/xcfit) or [Homebrew](http://brew.sh). You need to select only one method of installtion.
|
105
|
+
This will install Xcode Templates with skeleton code to support BDD in iOS app. The templates are XCUI Page Object Templates, Cucumberish BDD Templates and OCSlim Fitnesse Templates (optional). The templates can be installed with [xcfit-RubyGem](https://rubygems.org/gems/xcfit) or [Homebrew](http://brew.sh). You need to select only one method of installtion.
|
104
106
|
|
105
107
|
* **Framework Installation**
|
106
108
|
|
@@ -126,7 +128,7 @@ This will download XCFit templates in the '~/Library/Developer/Xcode/Templates/
|
|
126
128
|
|
127
129
|
#### XCFit RubyGem Installation
|
128
130
|
|
129
|
-
If you can't use HomeBrew for some reason then XCFit can be installed using [RubyGems](https://rubygems.org/). This will set our Xcode with BDD templates for XCFit and Cucumberish
|
131
|
+
If you can't use HomeBrew for some reason then XCFit can be installed using [RubyGems](https://rubygems.org/). This will set our Xcode with BDD templates for XCFit and Cucumberish
|
130
132
|
|
131
133
|
$ gem install xcfit
|
132
134
|
|
@@ -163,16 +165,32 @@ You will see new option for iOS i.e 'XCFit'. Once Clicked on it. You will see Cu
|
|
163
165
|
|
164
166
|
## Framework Installation
|
165
167
|
|
166
|
-
XCFit, Cucumberish or OCSlimProject Framework can be installed using Cocoapods. XCFit and Cuucmberish can be installed using Carthage as well.
|
168
|
+
XCFit, Cucumberish or OCSlimProject Framework can be installed using Cocoapods. XCFit and Cuucmberish can be installed using Carthage as well.
|
167
169
|
|
168
170
|
### Cocoapods
|
171
|
+
Cocoapods is more automated than Carthage. We can create `Podfile` and add specific dependency for the target. We can install XCFit Cocoapods depending on Swift verson we are using
|
172
|
+
|
173
|
+
* **Swift 3.0.2**
|
174
|
+
|
169
175
|
Cocoapods is more automated than Carthage. We can create `Podfile` and add specific dependency for the target
|
170
176
|
|
177
|
+
```ruby
|
178
|
+
target '$_YOUR__TARGET' do
|
179
|
+
pod 'XCFit', :git => 'https://github.com/Shashikant86/XCFit.git', :tag => '3.0.0'
|
180
|
+
end
|
181
|
+
```
|
182
|
+
This will doownload Cocoapods supporting Swift 3.0.2
|
183
|
+
|
184
|
+
* **Swift 3.1**
|
185
|
+
|
186
|
+
You can doenload latest version 4.0.0 to work with Swift 3.1
|
187
|
+
|
171
188
|
```ruby
|
172
189
|
target '$_YOUR__TARGET' do
|
173
190
|
pod 'XCFit'
|
174
191
|
end
|
175
192
|
```
|
193
|
+
|
176
194
|
Same way we can get 'Cucumberish' and 'OCSlim' for the specific target.
|
177
195
|
|
178
196
|
```sh
|
@@ -181,21 +199,34 @@ $ pod install
|
|
181
199
|
|
182
200
|
You need to close the existing Xcode session and Xcode Workspace .xcworkspace next time.
|
183
201
|
|
184
|
-
### Carthage
|
202
|
+
### Carthage
|
203
|
+
|
204
|
+
XCFit and Cucumberish can be installed as Cartahge. We need to create `Cartfile` in the root of the project. Depending on which version of Swift you are using, we can use different tag
|
205
|
+
|
206
|
+
* **Swift 3.0.2**
|
207
|
+
|
208
|
+
Add the following to `Cartfile` to get Swift 3.0.2 compatable source
|
209
|
+
|
210
|
+
github "Shashikant86/XCFit" "3.0.0"
|
211
|
+
|
212
|
+
|
213
|
+
* **Swift 3.1**
|
185
214
|
|
186
|
-
|
215
|
+
You can get lates tag t work with Swift 3.1 then `Cartfile` can have following
|
187
216
|
|
188
|
-
|
189
|
-
|
190
|
-
|
217
|
+
github "Shashikant86/XCFit"
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
Now, we can fetch and build Carthage Dependencies using following command.
|
191
222
|
|
192
223
|
$ carthage update --platform iOS
|
193
|
-
|
194
|
-
This will checkout and build XCFit and Cucumberish frameworks then we can manaully drag those frameworks in the `Build Phases` of the test targets. This is explained in details in the later section.
|
195
224
|
|
196
|
-
|
225
|
+
This will checkout and build XCFit and Cucumberish frameworks then we can manaully drag those frameworks in the `Build Phases` of the test targets. This is explained in details in the later section.
|
197
226
|
|
198
|
-
|
227
|
+
### Swift Package Manager
|
228
|
+
|
229
|
+
XCFit can be installed with Swift Package Manager however Swift Package Manager isn't officially supported for iOS so we can use XCFit only for the standalone Libraries. We need to create `Package.swift` file with following content.
|
199
230
|
```
|
200
231
|
import PackageDescription
|
201
232
|
|
@@ -206,10 +237,10 @@ let package = Package(
|
|
206
237
|
]
|
207
238
|
)
|
208
239
|
```
|
209
|
-
Now we can use fetch XCFit using
|
240
|
+
Now we can use fetch XCFit using
|
241
|
+
|
242
|
+
$ swift package fetch
|
210
243
|
|
211
|
-
$ swift package fetch
|
212
|
-
|
213
244
|
We can build, test package using the commnds avavilable for the Swift Package Manager.
|
214
245
|
|
215
246
|
|
@@ -232,7 +263,7 @@ XCFit templates gives an option to use very polular [Page Object Pattern](http:/
|
|
232
263
|
|
233
264
|
- You don't have to so any setting to run those demo XCUI tests. Just CMD+U and You are good to go !
|
234
265
|
|
235
|
-
|
266
|
+
|
236
267
|
|
237
268
|
![image](https://github.com/Shashikant86/xcfitgif/blob/master/XCFitPOM_Templates.gif)
|
238
269
|
|
@@ -260,12 +291,28 @@ Testbase is group where we can abstract all setup, teardown and common stuff in
|
|
260
291
|
### Cocoapods
|
261
292
|
You can get XCFit Framework easily. Create `Podfile` and add specific dependency for the target
|
262
293
|
|
294
|
+
* **Swift 3.0.2**
|
295
|
+
|
296
|
+
Cocoapods is more automated than Carthage. We can create `Podfile` and add specific dependency for the target
|
297
|
+
|
298
|
+
```ruby
|
299
|
+
target '$_YOUR__TARGET' do
|
300
|
+
pod 'XCFit', :git => 'https://github.com/Shashikant86/XCFit.git', :tag => '3.0.0'
|
301
|
+
end
|
302
|
+
```
|
303
|
+
This will doownload Cocoapods supporting Swift 3.0.2
|
304
|
+
|
305
|
+
* **Swift 3.1**
|
306
|
+
|
307
|
+
You can doenload latest version 4.0.0 to work with Swift 3.1
|
308
|
+
|
263
309
|
```ruby
|
264
310
|
target '$_YOUR__TARGET' do
|
265
311
|
pod 'XCFit'
|
266
312
|
end
|
267
313
|
```
|
268
|
-
|
314
|
+
|
315
|
+
Now that, We need to install the framework using
|
269
316
|
|
270
317
|
```sh
|
271
318
|
$ pod install
|
@@ -278,22 +325,33 @@ Close existing Xcode Session and Open `.xcworkspace/`. Now in the 'testBase' cla
|
|
278
325
|
|
279
326
|
### Carthage
|
280
327
|
|
281
|
-
|
328
|
+
XCFit and Cucumberish can be installed as Cartahge. We need to create `Cartfile` in the root of the project. Depending on which version of Swift you are using, we can use different tag
|
329
|
+
|
330
|
+
* **Swift 3.0.2**
|
282
331
|
|
283
|
-
|
332
|
+
Add the following to `Cartfile` to get Swift 3.0.2 compatable source
|
333
|
+
|
334
|
+
github "Shashikant86/XCFit" "3.0.0"
|
335
|
+
|
336
|
+
|
337
|
+
* **Swift 3.1**
|
338
|
+
|
339
|
+
You can get lates tag t work with Swift 3.1 then `Cartfile` can have following
|
340
|
+
|
341
|
+
github "Shashikant86/XCFit" "4.0.0"
|
284
342
|
|
285
343
|
|
286
344
|
Now fetch dependency and build XCFit using.
|
287
345
|
|
288
346
|
|
289
347
|
$ carthage update --platform iOS
|
290
|
-
|
291
|
-
|
348
|
+
|
349
|
+
|
292
350
|
This will create 'Carthage' directory with built framework. We need to manually drag and drop this to our XCUIPoMTest' target build settings. On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
|
293
351
|
|
294
352
|
|
295
353
|
/usr/local/bin/carthage copy-frameworks
|
296
|
-
|
354
|
+
|
297
355
|
and add the paths to the frameworks you want to use under “Input Files”, e.g.:
|
298
356
|
|
299
357
|
|
@@ -308,7 +366,7 @@ You can choose any of the above method but Cocoapods is easy and less manual.
|
|
308
366
|
|
309
367
|
## Import XCFit & Use Predefined Steps
|
310
368
|
|
311
|
-
There are some predefined XCFit steps we can use by importing `XCFit` and extending out test base class to `XCFit`. There are plenty of Pre-Defined BDD Style Stpes available [here](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/XCFit_Predefined_Steps.md). You can use prefined steps wherever they make sense however it's fairly esasy to write your own.
|
369
|
+
There are some predefined XCFit steps we can use by importing `XCFit` and extending out test base class to `XCFit`. There are plenty of Pre-Defined BDD Style Stpes available [here](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/XCFit_Predefined_Steps.md). You can use prefined steps wherever they make sense however it's fairly esasy to write your own.
|
312
370
|
|
313
371
|
Your test will read something like this:
|
314
372
|
|
@@ -337,7 +395,7 @@ class XCFitTests: XCFit {
|
|
337
395
|
```
|
338
396
|
|
339
397
|
|
340
|
-
You will get access to lots of predefined BDD style human redable steps. It's not mandatory to use those steps unless you wish.
|
398
|
+
You will get access to lots of predefined BDD style human redable steps. It's not mandatory to use those steps unless you wish.
|
341
399
|
|
342
400
|
**Don't like Pre-defined steps, you can easily override the steps, covered in the later section [here](#advise-on-using-pre-defines-bdd-style-steps)**
|
343
401
|
|
@@ -356,7 +414,7 @@ You will get access to lots of predefined BDD style human redable steps. It's no
|
|
356
414
|
|
357
415
|
- Once Clicked on the target e.g 'Cucumberish UI Test Bundle' Xcode will create UI testing target with all the required files with Bridging header for Cucumberish UI Testing. It create Page Object Pattern with all required files with screens, steps definitions and Cucumberish initialiser swift file.
|
358
416
|
|
359
|
-
Let's see what is inside the Cucumberish templates.
|
417
|
+
Let's see what is inside the Cucumberish templates.
|
360
418
|
|
361
419
|
### What's in the Cucumberish Template ?
|
362
420
|
|
@@ -373,7 +431,7 @@ This groups has all the step definitions related to screen. Example file 'HomeSc
|
|
373
431
|
|
374
432
|
* **Common**
|
375
433
|
|
376
|
-
This group has common code like extensions and common steps. The example file 'CommonStepDefinitions.swift' has some steps that can be used in the feature file.
|
434
|
+
This group has common code like extensions and common steps. The example file 'CommonStepDefinitions.swift' has some steps that can be used in the feature file.
|
377
435
|
|
378
436
|
* **Supporting Files**
|
379
437
|
|
@@ -416,12 +474,28 @@ In order to get [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/mast
|
|
416
474
|
|
417
475
|
Create a 'Podfile' if you don't have already. In your Podfile, add following Pod entry and update/install pod
|
418
476
|
|
477
|
+
* **Swift 3.0.2**
|
478
|
+
|
479
|
+
Cocoapods is more automated than Carthage. We can create `Podfile` and add specific dependency for the target
|
480
|
+
|
419
481
|
```ruby
|
420
|
-
target '$
|
482
|
+
target '$_YOUR__TARGET' do
|
483
|
+
pod 'XCFit', :git => 'https://github.com/Shashikant86/XCFit.git', :tag => '3.0.0'
|
484
|
+
end
|
485
|
+
```
|
486
|
+
This will doownload Cocoapods supporting Swift 3.0.2
|
487
|
+
|
488
|
+
* **Swift 3.1**
|
489
|
+
|
490
|
+
You can doenload latest version 4.0.0 to work with Swift 3.1
|
491
|
+
|
492
|
+
```ruby
|
493
|
+
target '$_YOUR__TARGET' do
|
421
494
|
pod 'XCFit'
|
422
495
|
end
|
423
496
|
```
|
424
497
|
|
498
|
+
Now, we can install dependencies
|
425
499
|
|
426
500
|
```sh
|
427
501
|
$ pod install
|
@@ -435,7 +509,7 @@ and press 'CMD+U'
|
|
435
509
|
|
436
510
|
![image](https://github.com/Shashikant86/xcfitgif/blob/master/cucumberish_template.gif)
|
437
511
|
|
438
|
-
Congratulations !! You have just ran your first Cucumber BDD Scenario in the Xcode.
|
512
|
+
Congratulations !! You have just ran your first Cucumber BDD Scenario in the Xcode.
|
439
513
|
|
440
514
|
#### Create Separate Scheme if needed
|
441
515
|
|
@@ -445,7 +519,19 @@ XCFit adds 'Cucumberish' target to existing Scheme. You can remove that target a
|
|
445
519
|
|
446
520
|
Once you have setup XCFit Cucumberish templates, we need to get Cucumberish framework. In order to get [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) using Carthage, we need to create `Cartfile` with following content
|
447
521
|
|
448
|
-
|
522
|
+
* **Swift 3.0.2**
|
523
|
+
|
524
|
+
Add the following to `Cartfile` to get Swift 3.0.2 compatable source
|
525
|
+
|
526
|
+
github "Shashikant86/XCFit" "3.0.0"
|
527
|
+
|
528
|
+
|
529
|
+
* **Swift 3.1**
|
530
|
+
|
531
|
+
You can get lates tag t work with Swift 3.1 then `Cartfile` can have following
|
532
|
+
|
533
|
+
github "Shashikant86/XCFit"
|
534
|
+
|
449
535
|
|
450
536
|
Now install, Carthage frameworks using commamnd
|
451
537
|
|
@@ -462,25 +548,25 @@ Once drag and drop is don and we have "Features" directory then we are ready to
|
|
462
548
|
|
463
549
|
## Cucumberish Pre-Defined Steps
|
464
550
|
|
465
|
-
There are some pre-defined Cucumberish Steps available to use directly without any need to implement in the step definition. You can see list of steps [here](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/Cucumberish_Predefined_Steps.md). You already have those steps in the 'CommonStepDefinitions.swift' file. You can modify the steps as per your project need or add your own.
|
551
|
+
There are some pre-defined Cucumberish Steps available to use directly without any need to implement in the step definition. You can see list of steps [here](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/Cucumberish_Predefined_Steps.md). You already have those steps in the 'CommonStepDefinitions.swift' file. You can modify the steps as per your project need or add your own.
|
466
552
|
**Don't like Pre-defined steps, you can easily override the steps, covered in the later section [here](#advise-on-using-pre-defines-bdd-style-steps)**
|
467
553
|
|
468
|
-
# Advise on using Pre-Defines BDD Style Steps
|
554
|
+
# Advise on using Pre-Defines BDD Style Steps
|
469
555
|
|
470
|
-
XCFit has pre-defined steps for both XCFit Swift framework as well as Cucumberish framework.
|
556
|
+
XCFit has pre-defined steps for both XCFit Swift framework as well as Cucumberish framework.
|
471
557
|
|
472
558
|
* **[XCFit Pre-Defined BDD Style Steps](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/XCFit_Predefined_Steps.md)**
|
473
559
|
* **[Cucumberish Pre-Defined BDD Style Steps](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/Cucumberish_Predefined_Steps.md)**
|
474
560
|
|
475
561
|
It's recommended to use your own steps as predefined steps might not read well for your project needs. Pre-defined steps gives you guidance on how to implement your own step, however you can use pre-defined steps wherever they make sense to avoid duplication.
|
476
562
|
|
477
|
-
## Extending Predefined Steps.
|
563
|
+
## Extending Predefined Steps.
|
478
564
|
|
479
|
-
You can easily override pre-defined BDD Style Steps by writing Swift Extensions and Changing Common step definitions in the Cucumberish 'CommonStepDefinitions.swift' file.
|
565
|
+
You can easily override pre-defined BDD Style Steps by writing Swift Extensions and Changing Common step definitions in the Cucumberish 'CommonStepDefinitions.swift' file.
|
480
566
|
|
481
|
-
### Extending BDD Step from XCFit Framework
|
567
|
+
### Extending BDD Step from XCFit Framework
|
482
568
|
|
483
|
-
XCFit has a step **`givenILaunchedApplication()`** and you are not happy about the wordings. You can easily write and Extension and your steps like this :
|
569
|
+
XCFit has a step **`givenILaunchedApplication()`** and you are not happy about the wordings. You can easily write and Extension and your steps like this :
|
484
570
|
|
485
571
|
```
|
486
572
|
|
@@ -493,9 +579,9 @@ extension XCFit {
|
|
493
579
|
}
|
494
580
|
```
|
495
581
|
|
496
|
-
Now you can use your own **`givenMyiOSApplicationHasBeenLaunched()`** step anywhere inside the Test target.
|
582
|
+
Now you can use your own **`givenMyiOSApplicationHasBeenLaunched()`** step anywhere inside the Test target.
|
497
583
|
|
498
|
-
### Extending/Changing Cucumberish BDD Steps
|
584
|
+
### Extending/Changing Cucumberish BDD Steps
|
499
585
|
|
500
586
|
XCFit template for setting Cucumberish has the Swift code for the all [pre-defined Cucumberish BDD Steps](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/Cucumberish_Predefined_Steps.md) inside the **'CommonStepDefinitions.swift'** file. You just need to add your own steps accordingly or change the exiasting one.
|
501
587
|
|
@@ -505,18 +591,13 @@ XCFit template for setting Cucumberish has the Swift code for the all [pre-defin
|
|
505
591
|
|
506
592
|
# Fitnesse for iOS: Acceptance/Contract Tests
|
507
593
|
|
508
|
-
If you really wanted to get more information about Fitnnese for iOS, please follow documentation on [OCSlim](http://paulstringer.github.io/OCSlimProject/) project. XCFit adopted the framework as dependeny to make it full stack BDD and might not be able to keep up with that for long. It's worth navigate to [OCSlim Project](http://paulstringer.github.io/OCSlimProject/) from this point but I will cover basic setup here.
|
594
|
+
If you really wanted to get more information about Fitnnese for iOS, please follow documentation on [OCSlim](http://paulstringer.github.io/OCSlimProject/) project. XCFit adopted the framework as dependeny to make it full stack BDD and might not be able to keep up with that for long. It's worth navigate to [OCSlim Project](http://paulstringer.github.io/OCSlimProject/) from this point but I will cover basic setup here.
|
509
595
|
[Fitnesse](http://fitnesse.org/) is fully integrated standalone wiki and acceptance testing framework for BDD Style testing. As of now we have seen Cucumber and Page Object pattern test frameworks. We will cover basic setup as part of this document.
|
510
596
|
Before get started make sure, you have Fitnesse Xcode templates installed
|
511
597
|
|
512
|
-
|
513
|
-
```
|
514
|
-
$ xcfit setup_fitnesse_templates
|
515
|
-
```
|
516
|
-
|
517
598
|
## Setup 'Acceptance Test' Target template
|
518
599
|
|
519
|
-
- From Xcode, create a new app(Or use existing app) and
|
600
|
+
- From Xcode, create a new app(Or use existing app) and select File ---> New ----> Target
|
520
601
|
|
521
602
|
- Now Select 'XCFit' for iOS app and Click on 'iOS Acceptance Tests '
|
522
603
|
|
@@ -623,18 +704,18 @@ let package = Package(
|
|
623
704
|
You can clone the existing repo which has a demo app we can run Unit, Fitnesse and Cucumbertish Tests as XCTest
|
624
705
|
|
625
706
|
|
626
|
-
$ git clone https://github.com/Shashikant86/
|
627
|
-
$ cd
|
707
|
+
$ git clone https://github.com/Shashikant86/XCFit4Demo
|
708
|
+
$ cd XCFit4Demo
|
628
709
|
$ open XCFit4Demo.xcworkspace/
|
629
|
-
|
630
|
-
Run XCUI and Cucumberish test with Xcode using **'XCFit4Demo'** Scheme, press "cmd + U". You can also use "**AcceptanceUnitTests"** target/scheme and press "CMD+U" to run fitnesse tests. You can script it with `xcodebuild` or Fastlane Tools.
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
# Step by Step Video Demo
|
710
|
+
|
711
|
+
Run XCUI and Cucumberish test with Xcode using **'XCFit4Demo'** Scheme, press "cmd + U". You can also use "**AcceptanceUnitTests"** target/scheme and press "CMD+U" to run fitnesse tests. You can script it with `xcodebuild` or Fastlane Tools.
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
# Step by Step Video Demo
|
635
716
|
|
636
717
|
You can watch step by step video demo on Youtube. Click the link below
|
637
|
-
|
718
|
+
|
638
719
|
[![Alt text](https://img.youtube.com/vi/7gqPxy6UVRw/0.jpg)](https://www.youtube.com/watch?v=7gqPxy6UVRw)
|
639
720
|
|
640
721
|
# Acknowledgements
|
data/XCFit.podspec
CHANGED
Binary file
|
@@ -0,0 +1,134 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>TargetOnly</key>
|
6
|
+
<true/>
|
7
|
+
<key>Macros</key>
|
8
|
+
<dict>
|
9
|
+
<key>POD_ABBREVIATION</key>
|
10
|
+
<string>OCSP</string>
|
11
|
+
<key>POD_PLATFORM_IDENTIFIER</key>
|
12
|
+
<string>___POD_PLATFORM_IDENTIFIER___</string>
|
13
|
+
<key>POD_NAME</key>
|
14
|
+
<string>OCSlimProjectTestBundleSupport</string>
|
15
|
+
<key>PRINCIPALCLASSNAME</key>
|
16
|
+
<string>OCSPTestSuite</string>
|
17
|
+
</dict>
|
18
|
+
<key>Kind</key>
|
19
|
+
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
20
|
+
<key>Identifier</key>
|
21
|
+
<string>io.cleankit.baseAcceptanceTestsUnitTestBundle</string>
|
22
|
+
<key>Ancestors</key>
|
23
|
+
<array>
|
24
|
+
<string>com.apple.dt.unit.unitTestBundleBase</string>
|
25
|
+
</array>
|
26
|
+
<key>Targets</key>
|
27
|
+
<array>
|
28
|
+
<dict>
|
29
|
+
<key>BuildPhases</key>
|
30
|
+
<array>
|
31
|
+
<dict>
|
32
|
+
<key>Name</key>
|
33
|
+
<string>[___POD_ABBREVIATION___] Generate Fitnesse Test Bundle Resource File</string>
|
34
|
+
<key>Class</key>
|
35
|
+
<string>ShellScript</string>
|
36
|
+
<key>ShellPath</key>
|
37
|
+
<string>/bin/sh</string>
|
38
|
+
<key>ShellScript</key>
|
39
|
+
<string>FITNESSE_SUITE_NAME="___VARIABLE_fitnesseSuiteName___"
|
40
|
+
TEST_REPORT_FILE_PATH="${OCSP_TEST_REPORT_FILE_PATH}"
|
41
|
+
${OCSP_SUPPORT_FILE_DIR}/ocsp-generate-fitnesse-test-report.sh $FITNESSE_SUITE_NAME $TEST_REPORT_FILE_PATH</string>
|
42
|
+
</dict>
|
43
|
+
</array>
|
44
|
+
</dict>
|
45
|
+
</array>
|
46
|
+
<key>Options</key>
|
47
|
+
<array>
|
48
|
+
<dict>
|
49
|
+
<key>Identifier</key>
|
50
|
+
<string>languageChoice</string>
|
51
|
+
<key>Units</key>
|
52
|
+
<dict>
|
53
|
+
<key>Objective-C</key>
|
54
|
+
<dict>
|
55
|
+
<key>Definitions</key>
|
56
|
+
<dict>
|
57
|
+
<key>___PACKAGENAMEASIDENTIFIER___.m</key>
|
58
|
+
<dict>
|
59
|
+
<key>Path</key>
|
60
|
+
<string>___PACKAGENAMEASIDENTIFIER___.m</string>
|
61
|
+
</dict>
|
62
|
+
</dict>
|
63
|
+
<key>Nodes</key>
|
64
|
+
<array>
|
65
|
+
<string>___PACKAGENAMEASIDENTIFIER___.m</string>
|
66
|
+
</array>
|
67
|
+
</dict>
|
68
|
+
<key>Swift</key>
|
69
|
+
<dict>
|
70
|
+
<key>Definitions</key>
|
71
|
+
<dict>
|
72
|
+
<key>___PACKAGENAMEASIDENTIFIER___.swift</key>
|
73
|
+
<dict>
|
74
|
+
<key>Path</key>
|
75
|
+
<string>___PACKAGENAMEASIDENTIFIER___.swift</string>
|
76
|
+
</dict>
|
77
|
+
</dict>
|
78
|
+
<key>Nodes</key>
|
79
|
+
<array>
|
80
|
+
<string>___PACKAGENAMEASIDENTIFIER___.swift</string>
|
81
|
+
</array>
|
82
|
+
</dict>
|
83
|
+
</dict>
|
84
|
+
</dict>
|
85
|
+
<dict>
|
86
|
+
<key>SortOrder</key>
|
87
|
+
<integer>0</integer>
|
88
|
+
<key>EmptyReplacement</key>
|
89
|
+
<string><Required></string>
|
90
|
+
<key>Required</key>
|
91
|
+
<true/>
|
92
|
+
<key>Name</key>
|
93
|
+
<string>Fitnesse Suite Page Name:</string>
|
94
|
+
<key>Identifier</key>
|
95
|
+
<string>fitnesseSuiteName</string>
|
96
|
+
<key>Description</key>
|
97
|
+
<string>Your Fitnesse test suite's page name (e.g. FrontPage)</string>
|
98
|
+
<key>Type</key>
|
99
|
+
<string>text</string>
|
100
|
+
<key>NotPersisted</key>
|
101
|
+
<true/>
|
102
|
+
</dict>
|
103
|
+
<dict>
|
104
|
+
<key>SortOrder</key>
|
105
|
+
<integer>1</integer>
|
106
|
+
<key>Identifier</key>
|
107
|
+
<string>fitnesseURL</string>
|
108
|
+
<key>Name</key>
|
109
|
+
<string>Fitnesse Suite Test URL:</string>
|
110
|
+
<key>NotPersisted</key>
|
111
|
+
<true/>
|
112
|
+
<key>Description</key>
|
113
|
+
<string>Your fitnesse test suite URL</string>
|
114
|
+
<key>Default</key>
|
115
|
+
<string>http://localhost:8080/___VARIABLE_fitnesseSuiteName___?suite</string>
|
116
|
+
<key>Type</key>
|
117
|
+
<string>static</string>
|
118
|
+
</dict>
|
119
|
+
|
120
|
+
</array>
|
121
|
+
<key>Nodes</key>
|
122
|
+
<array>
|
123
|
+
<string>___POD_NAME___.m</string>
|
124
|
+
</array>
|
125
|
+
<key>Definitions</key>
|
126
|
+
<dict>
|
127
|
+
<key>___POD_NAME___.m</key>
|
128
|
+
<dict>
|
129
|
+
<key>Path</key>
|
130
|
+
<string>___POD_NAME___.m</string>
|
131
|
+
</dict>
|
132
|
+
</dict>
|
133
|
+
</dict>
|
134
|
+
</plist>
|
data/XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// ___FILENAME___
|
3
|
+
// ___PACKAGENAME___
|
4
|
+
//
|
5
|
+
// Created by ___FULLUSERNAME___ on ___DATE___.
|
6
|
+
//___COPYRIGHT___
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <XCTest/XCTest.h>
|
10
|
+
|
11
|
+
@interface ___FILEBASENAMEASIDENTIFIER___ : XCTestCase
|
12
|
+
|
13
|
+
@end
|
14
|
+
|
15
|
+
@implementation ___FILEBASENAMEASIDENTIFIER___
|
16
|
+
|
17
|
+
@end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
//
|
2
|
+
// ___FILENAME___
|
3
|
+
// ___POD_NAME___
|
4
|
+
//
|
5
|
+
// Created by OCSlimProject on ___DATE___.
|
6
|
+
// MIT License
|
7
|
+
// © 2016 Paul Stringer
|
8
|
+
//
|
9
|
+
//
|
10
|
+
|
11
|
+
#if __has_include(<___POD_NAME___/___PRINCIPALCLASSNAME___.h>)
|
12
|
+
#else
|
13
|
+
#pragma GCC error "Target requires pod '___POD_NAME___'. Add the entry \"pod '___POD_NAME___'\" to your Podfile configuration."
|
14
|
+
#endif
|
15
|
+
|
16
|
+
/* Copy and paste this entry to your projects Podfile and run 'pod install' or 'pod update' as necessary
|
17
|
+
|
18
|
+
target '___PACKAGENAMEASIDENTIFIER___' do
|
19
|
+
platform :___POD_PLATFORM_IDENTIFIER___
|
20
|
+
pod '___POD_NAME___'
|
21
|
+
end
|
22
|
+
|
23
|
+
https://cocoapods.org/?q=___POD_NAME___
|
24
|
+
|
25
|
+
*/
|
@@ -0,0 +1 @@
|
|
1
|
+
#import "SlimTables.h"
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import Foundation
|
2
|
+
|
3
|
+
@objc(FixtureExample)
|
4
|
+
|
5
|
+
class FixtureExample : NSObject, SlimDecisionTable {
|
6
|
+
|
7
|
+
//MARK: Inputs
|
8
|
+
|
9
|
+
var input = ""
|
10
|
+
|
11
|
+
//MARK: <SlimDecisionTable>
|
12
|
+
|
13
|
+
func execute() {
|
14
|
+
// 1. Prepare a System Under Test (SUT) using the given inputs.
|
15
|
+
// e.g. let system = MySystemUnderTestContext(input: input)
|
16
|
+
// 2. Run your SUT
|
17
|
+
// 3. Take values from the SUT and return via outputs
|
18
|
+
}
|
19
|
+
|
20
|
+
//MARK: Outputs
|
21
|
+
|
22
|
+
var output: NSString? {
|
23
|
+
get {
|
24
|
+
switch input {
|
25
|
+
case "foo":
|
26
|
+
return "bar"
|
27
|
+
case "bar":
|
28
|
+
return "baz"
|
29
|
+
default:
|
30
|
+
return nil
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
2
|
+
|
3
|
+
// Slim Decision Table
|
4
|
+
// http://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.DecisionTable
|
5
|
+
|
6
|
+
@protocol SlimDecisionTable <NSObject>
|
7
|
+
|
8
|
+
@optional
|
9
|
+
- (void)table:(NSArray*)table;
|
10
|
+
- (void)beginTable;
|
11
|
+
- (void)endTable;
|
12
|
+
- (void)reset;
|
13
|
+
@required
|
14
|
+
- (void)execute;
|
15
|
+
|
16
|
+
@end
|
17
|
+
|
18
|
+
// Slim Query Table
|
19
|
+
// http://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.QueryTable
|
20
|
+
|
21
|
+
@protocol SlimQueryTable <NSObject>
|
22
|
+
|
23
|
+
@optional
|
24
|
+
- (void)table:(NSArray*)table;
|
25
|
+
@required
|
26
|
+
- (NSArray*)query;
|
27
|
+
|
28
|
+
@end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Macros</key>
|
6
|
+
<dict>
|
7
|
+
<key>POD_ABBREVIATION</key>
|
8
|
+
<string>OCSP</string>
|
9
|
+
<key>POD_NAME</key>
|
10
|
+
<string>OCSlimProject</string>
|
11
|
+
<key>POD_PLATFORM_IDENTIFIER</key>
|
12
|
+
<string>___POD_PLATFORM_IDENTIFIER___</string>
|
13
|
+
</dict>
|
14
|
+
<key>Kind</key>
|
15
|
+
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
16
|
+
<key>Swift</key>
|
17
|
+
<dict>
|
18
|
+
<key>Nodes</key>
|
19
|
+
<array/>
|
20
|
+
<key>Definitions</key>
|
21
|
+
<dict>
|
22
|
+
<key>___PACKAGENAMEASIDENTIFIER___.swift</key>
|
23
|
+
<dict>
|
24
|
+
<key>Path</key>
|
25
|
+
<string>___PACKAGENAMEASIDENTIFIER___.swift</string>
|
26
|
+
</dict>
|
27
|
+
</dict>
|
28
|
+
</dict>
|
29
|
+
<key>Ancestors</key>
|
30
|
+
<array>
|
31
|
+
<string>com.apple.dt.unit.applicationBase</string>
|
32
|
+
</array>
|
33
|
+
<key>Identifier</key>
|
34
|
+
<string>io.cleankit.baseAcceptanceTests</string>
|
35
|
+
<key>Concrete</key>
|
36
|
+
<false/>
|
37
|
+
<key>TargetOnly</key>
|
38
|
+
<true/>
|
39
|
+
<key>Targets</key>
|
40
|
+
<array>
|
41
|
+
<dict>
|
42
|
+
<key>ProductType</key>
|
43
|
+
<string>com.apple.product-type.application</string>
|
44
|
+
<key>SharedSettings</key>
|
45
|
+
<dict>
|
46
|
+
<key>LD_RUNPATH_SEARCH_PATHS</key>
|
47
|
+
<string>$(inherited) @executable_path/../Frameworks</string>
|
48
|
+
<key>SWIFT_OBJC_BRIDGING_HEADER</key>
|
49
|
+
<string>___PACKAGENAMEASIDENTIFIER___/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h</string>
|
50
|
+
</dict>
|
51
|
+
<key>BuildPhases</key>
|
52
|
+
<array>
|
53
|
+
<dict>
|
54
|
+
<key>Name</key>
|
55
|
+
<string>[___POD_ABBREVIATION___] Generate Fitnesse Test System Scripts</string>
|
56
|
+
<key>Class</key>
|
57
|
+
<string>ShellScript</string>
|
58
|
+
<key>ShellPath</key>
|
59
|
+
<string>/bin/sh</string>
|
60
|
+
<key>ShellScript</key>
|
61
|
+
<string>${OCSP_SUPPORT_FILE_DIR}/ocsp-generate-fitnesse-test-system-scripts.sh "${OCSP_BUNDLE_RESOURCES_DIR}"</string>
|
62
|
+
</dict>
|
63
|
+
</array>
|
64
|
+
</dict>
|
65
|
+
</array>
|
66
|
+
<key>Nodes</key>
|
67
|
+
<array>
|
68
|
+
<string>___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h</string>
|
69
|
+
<string>___PACKAGENAMEASIDENTIFIER___.m</string>
|
70
|
+
<string>FixtureExample.swift</string>
|
71
|
+
<string>SlimTables.h</string>
|
72
|
+
<string>Info.plist:PackageType</string>
|
73
|
+
</array>
|
74
|
+
<key>Definitions</key>
|
75
|
+
<dict>
|
76
|
+
<key>___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h</key>
|
77
|
+
<dict>
|
78
|
+
<key>Path</key>
|
79
|
+
<string>___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h</string>
|
80
|
+
<key>Group</key>
|
81
|
+
<string>Supporting Files</string>
|
82
|
+
<key>SortOrder</key>
|
83
|
+
<integer>100</integer>
|
84
|
+
</dict>
|
85
|
+
<key>___PACKAGENAMEASIDENTIFIER___.m</key>
|
86
|
+
<dict>
|
87
|
+
<key>Path</key>
|
88
|
+
<string>___PACKAGENAMEASIDENTIFIER___.m</string>
|
89
|
+
<key>Group</key>
|
90
|
+
<string>Supporting Files</string>
|
91
|
+
</dict>
|
92
|
+
<key>FixtureExample.swift</key>
|
93
|
+
<dict>
|
94
|
+
<key>Path</key>
|
95
|
+
<string>FixtureExample.swift</string>
|
96
|
+
<key>Group</key>
|
97
|
+
<string>Fixtures</string>
|
98
|
+
</dict>
|
99
|
+
<key>SlimTables.h</key>
|
100
|
+
<dict>
|
101
|
+
<key>Path</key>
|
102
|
+
<string>SlimTables.h</string>
|
103
|
+
<key>Group</key>
|
104
|
+
<string>Supporting Files</string>
|
105
|
+
</dict>
|
106
|
+
<key>Info.plist:PackageType</key>
|
107
|
+
<string><key>CFBundlePackageType</key>
|
108
|
+
<string>APPL</string>
|
109
|
+
</string>
|
110
|
+
</dict>
|
111
|
+
<key>Options</key>
|
112
|
+
<array>
|
113
|
+
<dict>
|
114
|
+
<key>Identifier</key>
|
115
|
+
<string>languageChoice</string>
|
116
|
+
<key>Units</key>
|
117
|
+
<dict>
|
118
|
+
<key>Swift</key>
|
119
|
+
<dict>
|
120
|
+
<key>Project</key>
|
121
|
+
<dict>
|
122
|
+
<key>Configurations</key>
|
123
|
+
<dict>
|
124
|
+
<key>Debug</key>
|
125
|
+
<dict>
|
126
|
+
<key>SWIFT_OPTIMIZATION_LEVEL</key>
|
127
|
+
<string>-Onone</string>
|
128
|
+
<key>SWIFT_ACTIVE_COMPILATION_CONDITIONS</key>
|
129
|
+
<string>DEBUG</string>
|
130
|
+
</dict>
|
131
|
+
<key>Release</key>
|
132
|
+
<dict>
|
133
|
+
<key>SWIFT_OPTIMIZATION_LEVEL</key>
|
134
|
+
<string>-Owholemodule</string>
|
135
|
+
</dict>
|
136
|
+
</dict>
|
137
|
+
</dict>
|
138
|
+
<key>Targets</key>
|
139
|
+
<array>
|
140
|
+
<dict>
|
141
|
+
<key>Concrete</key>
|
142
|
+
<false/>
|
143
|
+
<key>SharedSettings</key>
|
144
|
+
<dict>
|
145
|
+
<key>SWIFT_VERSION</key>
|
146
|
+
<string>3.0</string>
|
147
|
+
</dict>
|
148
|
+
</dict>
|
149
|
+
</array>
|
150
|
+
</dict>
|
151
|
+
</dict>
|
152
|
+
</dict>
|
153
|
+
</array>
|
154
|
+
</dict>
|
155
|
+
</plist>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
//
|
2
|
+
// ___FILENAME___
|
3
|
+
// ___POD_NAME___
|
4
|
+
//
|
5
|
+
// Created by OCSlimProject on ___DATE___.
|
6
|
+
// MIT License
|
7
|
+
// © 2016 Paul Stringer
|
8
|
+
//
|
9
|
+
|
10
|
+
|
11
|
+
#import <Foundation/Foundation.h>
|
12
|
+
|
13
|
+
#if __has_include(<___POD_NAME___/___POD_NAME___.h>)
|
14
|
+
#else
|
15
|
+
#pragma GCC error "Target requires pod '___POD_NAME___'. Add the entry \"pod '___POD_NAME___'\" to your Podfile configuration."
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/* Copy and paste this entry to your projects Podfile and run 'pod install' or 'pod update' as necessary
|
19
|
+
|
20
|
+
target '___PACKAGENAMEASIDENTIFIER___' do
|
21
|
+
platform :___POD_PLATFORM_IDENTIFIER___
|
22
|
+
pod '___POD_NAME___'
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
https://cocoapods.org/?q=___POD_NAME___
|
27
|
+
|
28
|
+
*/
|
29
|
+
|
30
|
+
@interface ___PACKAGENAMEASIDENTIFIER___ : NSObject
|
31
|
+
@end
|
32
|
+
@implementation ___PACKAGENAMEASIDENTIFIER___
|
33
|
+
@end
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Macros</key>
|
6
|
+
<dict>
|
7
|
+
<key>POD_PLATFORM_IDENTIFIER</key>
|
8
|
+
<string>ios, 9.0</string>
|
9
|
+
</dict>
|
10
|
+
<key>Kind</key>
|
11
|
+
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
12
|
+
<key>Identifier</key>
|
13
|
+
<string>io.cleankit.iOSAcceptanceTestsUnitTestBundle</string>
|
14
|
+
<key>Name</key>
|
15
|
+
<string>Acceptance Unit Test Bundle</string>
|
16
|
+
<key>Description</key>
|
17
|
+
<string>This target builds an iOS unit test bundle that generates results from your Acceptance Tests target using Fitnesse and then reports them within Xcode using the XCTest framework.</string>
|
18
|
+
<key>Concrete</key>
|
19
|
+
<true/>
|
20
|
+
<key>Platforms</key>
|
21
|
+
<array>
|
22
|
+
<string>com.apple.platform.iphoneos</string>
|
23
|
+
</array>
|
24
|
+
<key>Ancestors</key>
|
25
|
+
<array>
|
26
|
+
<string>com.apple.dt.unit.iosBase</string>
|
27
|
+
<string>io.cleankit.baseAcceptanceTestsUnitTestBundle</string>
|
28
|
+
</array>
|
29
|
+
<key>Targets</key>
|
30
|
+
<array>
|
31
|
+
<dict>
|
32
|
+
<key>SharedSettings</key>
|
33
|
+
<dict>
|
34
|
+
<key>LD_RUNPATH_SEARCH_PATHS</key>
|
35
|
+
<string>$(inherited) @executable_path/Frameworks @loader_path/Frameworks</string>
|
36
|
+
</dict>
|
37
|
+
</dict>
|
38
|
+
</array>
|
39
|
+
</dict>
|
40
|
+
</plist>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Macros</key>
|
6
|
+
<dict>
|
7
|
+
<key>POD_PLATFORM_IDENTIFIER</key>
|
8
|
+
<string>ios</string>
|
9
|
+
</dict>
|
10
|
+
<key>Name</key>
|
11
|
+
<string>iOS Acceptance Tests</string>
|
12
|
+
<key>Kind</key>
|
13
|
+
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
|
14
|
+
<key>Identifier</key>
|
15
|
+
<string>io.cleankit.iosAcceptanceTests</string>
|
16
|
+
<key>Description</key>
|
17
|
+
<string>This target builds an iOS Application for Acceptance Testing your App using the Fitnesse framework. Requires a project that uses CocoaPods.</string>
|
18
|
+
<key>Ancestors</key>
|
19
|
+
<array>
|
20
|
+
<string>io.cleankit.baseAcceptanceTests</string>
|
21
|
+
<string>com.apple.dt.unit.iosBase</string>
|
22
|
+
</array>
|
23
|
+
<key>Concrete</key>
|
24
|
+
<true/>
|
25
|
+
<key>Targets</key>
|
26
|
+
<array>
|
27
|
+
<dict>
|
28
|
+
<key>SharedSettings</key>
|
29
|
+
<dict>
|
30
|
+
<key>LD_RUNPATH_SEARCH_PATHS</key>
|
31
|
+
<string>$(inherited) @executable_path/Frameworks</string>
|
32
|
+
</dict>
|
33
|
+
</dict>
|
34
|
+
</array>
|
35
|
+
<key>Nodes</key>
|
36
|
+
<array>
|
37
|
+
<string>Info.plist:iPhone</string>
|
38
|
+
<string>Info.plist:UIRequiredDeviceCapabilities:base</string>
|
39
|
+
</array>
|
40
|
+
<key>Definitions</key>
|
41
|
+
<dict>
|
42
|
+
<key>Info.plist:iPhone</key>
|
43
|
+
<string><key>LSRequiresIPhoneOS</key>
|
44
|
+
<true/></string>
|
45
|
+
<key>Info.plist:UIRequiredDeviceCapabilities</key>
|
46
|
+
<dict>
|
47
|
+
<key>Beginning</key>
|
48
|
+
<string><key>UIRequiredDeviceCapabilities</key>
|
49
|
+
<array></string>
|
50
|
+
<key>End</key>
|
51
|
+
<string></array></string>
|
52
|
+
<key>Indent</key>
|
53
|
+
<integer>1</integer>
|
54
|
+
</dict>
|
55
|
+
<key>Info.plist:UIRequiredDeviceCapabilities:base</key>
|
56
|
+
<string><string>armv7</string></string>
|
57
|
+
</dict>
|
58
|
+
</dict>
|
59
|
+
</plist>
|
data/homebrew/xcfit
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'fileutils'
|
4
4
|
require 'tempfile'
|
5
5
|
|
6
|
-
VERSION = "4.0.
|
6
|
+
VERSION = "4.0.1"
|
7
7
|
|
8
8
|
@root_dir = File.expand_path('~')
|
9
9
|
@root_lib_dir = File.join(@root_dir, 'Library')
|
@@ -53,18 +53,6 @@ def setup_xcode_templates
|
|
53
53
|
puts " ***************** Enjoy XCFit *****************"
|
54
54
|
end
|
55
55
|
|
56
|
-
def setup_fitnesse_templates
|
57
|
-
puts "==================XXXXXXXX==========================="
|
58
|
-
puts 'Downloading Fitnesse Templates'
|
59
|
-
puts "==================XXXXXXXX==========================="
|
60
|
-
system("cd /tmp && curl -sL https://github.com/Shashikant86/OCSlimProjectXcodeTemplates/archive/2.0.0.tar.gz| tar xz")
|
61
|
-
system("cd /tmp/OCSlimProjectXcodeTemplates-2.0.0/ && make")
|
62
|
-
puts "==================XXXXXXXX==========================="
|
63
|
-
puts "=======Created Xcode Templates for the Fitnesse ===="
|
64
|
-
puts "==================XXXXXXXX==========================="
|
65
|
-
end
|
66
|
-
|
67
|
-
|
68
56
|
def print_usage
|
69
57
|
puts <<EOF
|
70
58
|
|
@@ -72,9 +60,7 @@ def print_usage
|
|
72
60
|
|
73
61
|
<command-name> can be one of
|
74
62
|
setup_xcode_templates
|
75
|
-
generate a Xcode 8 Templates for the XCUI and Cucumberish
|
76
|
-
setup_fitnesse_templates
|
77
|
-
generate a Xcode 8 Templates for Fitnesse
|
63
|
+
generate a Xcode 8 Templates for the XCUI, Fitnesse and Cucumberish
|
78
64
|
version
|
79
65
|
prints the XCFit version
|
80
66
|
help
|
@@ -94,15 +80,12 @@ def print_help
|
|
94
80
|
<command-name> can be one of
|
95
81
|
help
|
96
82
|
setup_xcode_templates
|
97
|
-
setup_fitnesse_templates
|
98
83
|
version
|
99
84
|
|
100
85
|
Commands:
|
101
86
|
help : prints more detailed help information.
|
102
87
|
|
103
|
-
setup_xcode_templates : Generate a Xcode Target and File Templates for the XCUI and Cucumberish
|
104
|
-
|
105
|
-
setup_fitnesse_templates : Generate Xcode templates for the Fitnesse
|
88
|
+
setup_xcode_templates : Generate a Xcode Target and File Templates for the XCUI, Fitnesse and Cucumberish
|
106
89
|
|
107
90
|
version : prints the XCFit version
|
108
91
|
|
@@ -119,8 +102,6 @@ else
|
|
119
102
|
print_help
|
120
103
|
elsif cmd == 'setup_xcode_templates'
|
121
104
|
setup_xcode_templates
|
122
|
-
elsif cmd == 'setup_fitnesse_templates'
|
123
|
-
setup_fitnesse_templates
|
124
105
|
elsif cmd == 'version'
|
125
106
|
puts "#{VERSION}"
|
126
107
|
else
|
data/lib/XCFit/main.rb
CHANGED
@@ -47,18 +47,6 @@ module XCFit
|
|
47
47
|
puts 'File -> New -->Target-->XCFit'
|
48
48
|
puts 'You wont need to restart Xcode but do so if nesessary!'
|
49
49
|
puts " ***************** Enjoy XCFit *****************"
|
50
|
-
end
|
51
|
-
|
52
|
-
desc 'setup_fitnesse_templates', 'Downloads Fitnesse Xcode Templates from OCSlim'
|
53
|
-
def setup_fitnesse_templates
|
54
|
-
puts "==================XXXXXXXX==========================="
|
55
|
-
puts 'Downloading Fitnesse Templates'
|
56
|
-
puts "==================XXXXXXXX==========================="
|
57
|
-
system("cd /tmp && curl -sL https://github.com/Shashikant86/OCSlimProjectXcodeTemplates/archive/2.0.0.tar.gz| tar xz")
|
58
|
-
system("cd /tmp/OCSlimProjectXcodeTemplates-2.0.0/ && make")
|
59
|
-
puts "==================XXXXXXXX==========================="
|
60
|
-
puts "=======Created Xcode Templates for the Fitnesse ===="
|
61
|
-
puts "==================XXXXXXXX==========================="
|
62
50
|
end
|
63
51
|
end
|
64
52
|
end
|
data/lib/XCFit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcfit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shashikant86
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -78,6 +78,17 @@ files:
|
|
78
78
|
- Rakefile
|
79
79
|
- XCFit.gemspec
|
80
80
|
- XCFit.podspec
|
81
|
+
- XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns
|
82
|
+
- XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist
|
83
|
+
- XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m
|
84
|
+
- XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift
|
85
|
+
- XCFit_Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m
|
86
|
+
- XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h
|
87
|
+
- XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift
|
88
|
+
- XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h
|
89
|
+
- XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist
|
90
|
+
- XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h
|
91
|
+
- XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m
|
81
92
|
- XCFit_Templates/XCFit/Cucumber Feature.xctemplate/TemplateIcon.png
|
82
93
|
- XCFit_Templates/XCFit/Cucumber Feature.xctemplate/TemplateIcon@2x.png
|
83
94
|
- XCFit_Templates/XCFit/Cucumber Feature.xctemplate/TemplateInfo.plist
|
@@ -99,6 +110,14 @@ files:
|
|
99
110
|
- XCFit_Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon@2x.png
|
100
111
|
- XCFit_Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateInfo.plist
|
101
112
|
- XCFit_Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___TestBase.swift
|
113
|
+
- XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns
|
114
|
+
- XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png
|
115
|
+
- XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png
|
116
|
+
- XCFit_Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist
|
117
|
+
- XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns
|
118
|
+
- XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png
|
119
|
+
- XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png
|
120
|
+
- XCFit_Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist
|
102
121
|
- XCFit_Templates/XCFit/iOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist
|
103
122
|
- XCFit_Templates/XCFit/iOS XCUI POM Test Bundle.xctemplate/TemplateInfo.plist
|
104
123
|
- bin/xcfit
|