Say, any of you have unit tests that require running a separate command line tool as part of the test? Like, run my code, run jenkins on it, do some more? (otool is just an example of a black box command line tool). Do you just use NSTask or is there a better trick?

@uliwitness sorry to be pedantic, but if it's doing I/O or shelling out etc, it's not a *unit* test 😃

@uliwitness My environment allows me to start unit tests either from within the IDE or from any command line. It offers its own command-line interface for that, but not a separate tool.

@uliwitness I distinguish between unit tests (literally testing one "unit", function or class), and integration tests (testing the system as a whole). IT go in a separate script, called from the build script; in Xcode, just add a build phase to call that script and return non-zero when it fails.

@mdhughes @equal Yeah, that's what I'm doing right now and I call 'em integration tests as well.

Problem with that is, I currently get none of Xcode's "re-run a single test" support etc. for that script. So would like to run them WITH the unit tests out of XCTest or Simple/Quick.

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!