xcteq / xcfit Goto Github PK
View Code? Open in Web Editor NEWFull Stack Protocol Oriented BDD in Xcode for iOS app with Swift using XCUITest, Cucumberish and FitNesse
License: MIT License
Full Stack Protocol Oriented BDD in Xcode for iOS app with Swift using XCUITest, Cucumberish and FitNesse
License: MIT License
Hi again Shashikant,
So I am excited and want to test the ios mobile app from https://github.com/testmunk/TMSample.git using XCFit.
The app works fine.
Then I followed every your steps until warning and error come when Build for Testing.
The warning is
/Users/fergadipa/Documents/Workspace/TMSample/TMSample/TestmunkDemoCucumberTests/TestmunkDemoCucumberTests.swift:35:21: 'executeFeatures(inDirectory:includeTags:excludeTags:)' is deprecated: This method is deprecated because it can cause issues if you installed Cucumberish using Cocoapods. Instead use the method executeFeaturesInDirectory:fromBundle:includeTags:(NSArray *)tags excludeTags:
And the error is
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please kindly suggestion how to solve the error :)
Hey,
I've tried adding the templates to Xcode via "xcfit set_xcode_templates" but nothing happens at all (even with sudo).
Any idea?
edit:// was looking at the wrong place :/
Hi,
I'm curious how to capture screenshot when actual result does not meet expected result?
Because I could not find any screenshot captured when it happened...
Hey,
I've tried to install the package through homebrew but i'm getting:
Error: No available formula with the name "xcfit"
When I try to install it with ruby it seems to work at first, but then, when executing
xcfit setup_xcode_templates i'm getting the error message below:
Could not find task "set_xcode_templates".
The initial setup command doesnt seem to be working.
/Library/Ruby/Gems/2.3.0/gems/xcfit-8.0.0/bin/xcfit:4:in `require': cannot load such file -- xcfit (LoadError)
from /Library/Ruby/Gems/2.3.0/gems/xcfit-8.0.0/bin/xcfit:4:in `<top (required)>'
from /usr/local/bin/xcfit:22:in `load'
from /usr/local/bin/xcfit:22:in `<main>'
Hi!
So after installation using cocoapods I was unable to launch tests.
Here is my Podfile
target 'MyAppBDDTests' do
use_frameworks!
pod 'XCFit'
end
Tests fails with this error:
2018-12-10 17:59:18.534828+0300 MyAppBDDTests-Runner[81743:15183477] Running tests...
2018-12-10 17:59:18.627137+0300 MyAppBDDTests-Runner[81743:15183477] The bundle “MyAppBDDTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2018-12-10 17:59:18.627333+0300 MyAppBDDTests-Runner[81743:15183477] (dlopen_preflight(/Users/a.pshenkin/Library/Developer/Xcode/DerivedData/MyApp-cqxbjzcsntzyqcdyggzdpcacqdjn/Build/Products/Debug-iphonesimulator/MyAppBDDTests-Runner.app/PlugIns/MyAppBDDTests.xctest/MyAppBDDTests): Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/a.pshenkin/Library/Developer/Xcode/DerivedData/MyApp-cqxbjzcsntzyqcdyggzdpcacqdjn/Build/Products/Debug-iphonesimulator/MyAppBDDTests-Runner.app/PlugIns/MyAppBDDTests.xctest/Frameworks/XCFit.framework/XCFit
Reason: image not found)
TO fix this I found only one way. Add Copy Files
in Build Phases
, choose destination Frameworks
, add file: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftSwiftOnoneSupport.dylib
Is there more elegant way to fix this?
Thanks in advance
When generating a test project with XCFit, after installing the pods i get in the Podfile.lock:
PODS:
- Cucumberish (1.1.0)
- XCFit (4.0.0):
- Cucumberish
DEPENDENCIES:
- XCFit
SPEC CHECKSUMS:
Cucumberish: d56601ffdabf0cf3ee2f6cce13db90430ff2c8f7
XCFit: cb643d570a3f4588cab3761d282e82e293c8dc2c
PODFILE CHECKSUM: 1ff7977e2cf9463b9b9a7311b73708d886264b11
COCOAPODS: 1.2.0
Then, i updated the testbase class by removing the comment and extent if from XCFit.
Then moved to HomeScreenTest.swift, uncommented the:
givenILaunchedApplication()
And run the test.
The expected result would be to run the app in simulator, run the test and pass (maybe with warnings as there is no expectations).
The actual result was 4 errors:
21: let result = XCTWaiter().wait(for: [xcfitExpectation], timeout: 60)
30: let result = XCTWaiter().wait(for: [xcfitExpectation], timeout: 60)
38: let result = XCTWaiter().wait(for: [xcfitExpectation], timeout: 60)
46: let result = XCTWaiter().wait(for: [xcfitExpectation], timeout: 60)
All with the error of: Use of unresolved identifier 'XCTWaiter'.
Hi,
I've tried to use command xcfit setup_xcode_templates
But the result is
Welcome to XCFit: Full Stack BDD framework for iOS app
'
==================XXXXXXXX===========================
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:incopy': unknown file type: /usr/local/bin/../XCFit_Templates/XCFit (RuntimeError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:463:in
block in copy_entry'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1485:incall' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1485:in
wrap_traverse'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:460:incopy_entry' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:435:in
block in cp_r'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1558:inblock in fu_each_src_dest' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1574:in
fu_each_src_dest0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1556:infu_each_src_dest' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:434:in
cp_r'
from /usr/local/bin/xcfit:26:insetup_xcode_templates' from /usr/local/bin/xcfit:142:in
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.