Comments (3)
Aaaand just for kicks I made CucumberSwift 2.2.36
ask the Bundle to find the "Features" folder. This should help isolate us from these kinds of Xcode changes in the future.
from cucumberswift.
First thank you for reaching out AND for having a sample application, that helped a ton when debugging your problem. The issue is that CucumberSwift looks for the path "Features" on your testing bundle.
With Xcode 11.4.1 and a macOS target like you have i noticed the actual folder path was Contents/Resources/Features
.
THE FIX:
Add an entry to your info.plist (in your tests) who's key is FeaturesPath
and who's value is Contents/Resources/Features
Or open your info.plist and add this to the bottom:
<key>FeaturesPath</key>
<string>Contents/Resources/Features</string>
How I debugged it
- I set a breakpoint in the file
Cucumber.Swift
on the methodreadFromFeaturesFolder(in testBundle:Bundle)
. - Once the breakpoint hit I printed out the value of
testBundle.bundleURL
. - I navigated to that folder in my terminal and looked at where it wrote the
Features
folder, and discovered it was buried under those 2 directories (Contents -> Resources).
Sorry that cost you so much time, as Apple changes these things between Xcode versions and platforms it can be tricky to have documentation that can help point people to an easy fix.
I'm going to go ahead and leave this open for a bit in case you run into any more issues or the fix doesn't immediately solve your problem. I got your sample app working and if the fix wasn't so trivial I'd do a PR.
from cucumberswift.
Awesome 🎉, that fixed it!
Thanks so much for looking into it and also for describing how you tracked it down. I'm fairly new to macOS/iOS development and that is definitely helpful.
Setting the property solves it for my project with version 2.2.35
. And I can also confirm that the latest release works without any additional configuration.
Now I am looking forward to converting most of my tests to BDD scenarios. That will make them so much more readable 🙂.
Last but not least: thank you for this library. I looked around and didn't find anything better for BDD testing in iOS/macOS projects. It deserves many more stars.
from cucumberswift.
Related Issues (20)
- Add a screenshot to scenario in AfterScenario HOT 1
- Call another step from current HOT 2
- "Given something #comment" vs "Given the color is #123456" HOT 4
- Stub generation uses deprecated Matcher initializer HOT 1
- Couldn't execute tests/run project - x86_64-apple-macos vs arm64-apple-macos issue HOT 3
- Quoted string works incorrect in scenario outline when there is a parameter HOT 6
- Group steps per scenario in test report HOT 2
- CucumberTest no longer discovered by Xcode HOT 2
- Some tests are not passing because generated code is localised.
- Wrong order of hooks execution. HOT 1
- Usage of symbols < and > in data table produce errors in non Outline Scenarios. HOT 6
- Broken Gherkin language support due to 951bdd3a48900e24d528f0ac65814e2a06dbfdb5 HOT 2
- Empty cell in table error HOT 3
- Steps are reported as passing although the step definition's closure is XCTFail HOT 6
- Scenarios are running 2 times HOT 8
- @ in steps causes error HOT 2
- Couldn't load project from derived data HOT 7
- Compiled module was created by a different version of the compiler
- Error if comment is placed after tag HOT 1
- No GenerateStepStubsIfNecessary in the report navigator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cucumberswift.