17

Quick is a behavior-driven development testing framework. I'd like to know why this could be better then doing regular XCTests. Nimble is only a matcher library but it makes the tests easy to read like writing things like expect(13) > 9.

To me Quick provides a new vocabulary for writing tests (that XCTests doesnt have) and makes you focus on writing a unit test. Basically it is a feature induced path to TDD. When a test fails its also much more descriptive.

The other thing i noticed is that if i want to see what a method does, if i go to the quick spec i can easily read whats being tested and then know more about the method instead of writing comments on the method. So the quick spec acts as comments on the method.

Is there anything more i should know about Quick or BDD ?

epologee
  • 11,229
  • 11
  • 68
  • 104
j2emanue
  • 60,549
  • 65
  • 286
  • 456
  • @JefferyThomas this question is a poor fit for Programmers - it would be quickly voted down and closed over there, see http://meta.programmers.stackexchange.com/questions/6483/why-was-my-question-closed-or-down-voted/6491#6491 Recommended reading: **[What goes on Programmers.SE? A guide for Stack Overflow](http://meta.programmers.stackexchange.com/q/7182/31260)** – gnat Aug 18 '15 at 14:00
  • "When a test fails its also much more descriptive." But that has nothing to do with BDD. You could use Nimble without Quick – Anton Belousov Mar 09 '21 at 16:03

1 Answers1

4

You need to evaluate what you need.

I've been using Quick (and Nimble) for a long time and my big concern about it is that is not possible to run a single test case. The thing is Quick generates runtime test cases and that is the reason because of is not possible to run them individually, even if you use fit().

eMdOS
  • 1,693
  • 18
  • 23