Connect to an Oracle Database in Swift

岁酱吖の 提交于 2019-12-25 14:08:32

问题


I am using Xcode 7, Swift, and the new UI Automation announced at WWDC 15. I want to test some things in an oracle database after some of my UI automation tests have run.

Can this be done? If so how do you do it? I can't seem to find any sort of documentation on the subject.


回答1:


The mobile phone doesn't guarantee a permanent and stable network connection and is a big problem for direct connection to DB. For mobile platforms you need to create a web service on a server that will do all the work between database and mobile application. It is not recommended to connect directly to databases, except when it is local databases(SQLite).




回答2:


I just upvoted @lurie-manea answer, in addition to that you shouldn't rely on Xcode UI test for testing your DB transaction once you have your web service implemented since you'd be able to test the DB state with XCTest(app tests) or if you using AppCode for writing code, it has nice plugin to test restful web services,

https://www.jetbrains.com/objc/help/testing-restful-web-services.html

Hope this helps.



来源:https://stackoverflow.com/questions/32916709/connect-to-an-oracle-database-in-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!