iOS - why use quick and nimble vs XCTest
Asked Answered
A

1

18

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 ?

Arciniega answered 18/8, 2015 at 13:20 Comment(2)
@JefferyThomas this question is a poor fit for Programmers - it would be quickly voted down and closed over there, see meta.programmers.stackexchange.com/questions/6483/… Recommended reading: What goes on Programmers.SE? A guide for Stack OverflowFalsework
"When a test fails its also much more descriptive." But that has nothing to do with BDD. You could use Nimble without QuickSmitten
T
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().

Tabby answered 11/7, 2017 at 14:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.