xcfit 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.swift-version +1 -0
- data/.travis.yml +13 -13
- data/README.md +57 -35
- data/XCFit.podspec +6 -16
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +14 -12
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +16 -15
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +11 -11
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +5 -5
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +9 -8
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +7 -6
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +7 -5
- data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +10 -8
- data/homebrew/xcfit +155 -0
- data/lib/XCFit/version.rb +1 -1
- metadata +15 -177
- data/XCFit/Classes/.gitkeep +0 -0
- data/XCFit/Classes/CliSwift.swift +0 -87
- data/XCFit/Classes/CopyDir.swift +0 -26
- data/XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h +0 -400
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.h +0 -72
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.m +0 -141
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.h +0 -51
- data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.m +0 -245
- data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.h +0 -62
- data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.m +0 -117
- data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.h +0 -37
- data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.m +0 -37
- data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.h +0 -46
- data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.m +0 -117
- data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.h +0 -89
- data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.m +0 -128
- data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.h +0 -49
- data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.m +0 -174
- data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.h +0 -36
- data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.m +0 -34
- data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.h +0 -61
- data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.m +0 -91
- data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.h +0 -97
- data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.m +0 -224
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.h +0 -85
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.m +0 -98
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.h +0 -43
- data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.m +0 -65
- data/XCFit/Classes/Cucumberish/Cucumberish.h +0 -133
- data/XCFit/Classes/Cucumberish/Cucumberish.m +0 -604
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.h +0 -15
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.m +0 -312
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.h +0 -20
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.m +0 -79
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.h +0 -11
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.m +0 -27
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.m +0 -30
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.m +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.h +0 -24
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.m +0 -49
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.h +0 -24
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.m +0 -50
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.h +0 -25
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.m +0 -64
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.m +0 -124
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProviderProtocol.h +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.m +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.h +0 -17
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.m +0 -179
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineProtocol.h +0 -64
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.h +0 -9
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.m +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasDescriptionProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasLocationProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasRowsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasStepsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasTagsProtocol.h +0 -8
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.m +0 -41
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.h +0 -4
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.m +0 -5
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.h +0 -10
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.h +0 -132
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.m +0 -2735
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.h +0 -55
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.m +0 -192
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.h +0 -14
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.m +0 -18
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.h +0 -23
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.m +0 -41
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition_Private.h +0 -6
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.h +0 -15
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.m +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.h +0 -16
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.m +0 -35
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.h +0 -4
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.m +0 -5
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.m +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.h +0 -13
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.h +0 -26
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.m +0 -50
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.h +0 -29
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.m +0 -283
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.h +0 -12
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.m +0 -59
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.h +0 -7
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.m +0 -28
- data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/gherkin-languages.json +0 -2969
- data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.h +0 -24
- data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.m +0 -44
- data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.h +0 -7
- data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.m +0 -83
- data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.h +0 -32
- data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.m +0 -70
- data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
- data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
- data/XCFit_Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -134
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -17
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -13
- data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m +0 -25
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h +0 -1
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift +0 -35
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h +0 -28
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist +0 -155
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -12
- data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -33
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +0 -41
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +0 -92
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +0 -58
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +0 -28
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +0 -26
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateInfo.plist +0 -159
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -15
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.h +0 -23
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -28
- data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -37
- data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
- data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
- data/Xcode7-Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/BaseScreen.swift +0 -42
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/Extensions.swift +0 -60
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeElements.swift +0 -31
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeProtocol.swift +0 -25
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreenTest.swift +0 -30
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/ProtocolOrientedTest.swift +0 -45
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateInfo.plist +0 -141
- data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___TestBase.swift +0 -30
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png +0 -0
- data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist +0 -59
- data/Xcode7-Templates/XCFit/iOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
- data/Xcode7-Templates/XCFit/iOS XCUI POM Test Bundle.xctemplate/TemplateInfo.plist +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc00680c334473032feb71cdbc14b2749c3da605
|
4
|
+
data.tar.gz: d1ab5d98d96d66e6d714916ccc780ab7bd43205b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51d8eab780e0957315857f5991bef39173d0e3e4c543cdad9118dd1fa49605b4a87aa1b21aab7f6134a09bbc65b83bcc243caf5766ddb41efbc5f0576421ec2d
|
7
|
+
data.tar.gz: 48e04d9dc47e75ec9d2ba339f56d39fa019ac0e23435667e73e095fd407f1a5ebd9848d6efeb2eb44573a95635f5f1388888ff2fa73a6fd7fb1debc7f7b02339
|
data/.swift-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1-dev
|
data/.travis.yml
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# * http://www.objc.io/issue-6/travis-ci.html
|
3
3
|
# * https://github.com/supermarin/xcpretty#usage
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
script:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
5
|
+
os:
|
6
|
+
- osx
|
7
|
+
language: generic
|
8
|
+
sudo: required
|
9
|
+
dist: trusty
|
10
|
+
osx_image: xcode8
|
11
|
+
# script:
|
12
|
+
# - swift build
|
13
|
+
# - swift test
|
14
|
+
# notifications:
|
15
|
+
# email:
|
16
|
+
# on_success: never
|
17
|
+
# on_failure: change
|
data/README.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
|
6
6
|
# XCFit : Full Stack BDD in Xcode
|
7
7
|
|
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) Integrations Tests) is a full stack Xcode BDD framework for [Swift](https://swift.org) iOS and macOS apps. XCFit allows us to write API 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 Cucumberish. XCFit is fully automated solution for Cucumberish and Fitnesse. You can use 80(Fitnesse):20(Cucumberish) formula to automate Acceptance and UI Testing for better coverage and faster feedback. XCFit is available on [RubyGem](https://rubygems.org/gems/xcfit), [CocoaPods](http://cocoadocs.org/docsets/XCFit) and Swift Package Manager.**
|
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) Integrations Tests) is a full stack Xcode BDD framework for [Swift](https://swift.org) iOS and macOS apps. XCFit allows us to write API 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 Cucumberish. XCFit is fully automated solution for Cucumberish and Fitnesse. You can use 80(Fitnesse):20(Cucumberish) formula to automate Acceptance and UI Testing for better coverage and faster feedback. XCFit is available on [Homebrew](http://brew.sh), [RubyGem](https://rubygems.org/gems/xcfit), [CocoaPods](http://cocoadocs.org/docsets/XCFit) and Swift Package Manager.**
|
9
9
|
|
10
|
-
### XCFit 2.0 has just released !
|
10
|
+
### XCFit 2.0 has just released !
|
11
11
|
|
12
12
|
![image](https://github.com/Shashikant86/XCFit-GIFS/blob/master/XCFit2Release.png)
|
13
13
|
|
@@ -52,10 +52,13 @@
|
|
52
52
|
|
53
53
|
* **CocoaPods** -- [XCFit-CocoaPods](http://cocoadocs.org/docsets/XCFit) : BDD Style scenarios for iOS App
|
54
54
|
|
55
|
+
* **Homebrew** - Just do `brew tap shashikant86/homebrew-taps` and `brew install xcfit`
|
56
|
+
|
55
57
|
* **RubyGems** -- [xcfit-RubyGem](https://rubygems.org/gems/xcfit) : Automated Xcode Templates
|
56
58
|
|
57
59
|
* **Swift Package Manager** : 2.0.0 : XCUI Test Framework Helpers
|
58
60
|
|
61
|
+
|
59
62
|
# Tech & Software Requirements
|
60
63
|
|
61
64
|
XCFit uses a number of open source projects to work properly. You need to have following
|
@@ -74,6 +77,7 @@ You must have Mac Operating System with OSX/MacOS version > 10.9
|
|
74
77
|
- RubyGem with [Cocoapods](https://cocoapods.org/) installed
|
75
78
|
* **[Curl on Mac](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/curl.1.html)**
|
76
79
|
- Might be pre-installed but worth double checking.
|
80
|
+
* **[Homebrew](http://brew.sh)**
|
77
81
|
* **[iOS-Sim](https://www.npmjs.com/package/ios-sim)**
|
78
82
|
- Node Package required to launch iOS app for Fitnesse Acceptance tests.
|
79
83
|
* [**Java**](https://www.java.com/en/)
|
@@ -85,23 +89,45 @@ You must have Mac Operating System with OSX/MacOS version > 10.9
|
|
85
89
|
|
86
90
|
# Installation
|
87
91
|
|
92
|
+
XCFit can be installed using [Homebrew](http://brew.sh) or using [RubyGems](https://rubygems.org/) but it's strongly recommended to install it using Homebrew.
|
93
|
+
|
94
|
+
## Install with HomeBrew
|
95
|
+
|
96
|
+
Assuming you have already installed [Homebrew](http://brew.sh). Let's tap the formula
|
97
|
+
|
98
|
+
brew tap shashikant86/homebrew-taps
|
99
|
+
Now, we can install XCFit brew package using
|
100
|
+
|
101
|
+
brew install xcfit
|
102
|
+
|
103
|
+
|
104
|
+
This is recommended method to install `XCFit` over the Rubygem mentioned below.
|
105
|
+
|
88
106
|
## Install XCFit Gem
|
89
|
-
|
107
|
+
If you can't use HomeBrew for some reason then XCFit can be installed using [RubyGems](https://rubygems.org/). This will set our Xcode for BDD
|
90
108
|
|
91
109
|
$ gem install xcfit
|
92
110
|
|
93
111
|
You need to use with 'sudo' if you are using system (pre-installed) Ruby(2.0). XCFit gem will be used to set all the Xcode Templated for Xcode 8 as well Xcode 7
|
94
112
|
|
95
|
-
|
113
|
+
# XCFit Commands
|
114
|
+
|
115
|
+
Once you installed XCFit with HomeBrew/Rubygem then you can execute 'xcfit' command from your terminal/iTerm etc etc. Example Output Looks like this :
|
96
116
|
|
97
117
|
```
|
98
118
|
$xcfit
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
119
|
+
setup_xcode_templates:
|
120
|
+
generate a Xcode 8 Templates for the Cucumberish and Fitnesse
|
121
|
+
setup_xcode7_templates:
|
122
|
+
generate a Xcode 7.x Templates. Please upgrade to Xcode 8
|
123
|
+
setup_gherkin:
|
124
|
+
generate Xcode Templates for the Gherkin Feature Files
|
125
|
+
get_cucumberish:
|
126
|
+
Downloads Cucumberish version
|
127
|
+
version:
|
128
|
+
prints the XCFit version
|
129
|
+
help:
|
130
|
+
prints more detailed help information.
|
105
131
|
```
|
106
132
|
|
107
133
|
|
@@ -123,15 +149,6 @@ $ xcfit set_xcode_templates
|
|
123
149
|
|
124
150
|
```
|
125
151
|
|
126
|
-
##### Xcode 7
|
127
|
-
|
128
|
-
To setup Templates for Xcode 7.x.
|
129
|
-
|
130
|
-
|
131
|
-
```sh
|
132
|
-
$ xcfit set_xcode7_templates
|
133
|
-
|
134
|
-
```
|
135
152
|
|
136
153
|
- This will add couple of templates to your Xcode for iOS and macOS apps. In your app if you go to 'File--->New--->Target'
|
137
154
|
|
@@ -203,13 +220,13 @@ Here is how to do it.
|
|
203
220
|
|
204
221
|
* **Cucumberish Header Files**
|
205
222
|
|
206
|
-
We still don't have content of [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) to be included in our project.
|
223
|
+
We still don't have content of [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) to be included in our project.
|
207
224
|
|
208
|
-
### Getting Cucumberish into our Target
|
225
|
+
### Getting Cucumberish into our Target
|
209
226
|
|
210
|
-
In order to get [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) source content. There are few ways we can do that
|
227
|
+
In order to get [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) source content. There are few ways we can do that
|
211
228
|
|
212
|
-
-
|
229
|
+
- **Cocoapods**
|
213
230
|
|
214
231
|
Create a 'Podfile' if you don't have already. In your Podfile, add following Pod entry and update/install pod
|
215
232
|
|
@@ -230,30 +247,35 @@ $ pod install
|
|
230
247
|
|
231
248
|
Now close the existing Xcode session and Xcode Workspace next time.
|
232
249
|
|
233
|
-
> **Note** There is issue with Cocoapods when you have ``'use_frameworks!'``, it will not import header files and build will fail. If you are not using Frameworks in th Podfile then this approach is OK.
|
250
|
+
> **Note** There is issue with Cocoapods when you have ``'use_frameworks!'``, it will not import header files and build will fail. If you are not using Frameworks in th Podfile then this approach is OK.
|
234
251
|
|
235
|
-
-
|
252
|
+
- **Manual Installtion**
|
236
253
|
|
237
|
-
We can manually copy content of [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) directory and drag to target as with option "**Create groups" and "Copy items if needed**".
|
254
|
+
We can manually copy content of [Cucumberish](https://github.com/Ahmed-Ali/Cucumberish/tree/master/Cucumberish) directory and drag to target as with option "**Create groups" and "Copy items if needed**".
|
238
255
|
|
239
|
-
Here is How to setup everything in a minute
|
256
|
+
Here is How to setup everything in a minute
|
240
257
|
|
241
258
|
![image](https://github.com/Shashikant86/XCFit-GIFS/blob/master/XCFitStartUp.gif)
|
242
259
|
|
243
|
-
-
|
260
|
+
- **Carthage**
|
244
261
|
|
245
|
-
Create a `Cartfile ` with following Content
|
262
|
+
Create a `Cartfile ` with following Content
|
246
263
|
|
247
264
|
```
|
248
265
|
github "Ahmed-Ali/Cucumberish"
|
249
266
|
```
|
250
|
-
Now run Carthage wihtout build option.
|
251
|
-
|
252
|
-
$ carthage update --platform iOS --no-build
|
253
|
-
|
254
|
-
Now in the `Carthage/Checkout` directory has Cucumberish
|
267
|
+
Now run Carthage wihtout build option.
|
268
|
+
|
269
|
+
$ carthage update --platform iOS --no-build
|
270
|
+
|
271
|
+
Now in the `Carthage/Checkout` directory has `Cucumberish/Cucumberish`. drag to target as with option "**Create groups" and "Copy items if needed**".
|
272
|
+
|
273
|
+
Here is how to do that !
|
274
|
+
|
275
|
+
![image](https://github.com/Shashikant86/XCFit-GIFS/blob/master/Carthage.gif)
|
276
|
+
|
255
277
|
|
256
|
-
Please choose one of the suitable option for you.
|
278
|
+
Please choose one of the suitable option for you.
|
257
279
|
|
258
280
|
We now have everything we needed to run demo Cucumber demo test. Update Scheme if don't want to run unit test or other type of tests.
|
259
281
|
and press 'CMD+U'
|
data/XCFit.podspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Pod::Spec.new do |s|
|
2
2
|
s.name = 'XCFit'
|
3
|
-
s.version = '
|
3
|
+
s.version = '3.0.6'
|
4
4
|
s.summary = 'Full Stack BDD for iOS and macOS Apps with Swift, Xcode using XCUITest, Cucumberish, FitNesse and friends.'
|
5
5
|
|
6
6
|
s.description = <<-DESC
|
@@ -16,19 +16,9 @@ XCFit is a full stack BDD framework for iOS and macOS apps with Swift using Cucu
|
|
16
16
|
s.social_media_url = 'https://twitter.com/Shashikant86'
|
17
17
|
|
18
18
|
s.ios.deployment_target = '9.0'
|
19
|
-
s.source_files
|
20
|
-
s.
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
'XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.h',
|
25
|
-
'XCFit/Classes/Cucumberish/Core/Models/CCIExample.h',
|
26
|
-
'XCFit/Classes/Cucumberish/Core/Models/CCIStep.h',
|
27
|
-
'XCFit/Classes/Cucumberish/Core/Models/CCILocation.h',
|
28
|
-
'XCFit/Classes/Cucumberish/Core/Models/CCIArgument.h'
|
29
|
-
s.resource_bundles = {
|
30
|
-
'GherkinLanguages' => ['XCFit/Classes/Cucumberish/Dependencies/Gherkin/gherkin-languages.json'],
|
31
|
-
}
|
32
|
-
s.framework = "XCTest"
|
33
|
-
s.xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "SRC_ROOT=@\\\"$(SRCROOT)\\\"" }
|
19
|
+
s.source_files = 'Sources/*.swift'
|
20
|
+
s.framework = "XCTest"
|
21
|
+
s.dependency 'Cucumberish'
|
22
|
+
s.xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "SRC_ROOT=@\\\"$(SRCROOT)\\\"" }
|
23
|
+
s.xcconfig = { "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES" => "NO" }
|
34
24
|
end
|
@@ -5,37 +5,39 @@
|
|
5
5
|
//
|
6
6
|
|
7
7
|
/*
|
8
|
-
|
8
|
+
|
9
9
|
This is sample code created by XCFit Framework and can be edited/Removed as per your project need. You can also re-arrange Xcode Groups and directories as per your need.
|
10
|
-
|
10
|
+
|
11
11
|
This assumes that your apps is made up of multiple screens. All the common varibales, functions, related to screens can be put here. This class will be perent class of your individual screen.
|
12
|
-
|
12
|
+
|
13
13
|
*/
|
14
14
|
|
15
15
|
import XCTest
|
16
16
|
import Foundation
|
17
17
|
|
18
18
|
class BaseScreen: XCTestCase {
|
19
|
+
|
20
|
+
// Add your own methods to base class e.g
|
19
21
|
|
20
22
|
func waitAndTap(element: XCUIElement) {
|
21
|
-
|
23
|
+
|
22
24
|
let exists = NSPredicate(format: "exists == true")
|
23
|
-
|
25
|
+
|
24
26
|
self.expectation(for: exists, evaluatedWith: element, handler: nil)
|
25
27
|
self.waitForExpectations(timeout: 10, handler: nil)
|
26
|
-
|
28
|
+
|
27
29
|
element.tap()
|
28
|
-
|
30
|
+
|
29
31
|
}
|
30
|
-
|
31
|
-
|
32
|
+
|
33
|
+
|
32
34
|
func waitForExist(element: XCUIElement) {
|
33
|
-
|
35
|
+
|
34
36
|
let exists = NSPredicate(format: "exists == true")
|
35
|
-
|
37
|
+
|
36
38
|
self.expectation(for: exists, evaluatedWith: element, handler: nil)
|
37
39
|
self.waitForExpectations(timeout: 10, handler: nil)
|
38
40
|
XCTAssert(element.exists)
|
39
|
-
|
41
|
+
|
40
42
|
}
|
41
43
|
}
|
data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift
CHANGED
@@ -6,19 +6,20 @@
|
|
6
6
|
//
|
7
7
|
|
8
8
|
/*
|
9
|
-
|
9
|
+
|
10
10
|
This is sample code created by XCFit Framework and can be edited/Removed as per your project need. You can also re-arrange Xcode Groups and directories as per your need.
|
11
|
-
|
12
|
-
This class has some mostly used step definitions included here. You can add some more here if needed.
|
13
|
-
|
11
|
+
|
12
|
+
This class has some mostly used step definitions included here. You can add some more here if needed.
|
13
|
+
|
14
14
|
*/
|
15
15
|
|
16
16
|
import XCTest
|
17
|
+
import Cucumberish
|
17
18
|
|
18
19
|
class CommonStepDefinitions: NSObject {
|
19
|
-
|
20
|
+
|
20
21
|
fileprivate var application : XCUIApplication!
|
21
|
-
|
22
|
+
|
22
23
|
fileprivate func elementByLabel(_ label : String, type: String) -> XCUIElement
|
23
24
|
{
|
24
25
|
var elementQurey : XCUIElementQuery!
|
@@ -39,7 +40,7 @@ class CommonStepDefinitions: NSObject {
|
|
39
40
|
}
|
40
41
|
return elementQurey[label]
|
41
42
|
}
|
42
|
-
|
43
|
+
|
43
44
|
fileprivate func setup(_ application: XCUIApplication)
|
44
45
|
{
|
45
46
|
self.application = application
|
@@ -49,7 +50,7 @@ class CommonStepDefinitions: NSObject {
|
|
49
50
|
let type = args?[1]
|
50
51
|
self.elementByLabel(label!, type: type!).tap()
|
51
52
|
}
|
52
|
-
|
53
|
+
|
53
54
|
//And/When/Then/But I tap the "Increment" button 5 times
|
54
55
|
MatchAll("^I tap (?:the )?\"([^\\\"]*)\" (button|label|tab|view) ([1-9]{1}) time(?:s)?$") { (args, userInfo) -> Void in
|
55
56
|
let label = args?[0]
|
@@ -61,7 +62,7 @@ class CommonStepDefinitions: NSObject {
|
|
61
62
|
}
|
62
63
|
}
|
63
64
|
// Then I write "Ahmed Ali" into the "Name" field
|
64
|
-
|
65
|
+
|
65
66
|
//When/And/But/When I write "Ahmed" in the "Name" field
|
66
67
|
MatchAll("^I write \"([^\\\"]*)\" (?:into|in) (?:the )?\"([^\\\"]*)\" (field|text view)$") { (args, userInfo) -> Void in
|
67
68
|
let type = args?[2]
|
@@ -70,8 +71,8 @@ class CommonStepDefinitions: NSObject {
|
|
70
71
|
element.tap()
|
71
72
|
element.typeText((args?[0])!)
|
72
73
|
}
|
73
|
-
|
74
|
-
|
74
|
+
|
75
|
+
|
75
76
|
MatchAll("^I switch (on|off) the \"([^\\\"]*)\" switch$") { (args, userInfo) -> Void in
|
76
77
|
let theSwitch = application.switches[(args?[1])!]
|
77
78
|
let currentValu = NSString(string: theSwitch.value as! String).integerValue
|
@@ -79,12 +80,12 @@ class CommonStepDefinitions: NSObject {
|
|
79
80
|
if(currentValu != newValue){
|
80
81
|
theSwitch.tap()
|
81
82
|
}
|
82
|
-
|
83
|
+
|
83
84
|
}
|
84
|
-
|
85
|
-
|
85
|
+
|
86
|
+
|
86
87
|
}
|
87
|
-
|
88
|
+
|
88
89
|
class func setup(_ application: XCUIApplication)
|
89
90
|
{
|
90
91
|
CommonStepDefinitions().setup(application)
|
@@ -6,26 +6,26 @@
|
|
6
6
|
//
|
7
7
|
|
8
8
|
/*
|
9
|
-
|
9
|
+
|
10
10
|
This is sample code created by XCFit Framework and can be edited/Removed as per your project need. You can also re-arrange Xcode Groups and directories as per your need.
|
11
|
-
|
11
|
+
|
12
12
|
This file can take all the Swift extensions build around XCUI Test Frameworks which can be directly used in the tests, page objects. Here are sample extensions on XCUIElement and XCTestCase.
|
13
|
-
|
13
|
+
|
14
14
|
*/
|
15
15
|
|
16
16
|
import Foundation
|
17
17
|
import XCTest
|
18
18
|
|
19
19
|
extension XCUIElement {
|
20
|
-
|
20
|
+
|
21
21
|
public func tapOnceVisible(testCase: XCTestCase,
|
22
22
|
file: String = #file, line: UInt = #line) {
|
23
23
|
let existsPredicate = NSPredicate(format: "exists == true")
|
24
|
-
|
25
|
-
|
24
|
+
|
25
|
+
|
26
26
|
testCase.expectation(for: existsPredicate,
|
27
27
|
evaluatedWith: self, handler: nil)
|
28
|
-
|
28
|
+
|
29
29
|
testCase.waitForExpectations(timeout: 20) { (error) -> Void in
|
30
30
|
if (error != nil) {
|
31
31
|
let message = "Failed to find \(self) after 20 seconds."
|
@@ -33,11 +33,11 @@ extension XCUIElement {
|
|
33
33
|
inFile: file, atLine: line, expected: true)
|
34
34
|
}
|
35
35
|
}
|
36
|
-
|
36
|
+
|
37
37
|
self.tap()
|
38
38
|
}
|
39
|
-
|
40
|
-
|
39
|
+
|
40
|
+
|
41
41
|
}
|
42
42
|
|
43
43
|
extension XCTestCase {
|
@@ -46,7 +46,7 @@ extension XCTestCase {
|
|
46
46
|
let existsPredicate = NSPredicate(format: "exists == true")
|
47
47
|
expectation(for: existsPredicate,
|
48
48
|
evaluatedWith: element, handler: nil)
|
49
|
-
|
49
|
+
|
50
50
|
waitForExpectations(timeout: 20) { (error) -> Void in
|
51
51
|
if (error != nil) {
|
52
52
|
let message = "Failed to find \(element) after 5 seconds."
|
@@ -5,9 +5,9 @@
|
|
5
5
|
//
|
6
6
|
|
7
7
|
/*
|
8
|
-
|
8
|
+
|
9
9
|
This is sample code created by XCFit Framework and can be edited/Removed as per your project need. You can also re-arrange Xcode Groups and directories as per your need.
|
10
|
-
|
10
|
+
|
11
11
|
This assumes that your apps is made up of multiple screens. You can write individual screen class which extend BaseScreen. All the functionality related to screen can be included in this class.
|
12
12
|
*/
|
13
13
|
|
@@ -16,9 +16,9 @@ import XCTest
|
|
16
16
|
|
17
17
|
|
18
18
|
class HomeScreen: BaseScreen {
|
19
|
-
|
19
|
+
|
20
20
|
// You can add locators and functions of homeScreen here
|
21
|
-
|
21
|
+
|
22
22
|
let crappyButtuon = XCUIApplication().buttons["I am really useless button"]
|
23
|
-
|
23
|
+
|
24
24
|
}
|