Use Succinct to unit test the behaviors of your iOS UI in a way that is de-coupled from the private implementation details of your views.
- ⚡️ SPEED: Get lightning fast feedback through unit tests instead of waiting around for your UI tests to give you an accurate result... sometimes.
- 🔍 ENCAPSULATION: By searching through the view hierarchy, the internals of your UI can be kept private, honoring encapsulation.
- 🛠 ARCHITECTURE AGNOSTIC: Any architectural pattern (MVC, MVP, MVVM, etc) can be used to implement your UI.
- 🧩 FREEDOM TO REFACTOR: Refactor to a different architectural pattern without having to change your tests.
IMPORTANT:_ Succinct is a work in progress and does not support every single aspect of testing iOS view hierarchies just yet. Functionality in as it is needed. If there's something you'd like to see included please feel free to open an issue or make a PR. 👍🏻
In Xcode, select the File -> Add Packages...
menu option and enter https://github.com/derekleerock/Succinct
for the the repository URL. Select the desired Dependency Rule and Target then click "Add Package".
Simply include Succinct in your Cartfile.private:
github "derekleerock/Succinct"
And include it in your test target.
Simply add Succinct to your Podfile's test target:
target 'MyAmazingApp' do
...
target 'MyAmazingAppTests' do
inherit! :search_paths
pod 'Succinct'
end
end
📄 Documentation via GitHubPages
Automatic documentation generated thanks to Jazzy, GitHubPages and Travis-CI integration and some great guidance from @jgsamudio in this blog post.
Development for Succinct is done right here through GitHub Issues so anyone can contribute and understand the current state of the framework. If there is functionality that you're looking for that is not included, please feel free to open an issue or make a PR with your suggested feature and tests so we can discuss.
Succinct uses the Swift Package Manager integration in Xcode to install dependencies. Xcode will fetch these the first time you build and run the tests.
All of Succinct's tests have been TDD'd using Quick and Nimble - meaning that you can use Succinct with confidence that it will give you accurate results for the functionality that it provides.
There are two different test suites for Succinct: Unit Tests and Simulator Tests.
These unit tests do not require a host application to run, which means that they can run without the simulator. This makes them lightning fast!
They can be executed using:
$ make tests
These unit tests require the simulator since they are interacting with elements in the UI. They are still fast because they are unit tests, but launching the simulator takes a little bit of time.
They can be executed using:
$ make simulator-tests
Both test suites can be executed using:
$ make alltests
Before completing your PR please be sure your functionality is properly tested and you've confirmed that all tests run successfully - thank you! 🙇🏻♂️
Succinct is licensed under the MIT License. Please see the LICENSE
file.