我正在开发一个类似于文件同步客户端(如 Dropbox)的应用程序。
我想要接受(黑盒)测试,比如:
- (void) testLocalFolderCreation
{
// assert there is no folder on the server
// create folder (either via NSFileManager or system('mkdir ...'))
// wait a few seconds
// assert there is now a relevant folder on the server
}
以及许多其他测试本地和远程更改并同步客户端行为的测试。
我尝试在 Xcode 中创建单元测试包,但它实际上并没有启动我进行此类测试所需的应用程序。
我想一次性测试应用程序,而不是为每个测试方法或测试类重新启动整个应用程序。
有谁知道如何解决这个问题?我想,一种选择是创建单独的应用程序(使用 Xcode 或其他语言),这将启动应用程序(我的同步客户端)并在应用程序运行时进行测试;但我不确定这是否是一种正确的方法。