Code Monkey home page Code Monkey logo

Comments (3)

Tyler-Keith-Thompson avatar Tyler-Keith-Thompson commented on June 1, 2024 1

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.

Tyler-Keith-Thompson avatar Tyler-Keith-Thompson commented on June 1, 2024

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 method readFromFeaturesFolder(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.

c-st avatar c-st commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.