[英]Automated testing of Coredata iOS app on simulator with different db states
I am developing an iOS app and would like to test one particular method with different database states. 我正在开发一个iOS应用,并想测试一种具有不同数据库状态的特定方法。 I think I can input information into Coredata's sqlite database correctly but I'm not sure how to then go about calling the method I want to test without having to manually run the simulator and navigate to the view in my app which calls the method.
我想我可以将信息正确输入到Coredata的sqlite数据库中,但是我不确定如何继续调用要测试的方法,而不必手动运行模拟器并导航到应用程序中调用该方法的视图。
I was planning on using Python to generate the test data and input the values into the database though I can change that if it seems unlikely to work. 我计划使用Python生成测试数据并将值输入数据库,但是如果看起来不太可行,我可以更改它。
It will be easier to call an Objective-C method that will save some test objets in your base. 调用一个Objective-C方法会更容易,该方法将一些测试对象保存在您的库中。 This way you don't have to worry about the SQL structure.
这样,您不必担心SQL结构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.