首页 文章 精选 留言 我的

精选列表

搜索[服务],共10000篇文章
优秀的个人博客,低调大师

Appium-服务关键字

General Capabilities These Capabilities span multiple drivers. Capability Description Values automationName Which automation engine to use Appium (default) or Selendroidor UiAutomator2 or Espresso for Android or XCUITest for iOS or YouiEngine for application built with You.i Engine platformName Which mobile OS platform to use iOS, Android, or FirefoxOS platformVersion Mobile OS version e.g., 7.1, 4.4 deviceName The kind of mobile device or emulator to use iPhone Simulator, iPad Simulator, iPhone Retina 4-inch, Android Emulator, Galaxy S4, etc.... On iOS, this should be one of the valid devices returned by instruments with instruments -s devices. On Android this capability is currently ignored, though it remains required. app The absolute local path or remote http URL to an .ipa or .apk file, or a .zipcontaining one of these. Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify appPackage and appActivitycapabilities (see below). Incompatible with browserName. /abs/path/to/my.apk or http://myapp.com/app.ipa browserName Name of mobile web browser to automate. Should be an empty string if automating an app instead. 'Safari' for iOS and 'Chrome', 'Chromium', or 'Browser' for Android newCommandTimeout How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the session e.g. 60 language (Sim/Emu-only) Language to set for the simulator / emulator. On Android, available only on API levels 22 and below e.g. fr locale (Sim/Emu-only) Locale to set for the simulator / emulator. e.g. fr_CA udid Unique device identifier of the connected physical device e.g. 1ae203187fc012g orientation (Sim/Emu-only) start in a certain orientation LANDSCAPE or PORTRAIT autoWebview Move directly into Webview context. Default false true, false noReset Don't reset app state before this session. See here for more details true, false fullReset Perform a complete reset. See here for more details true, false eventTimings Enable or disable the reporting of the timings for various Appium-internal events (e.g., the start and end of each command, etc.). Defaults to false. To enable, use true. The timings are then reported as events property on response to querying the current session. See the event timing docs for the the structure of this response. e.g., true enablePerformanceLogging (Web and webview only) Enable Chromedriver's (on Android) or Safari's (on iOS) performance logging (default false) true, false printPageSourceOnFindFailure When a find operation fails, print the current page source. Defaults to false. e.g., true Android Only These Capabilities are available only on Android-based drivers (like UiAutomator2 for example). Capability Description Values appActivity Activity name for the Android activity you want to launch from your package. This often needs to be preceded by a . (e.g., .MainActivity instead of MainActivity). By default this capability is received from the package manifest (action: android.intent.action.MAIN , category: android.intent.category.LAUNCHER) MainActivity, .Settings appPackage Java package of the Android app you want to run. By default this capability is received from the package manifest (@package attribute value) com.example.android.myApp, com.android.settings appWaitActivity Activity name/names, comma separated, for the Android activity you want to wait for. By default the value of this capability is the same as for appActivity. You must set it to the very first focused application activity name in case it is different from the one which is set as appActivity if your capability has appActivity and appPackage. SplashActivity, SplashActivity,OtherActivity, *, *.SplashActivity appWaitPackage Java package of the Android app you want to wait for. By default the value of this capability is the same as for appActivity com.example.android.myApp, com.android.settings appWaitDuration Timeout in milliseconds used to wait for the appWaitActivity to launch (default 20000) 30000 deviceReadyTimeout Timeout in seconds while waiting for device to become ready 5 androidCoverage Fully qualified instrumentation class. Passed to -w in adb shell am instrument -e coverage true -w com.my.Pkg/com.my.Pkg.instrumentation.MyInstrumentation androidCoverageEndIntent A broadcast action implemented by yourself which is used to dump coverage into file system. Passed to -a in adb shell am broadcast -a com.example.pkg.END_EMMA androidDeviceReadyTimeout Timeout in seconds used to wait for a device to become ready after booting e.g., 30 androidInstallTimeout Timeout in milliseconds used to wait for an apk to install to the device. Defaults to 90000 e.g., 90000 androidInstallPath The name of the directory on the device in which the apk will be push before install. Defaults to /data/local/tmp e.g. /sdcard/Downloads/ adbPort Port used to connect to the ADB server (default 5037) 5037 systemPort systemPort used to connect to appium-uiautomator2-server, default is 8200 in general and selects one port from 8200 to 8299. When you run tests in parallel, you must adjust the port to avoid conflicts. Read Parallel Testing Setup Guide for more details. e.g., 8201 remoteAdbHost Optional remote ADB server host e.g.: 192.168.0.101 androidDeviceSocket Devtools socket name. Needed only when tested app is a Chromium embedding browser. The socket is open by the browser and Chromedriver connects to it as a devtools client. e.g., chrome_devtools_remote avd Name of avd to launch e.g., api19 avdLaunchTimeout How long to wait in milliseconds for an avd to launch and connect to ADB (default 120000) 300000 avdReadyTimeout How long to wait in milliseconds for an avd to finish its boot animations (default 120000) 300000 avdArgs Additional emulator arguments used when launching an avd e.g., -netfast useKeystore Use a custom keystore to sign apks, default false true or false keystorePath Path to custom keystore, default ~/.android/debug.keystore e.g., /path/to.keystore keystorePassword Password for custom keystore e.g., foo keyAlias Alias for key e.g., androiddebugkey keyPassword Password for key e.g., foo chromedriverExecutable The absolute local path to webdriver executable (if Chromium embedder provides its own webdriver, it should be used instead of original chromedriver bundled with Appium) /abs/path/to/webdriver chromedriverExecutableDir The absolute path to a directory to look for Chromedriver executables in, for automatic discovery of compatible Chromedrivers /abs/path/to/chromedriver/directory chromedriverChromeMappingFile The absolute path to a file which maps Chromedriver versions to the minimum Chrome that it supports /abs/path/to/mapping.json autoWebviewTimeout Amount of time to wait for Webview context to become active, in ms. Defaults to 2000 e.g. 4 intentAction Intent action which will be used to start activity (default android.intent.action.MAIN) e.g.android.intent.action.MAIN, android.intent.action.VIEW intentCategory Intent category which will be used to start activity (default android.intent.category.LAUNCHER) e.g. android.intent.category.LAUNCHER, android.intent.category.APP_CONTACTS intentFlags Flags that will be used to start activity (default 0x10200000) e.g. 0x10200000 optionalIntentArguments Additional intent arguments that will be used to start activity. See Intent arguments e.g. --esn <EXTRA_KEY>, --ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>, etc. dontStopAppOnReset Doesn't stop the process of the app under test, before starting the app using adb. If the app under test is created by another anchor app, setting this false, allows the process of the anchor app to be still alive, during the start of the test app using adb. In other words, with dontStopAppOnReset set to true, we will not include the -S flag in the adb shell am start call. With this capability omitted or set to false, we include the -S flag. Default false true or false unicodeKeyboard Enable Unicode input, default false true or false resetKeyboard Reset keyboard to its original state, after running Unicode tests with unicodeKeyboard capability. Ignored if used alone. Default false true or false noSign Skip checking and signing of app with debug keys, will work only with UiAutomator and not with selendroid, default false true or false ignoreUnimportantViews Calls the setCompressedLayoutHierarchy()uiautomator function. This capability can speed up test execution, since Accessibility commands will run faster ignoring some elements. The ignored elements will not be findable, which is why this capability has also been implemented as a toggle-able settingas well as a capability. Defaults to false true or false disableAndroidWatchers Disables android watchers that watch for application not responding and application crash, this will reduce cpu usage on android device/emulator. This capability will work only with UiAutomator and not with selendroid, default false true or false chromeOptions Allows passing chromeOptions capability for ChromeDriver. For more information see chromeOptions chromeOptions: {args: ['--disable-popup-blocking']} recreateChromeDriverSessions Kill ChromeDriver session when moving to a non-ChromeDriver webview. Defaults to false true or false nativeWebScreenshot In a web context, use native (adb) method for taking a screenshot, rather than proxying to ChromeDriver. Defaults to false true or false androidScreenshotPath The name of the directory on the device in which the screenshot will be put. Defaults to /data/local/tmp e.g. /sdcard/screenshots/ autoGrantPermissions Have Appium automatically determine which permissions your app requires and grant them to the app on install. Defaults to false true or false networkSpeed Set the network speed emulation. Specify the maximum network upload and download speeds. Defaults to full ['full','gsm', 'edge', 'hscsd', 'gprs', 'umts', 'hsdpa', 'lte', 'evdo'] Check -netspeed option more info about speed emulation for avds gpsEnabled Toggle gps location provider for emulators before starting the session. By default the emulator will have this option enabled or not according to how it has been provisioned. true or false isHeadless Set this capability to true to run the Emulator headless when device display is not needed to be visible. false is the default value. isHeadless is also support for iOS, check XCUITest-specific capabilities. e.g., true uiautomator2ServerLaunchTimeout Timeout in milliseconds used to wait for an uiAutomator2 server to launch. Defaults to 20000 e.g., 20000 uiautomator2ServerInstallTimeout Timeout in milliseconds used to wait for an uiAutomator2 server to be installed. Defaults to 20000 e.g., 20000 otherApps App or list of apps (as a JSON array) to install prior to running tests e.g., "/path/to/app.apk", https://www.example.com/url/to/app.apk, ["/path/to/app-a.apk", "/path/to/app-b.apk"] iOS Only These Capabilities are available only on the XCUITest Driver and the deprecated UIAutomation Driver. Capability Description Values calendarFormat (Sim-only) Calendar format to set for the iOS Simulator e.g. gregorian bundleId Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require the bundle ID during test startup. To run a test on a real device using the bundle ID, you may omit the 'app' capability, but you must provide 'udid'. e.g. io.appium.TestApp udid Unique device identifier of the connected physical device e.g. 1ae203187fc012g launchTimeout Amount of time in ms to wait for instruments before assuming it hung and failing the session e.g. 20000 locationServicesEnabled (Sim-only) Force location services to be either on or off. Default is to keep current sim setting. true or false locationServicesAuthorized (Sim-only) Set location services to be authorized or not authorized for app via plist, so that location services alert doesn't pop up. Default is to keep current sim setting. Note that if you use this setting you MUST also use the bundleId capability to send in your app's bundle ID. true or false autoAcceptAlerts Accept all iOS alerts automatically if they pop up. This includes privacy access permission alerts (e.g., location, contacts, photos). Default is false. Does not work on XCUITest-based tests. true or false autoDismissAlerts Dismiss all iOS alerts automatically if they pop up. This includes privacy access permission alerts (e.g., location, contacts, photos). Default is false. Does not work on XCUITest-based tests. true or false nativeInstrumentsLib Use native intruments lib (ie disable instruments-without-delay). true or false nativeWebTap (Sim-only) Enable "real", non-javascript-based web taps in Safari. Default: false. Warning: depending on viewport size/ratio this might not accurately tap an element true or false safariInitialUrl (Sim-only) (>= 8.1) Initial safari url, default is a local welcome page e.g. https://www.github.com safariAllowPopups (Sim-only) Allow javascript to open new windows in Safari. Default keeps current sim setting true or false safariIgnoreFraudWarning (Sim-only) Prevent Safari from showing a fraudulent website warning. Default keeps current sim setting. true or false safariOpenLinksInBackground (Sim-only) Whether Safari should allow links to open in new windows. Default keeps current sim setting. true or false keepKeyChains (Sim-only) Whether to keep keychains (Library/Keychains) when appium session is started/finished true or false localizableStringsDir Where to look for localizable strings. Default en.lproj en.lproj processArguments Arguments to pass to the AUT using instruments e.g., -myflag interKeyDelay The delay, in ms, between keystrokes sent to an element when typing. e.g., 100 showIOSLog Whether to show any logs captured from a device in the appium logs. Default false true or false sendKeyStrategy strategy to use to type test into a test field. Simulator default: oneByOne. Real device default: grouped oneByOne, grouped or setValue screenshotWaitTimeout Max timeout in sec to wait for a screenshot to be generated. default: 10 e.g., 5 waitForAppScript The ios automation script used to determined if the app has been launched, by default the system wait for the page source not to be empty. The result must be a boolean e.g. true;, target.elements().length > 0;, $.delay(5000); true; webviewConnectRetries Number of times to send connection message to remote debugger, to get webview. Default: 8 e.g., 12 appName The display name of the application under test. Used to automate backgrounding the app in iOS 9+. e.g., UICatalog 以上,来自官方文档~~

优秀的个人博客,低调大师

python监控服务器信息

本文转载自http://www.linuxtone.org/thread-29256-1-1.html 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 #coding:utf-8 #by_wangyi #by:QQ917611 #QQ群:251289157 import psutil import time import os import sys import re stats = [ 0 , 1 ] stoptimes = 2 if len (sys.argv)> 1 : interface = sys.argv[ 1 ] else : interface = 'eth0' class Monitor: def __init__( self ,user_uid,stoptime): self .user_uid = user_uid self .stoptime = stoptime if user_uid = = 0 : print "请使用root用户运行此脚本" exit() def meminfo( self ,used_vm,free_vm,buffers,cached): total = psutil.virtual_memory().total / 1024 / 1024 used = used_vm - (buffers + cached) free = total - used print "totalmem:%sM" % total print "usedmem:%sM" % used print "freemem:%sM" % free def diskinfo( self ): list = [] for i in psutil.disk_partitions(): list .append(i[ 1 ]) for k in range ( len ( list )): total = "%-15s分区\ttotal:%s" % ( list [k],psutil.disk_usage( list [k]).total / 1024 / 1024 / 1024 ) used = "used:%s" % (psutil.disk_usage( list [k]).used / 1024 / 1024 / 1024 ) free = "free:%s" % (psutil.disk_usage( list [k]).free / 1024 / 1024 / 1024 ) print "%sG\t%sG\t%sG" % (total,used,free) def cpuinfo( self ): with open ( '/proc/loadavg' )asf: loadavg = f.read() print "5分钟cpuload:%s" % (loadavg.split()[ 0 ]) print "10分钟cpuload:%s" % (loadavg.split()[ 1 ]) print "15分钟cpuload:%s" % (loadavg.split()[ 2 ]) print "当前运行proc:%s" % (loadavg.split()[ 3 ].split( '/' )[ 0 ]) print "最后运行pid:%s" % (loadavg.split()[ 4 ]) print '当前cpu%s' % (psutil.cpu_percent()) def flowinfo( self ): f = open ( '/proc/net/dev' , 'r' ).readlines() for i in f: if re.search(interface,i): rx = i.split( ':' )[ 1 ].split()[ 0 ] tx = i.split()[ 8 ] stats[ 0 ] = rx stats[ 1 ] = tx used_vm = psutil.virtual_memory().used / 1024 / 1024 free_vm = psutil.virtual_memory().free / 1024 / 1024 buffers = psutil.virtual_memory().buffers / 1024 / 1024 cached = psutil.virtual_memory().cached / 1024 / 1024 if __name__ = = '__main__' : user_uid = os.geteuid() stoptime = 2 task = Monitor(user_uid,stoptime) print "servermeminfo:\n" task.meminfo(used_vm,free_vm,buffers,cached) print "==================================" print "serverdiskinfo:\n" task.diskinfo() print "===================================" print "servercpuinfo:\n" task.cpuinfo() print "===================================" print "serverflowinfo:\n" task.flowinfo() RX_one = float (stats[ 0 ]) TX_one = float (stats[ 1 ]) time.sleep(stoptimes) task.flowinfo() RX_two = float (stats[ 0 ]) TX_two = float (stats[ 1 ]) RX_rate = round ( float (RX_two - RX_one) / 1024 , 2 ) TX_rate = round ( float (TX_two - TX_one) / 1024 , 2 ) print time.strftime( "%Y-%m-%d%H:%M:%S" ), 'RXbytes=' ,RX_rate, 'KB' print time.strftime( "%Y-%m-%d%H:%M:%S" ), 'TXbytes=' ,TX_rate, 'KB'

优秀的个人博客,低调大师

Centos7搭建Hadoop服务

下载Hadoop 官网:http://hadoop.apache.org/releases.html 先配置jdk环境(教程:https://www.idaobin.com/archives/117) 下载以后 解压到到/usr/local tar -zxvf hadoop-2.8.0.tar.gz -C /usr/local 为了方便操作 把hadoop-2.8.0 改为hadoop mv /usr/local/hadoop-2.8.0 /usr/local/hadoop 查看主机名 hostname //第一个参数为主机名 检查是否可以免密码 ssh localhost //这里的localhost为主机名 注意:一般初次安装都需要密码 ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys 再次验证 ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys 注意:如没有Enter password 就说明免密码了 配置环境变量 vim /etc/profile 末尾添加 export HADOOP_HOME=/usr/local/hadoop export PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:$HADOOP_HOME/bin 使环境变量立即生效 source /etc/profile 创建Hadoop的临时文件存放地 mkdir /usr/local/hadoop/tmp 编辑Hadoop的配置文件 cd /usr/local/hadoop/etc/hadoop/ vim hadoop-env.sh 末尾添加 export JAVA_HOME=/usr/local/java/jdk1.8.0_131/ export HADOOP_CONF_DIR=/usr/local/hadoop/etc/hadoop 注意:路径要对 使环境变量立即生效 source hadoop-env.sh 配置另一个文件 vim core-site.xml 在<configuration></configuration>中添加以下内容 <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>file:/usr/local/hadoop/tmp</value> </property> 配置下一个文件 hdfs-site.xml vim hdfs-site.xml 在<configuration></configuration>中添加以下内容 <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/usr/local/hadoop/tmp/dfs/name</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/usr/local/hadoop/tmp/dfs/data</value> </property> 配置下一个文件mapred-site.xml 因为这个文件默认不存在 我们把mapred-site.xml.template作为模板来配置 cp mapred-site.xml.template mapred-site.xml vim mapred-site.xml 在<configuration></configuration>中添加以下内容 <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> 配置下下个文件yarn-site.xml vim yarn-site.xml 在<configuration></configuration>中添加以下内容 <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> 配置最后一个文件yarn-env.sh vim yarn-env.sh 注意:在第23行左右 export JAVA_HOME (删除# 去掉注释),并更改正确jdk的路径 格式化namenode cd /usr/local/hadoop bin/hdfs namenode-format 注意:成功的话,会看到 “successfully formatted” 和 “Exitting withstatus 0” 的提示,若为 “Exitting with status 1” 则是出错了 通过脚本启动hdfs sbin/start-dfs.sh 打开浏览器访问http://localhost:50070,验证是否hdfs配置成功 再来启动yarn sbin/start-yarn.sh 打开浏览器访问http://localhost:8088,验证yarn是否配置成功 注意:由于浏览器存在缓存问题 打开地址可能会失败关闭浏览器 重新打开一两次就好,如果还是失败 检查配置文件是否有误 查看已启动的hadoop进程 jps 注意:如果没有 NameNode 或 DataNode ,那就是配置不成功

优秀的个人博客,低调大师

Linux服务器性能查看

一、CPU性能查看 1、查看物理cpu个数: #cat /proc/cpuinfo |grep "physical id"|sort|uniq|wc -l 2、查看每个物理cpu中的core个数: #cat /proc/cpuinfo |grep "cpu cores"|wc -l 3、逻辑cpu的个数: #cat /proc/cpuinfo |grep "processor"|wc -l 物理cpu个数*核数=逻辑cpu个数(不支持超线程技术的情况下) 二、内存查看 1、查看内存使用情况: #free -m 三、硬盘查看 1、查看硬盘及分区信息: #fdisk -l 2、查看文件系统的磁盘空间占用情况: #df -h 3、查看硬盘的I/O性能(每隔一秒显示一次,显示5次): #iostat -x 1 5 4、查看linux系统中某目录的大小: #du -sh /root 如发现某个分区空间接近用完,可以进入该分区的挂载点,用以下命令找出占用空间最多的文件或目录,然后按照从大到小的顺序,找出系统中占用最多空间的前10个文件或目录: #du -cksh *|sort -rn|head -n 10 四、查看平均负载 有时候系统响应很慢,但又找不到原因,这时就要查看平均负载了,看它是否有大量的进程在排队等待 #uptime 还有动态命令: #top eg: top - 21:33:09 up 1:00, 1 user, load average: 0.00, 0.01, 0.05 如果每个逻辑cpu当前的活动进程不大于3,则系统性能良好 如果每个逻辑cpu当前的活动进程不大于4,表示可以接受 如果每个逻辑cpu当前的活动进程大于5,则系统性能问题严重 一般计算方法:负载值/逻辑cpu个数 还可以结合vmstat命令来判断系统是否繁忙procs/memeory/swap/io/system/cpu 五、其他参数 查看内核版本号: #uname -a 简化命令: #uname -r 查看系统是32位还是64位的: #file /sbin/init 查看发行版: #cat /etc/issue 或 #lsb_release -a 查看系统已载入的相关模块: #lsmod 查看pci设置: #lspci

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

用户登录
用户注册