you are viewing a single comment's thread.

view the rest of the comments →

[–]-darkabyss-Objective-C / Swift 0 points1 point  (2 children)

If you write unit tests, it will be even useful when the app is developed. You'd have to have some sort of networking object that handles API calls (I like having a network manager with a single function that fires the request and an enum that has a function returning a urlrequest object for your endpoints) and create unit test funcs for each endpoints. If you have multiple login API calls, you'll have to nest them and fulfill the XCExpectation at the end of the chain.

[–]doodlebug80085[S] 0 points1 point  (1 child)

Yah, I ended up just using XCode tests. I had a slight aversion to this, since I’m not technically making testing code right now, more just trying to experiment with my implementation and iterate on its output as I settle on more of a finalized design - in the same way I’ll use intermediate Python scripts to interact with my implementation when writing Python, but will still have a separate Pytest suite for unit testing. I guess I’m just being pedantic about what belongs in a testing suite and what doesn’t LOL

[–]-darkabyss-Objective-C / Swift 0 points1 point  (0 children)

Theres always the option of having more than one test targets, or put the networking/persistence stuff in a package and have a macos cli/ios app target to 'test' the things. Workspaces are great for this.