xcfit 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/.swift-version +1 -0
  3. data/.travis.yml +13 -13
  4. data/README.md +57 -35
  5. data/XCFit.podspec +6 -16
  6. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +14 -12
  7. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +16 -15
  8. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +11 -11
  9. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +5 -5
  10. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +9 -8
  11. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +7 -6
  12. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +7 -5
  13. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +10 -8
  14. data/homebrew/xcfit +155 -0
  15. data/lib/XCFit/version.rb +1 -1
  16. metadata +15 -177
  17. data/XCFit/Classes/.gitkeep +0 -0
  18. data/XCFit/Classes/CliSwift.swift +0 -87
  19. data/XCFit/Classes/CopyDir.swift +0 -26
  20. data/XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h +0 -400
  21. data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.h +0 -72
  22. data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.m +0 -141
  23. data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.h +0 -51
  24. data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.m +0 -245
  25. data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.h +0 -62
  26. data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.m +0 -117
  27. data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.h +0 -37
  28. data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.m +0 -37
  29. data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.h +0 -46
  30. data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.m +0 -117
  31. data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.h +0 -89
  32. data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.m +0 -128
  33. data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.h +0 -49
  34. data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.m +0 -174
  35. data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.h +0 -36
  36. data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.m +0 -34
  37. data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.h +0 -61
  38. data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.m +0 -91
  39. data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.h +0 -97
  40. data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.m +0 -224
  41. data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.h +0 -85
  42. data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.m +0 -98
  43. data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.h +0 -43
  44. data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.m +0 -65
  45. data/XCFit/Classes/Cucumberish/Cucumberish.h +0 -133
  46. data/XCFit/Classes/Cucumberish/Cucumberish.m +0 -604
  47. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.h +0 -15
  48. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.m +0 -312
  49. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.h +0 -20
  50. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.m +0 -79
  51. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.h +0 -12
  52. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.m +0 -18
  53. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.h +0 -11
  54. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.m +0 -27
  55. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.h +0 -14
  56. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.m +0 -30
  57. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.h +0 -14
  58. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.m +0 -29
  59. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.h +0 -24
  60. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.m +0 -49
  61. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.h +0 -24
  62. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.m +0 -50
  63. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.h +0 -25
  64. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.m +0 -64
  65. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.h +0 -9
  66. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.m +0 -124
  67. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProviderProtocol.h +0 -10
  68. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.h +0 -9
  69. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.m +0 -10
  70. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.h +0 -17
  71. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.m +0 -18
  72. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.h +0 -12
  73. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.m +0 -179
  74. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineProtocol.h +0 -64
  75. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.h +0 -9
  76. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.m +0 -26
  77. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasDescriptionProtocol.h +0 -8
  78. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasLocationProtocol.h +0 -8
  79. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasRowsProtocol.h +0 -8
  80. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasStepsProtocol.h +0 -8
  81. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasTagsProtocol.h +0 -8
  82. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.h +0 -12
  83. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.m +0 -41
  84. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.h +0 -4
  85. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.m +0 -5
  86. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.h +0 -10
  87. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.m +0 -18
  88. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.h +0 -132
  89. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.m +0 -2735
  90. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.h +0 -55
  91. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.m +0 -192
  92. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.h +0 -14
  93. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.m +0 -18
  94. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.h +0 -23
  95. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.m +0 -41
  96. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition_Private.h +0 -6
  97. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.h +0 -15
  98. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.m +0 -26
  99. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.h +0 -16
  100. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.m +0 -35
  101. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.h +0 -4
  102. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.m +0 -5
  103. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.h +0 -13
  104. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.m +0 -28
  105. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.h +0 -13
  106. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.m +0 -29
  107. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.h +0 -13
  108. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.m +0 -28
  109. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.h +0 -26
  110. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.m +0 -50
  111. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.h +0 -29
  112. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.m +0 -283
  113. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.h +0 -12
  114. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.m +0 -59
  115. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.h +0 -7
  116. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.m +0 -28
  117. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/gherkin-languages.json +0 -2969
  118. data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.h +0 -24
  119. data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.m +0 -44
  120. data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.h +0 -7
  121. data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.m +0 -83
  122. data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.h +0 -32
  123. data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.m +0 -70
  124. data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
  125. data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
  126. data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
  127. data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
  128. data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
  129. data/XCFit_Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
  130. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
  131. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -134
  132. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -17
  133. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -13
  134. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m +0 -25
  135. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h +0 -1
  136. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift +0 -35
  137. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h +0 -28
  138. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist +0 -155
  139. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -12
  140. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -33
  141. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +0 -41
  142. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +0 -92
  143. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +0 -58
  144. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
  145. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +0 -28
  146. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +0 -26
  147. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
  148. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
  149. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateInfo.plist +0 -159
  150. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -15
  151. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.h +0 -23
  152. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -28
  153. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -37
  154. data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
  155. data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
  156. data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
  157. data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
  158. data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
  159. data/Xcode7-Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
  160. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/BaseScreen.swift +0 -42
  161. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/Extensions.swift +0 -60
  162. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeElements.swift +0 -31
  163. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeProtocol.swift +0 -25
  164. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
  165. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreenTest.swift +0 -30
  166. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/ProtocolOrientedTest.swift +0 -45
  167. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
  168. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
  169. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateInfo.plist +0 -141
  170. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___TestBase.swift +0 -30
  171. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns +0 -0
  172. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png +0 -0
  173. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png +0 -0
  174. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
  175. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns +0 -0
  176. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png +0 -0
  177. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png +0 -0
  178. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist +0 -59
  179. data/Xcode7-Templates/XCFit/iOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
  180. 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: 7a6bc50869cd1436a9cc712aff3b0234a8a8bfd3
4
- data.tar.gz: 729394f9e92ecde9f846910c9ff3661a57feeeb9
3
+ metadata.gz: dc00680c334473032feb71cdbc14b2749c3da605
4
+ data.tar.gz: d1ab5d98d96d66e6d714916ccc780ab7bd43205b
5
5
  SHA512:
6
- metadata.gz: ad23c796e3fd0b06cc4721c63ced0e3bb9a3458d16cde23e2a0b3e4da19f0fc0766b94dea845c321dd53c9ef464c7cc1fc4e41d8f595b0564a12b26a56dee01f
7
- data.tar.gz: e205e6da57c70d4347b98a534ef5aa564a9aeef8204a4cec7f1af3e2696a141cbff0a3a9b3d115d113a09578f21125d77a78131c4de433462250ca422d9f2d49
6
+ metadata.gz: 51d8eab780e0957315857f5991bef39173d0e3e4c543cdad9118dd1fa49605b4a87aa1b21aab7f6134a09bbc65b83bcc243caf5766ddb41efbc5f0576421ec2d
7
+ data.tar.gz: 48e04d9dc47e75ec9d2ba339f56d39fa019ac0e23435667e73e095fd407f1a5ebd9848d6efeb2eb44573a95635f5f1388888ff2fa73a6fd7fb1debc7f7b02339
@@ -0,0 +1 @@
1
+ 3.1-dev
@@ -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
- osx_image: xcode7.3
6
- language: objective-c
7
- # cache: cocoapods
8
- podfile: XCFit2Demo/Podfile
9
- gemfile: XCFit2Demo/Gemfile
10
-
11
- script:
12
- - cd XCFit2Demo
13
- - pwd
14
- - set -o pipefail && xcodebuild -list
15
- - bundle install
16
- - echo "==========Now Running XCUI Cucumberish Tests==================="
17
- - bundle exec fastlane xcfit_ui_test
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
- In order to get started, We need to install XCFit from [RubyGems](https://rubygems.org/). This will set our Xcode for BDD
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
- Now that you can execute 'xcfit' command from your terminal/iTerm etc etc. Example Output Looks like this :
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
- Tasks:
100
- xcfit get_cucumberish VERSION
101
- xcfit get_fitnesse
102
- xcfit help [TASK]
103
- xcfit set_xcode7_templates
104
- xcfit set_xcode_templates
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
- - ***Adding XCFit CocoaPod to Project***
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
- - ***Manually Copy Content of Cucumberish and Drag to Xcode - Prefered Way***
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
- - ***Use Carthage without build and drag the folder to target***
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. Just add that to target or workspace.
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'
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'XCFit'
3
- s.version = '2.0.0'
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 = 'XCFit/Classes/Cucumberish/*.{h,m}', 'XCFit/Classes/Cucumberish/Core/Managers/*.{h,m}', 'XCFit/Classes/Cucumberish/Core/Models/*.{h,m}', 'XCFit/Classes/Cucumberish/Utils/*.{h,m}', 'XCFit/Classes/Cucumberish/Dependencies/Gherkin', 'XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h'
20
- s.public_header_files =
21
- 'XCFit/Classes/Cucumberish/Cucumberish.h',
22
- 'XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.h',
23
- 'XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h',
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
  }
@@ -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
  }