TESTING

An App With SCA: Flow Testing

How to completely test the execution flow of your app

The Startup
Published in
6 min readOct 20, 2020

--

This is the last article of a series on how to write an app with SwiftUI and the Composable Architecture by pointfree.co. You can find the other articles at the following links:

Last week we discussed how to export the dependencies of our Snake app to gain full control over our codebase. We also finalized the test of the state we were not able to finish a couple of weeks ago.

In the process of factoring out the dependencies, we worked on the timer, moving it from the Reducer to the Environment to have the possibility to control it. However, we did not use it in our tests.

Today, we complete the test of our app, showing an interesting property of the Composable Architecture Test Support: thanks to its ergonomic API, it is possible to fully test our app in a very simple way.

Our codebase so far

In order to properly understand our tests, let me report here the pieces of the…

--

--

The Startup

Hey there, I’m Riccardo. Software engineer at Meta. I have a passion for iOS and I love to share my knowledge with others.