Appium is an open-source tool you can use to automate mobile native, mobile web, and mobile hybrid applications on iOS and Android platforms. “Mobile native apps” are those written using the iOS or Android SDKs. “Mobile web apps” are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome on Android). “Mobile hybrid apps” have a native wrapper around a “webview” – a native control that enables interaction with web content. Projects like Phonegap, for example, make it easy to build apps using web technologies that are then bundled into a native wrapper – these are hybrid apps.
Importantly, Appium is “cross-platform”: it allows you to write tests against multiple platforms (iOS, Android), using the same API. This enables a large or total amount of code reuse between iOS and Android testsuites.
我们可以从上面的介绍里获得这样的一些信息:
连接:
mysql: mysql -h localhost -u username -p
mongodb:con = pymongo.Connection('localhost',27017)
显示数据库
mysql:show databases;
mongodb:con.database_names()
使用某个数据库
mysql:use database;
mongodb:db = con['database'] or con.database 没有将会创建
显示所有的表
mysql:show tables;
mongodb:db.collection_names()
使用某个表(mongodb中称为colection)
mysql: use table;
mongodb:col = db.collection or db['collection'] 没有将会创建
遍历表中的内容
mysql: select * from table[where...]
mongodb: for i in col.find():print i
for i in col.find_one({'key':'value'}):print i 返回值是字典
向表中插入值
mysql: insert into table valuses(......)
mongodb:col.insert({'key':'value',...})
d = {'key':'value'}
col.insert(d)