Testing Using a BDD Framework | Ray Wenderlich

Writing tests using XCTest alone can make it difficult to organize your tests and keep them readable and maintainable. Using a BDD testing framework helps solve these problems and makes it easier and more enjoyable to write tests.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5042-testing-using-a-bdd-framework
2 Likes

Thanks for the screencast. What are the other popular frameworks? How do we pick one?

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi @tarun,
You have a couple of options there including popular ones like

  • Kiwi
  • Quick

and others that are variants.

cheers,

Jayant

Hi Cosmin, being that you are screencast author, this question is better suited to you :slight_smile: Cheers!

Hi,
I have a question about the best practices: If we follow the bdd could we use also the tdd in the same project ?

I think BDD is a much better pattern than TDD, however, the topic here is bit lite. XCFit I think is a much better tool than Nimble and quick… though I think both can be used. If you want to see a deeper dive into BDD take a look at: Introducing Protocol-Oriented BDD in Swift for iOS Apps | by Shashikant Jagtap | XCBlog | Medium

Sorry I may have a little dumb question. I am new to BDD and Swift. I do have some Obj-C experience. My question is: is BDD widely used in the industry for iOS Swift development? Or it sort of faded off in last few years. I just don’t see much newer documentation in last 2 years. Thanks.

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]

I don’t have widespread adoption numbers. You’ll have to do some research. That said, looking at the Quick github page, it looks be up to date and active.