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 ?
Quick and Nimble are frameworks that are used in Unit tests in iOS. Quick is a testing framework and Nimble is a matching framework. They help us to write tests more easily and readably in addition to verifying how your programs behave.
Use the XCTest framework to write unit tests for your Xcode projects that integrate seamlessly with Xcode's testing workflow. Tests assert that certain conditions are satisfied during code execution, and record test failures (with optional messages) if those conditions aren't satisfied.
483. A testing framework that allows to create and run unit tests, performance tests, and UI tests for your Xcode project. Tests assert that certain conditions are satisfied during code execution, and record test failures if those conditions are not satisfied.
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()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With