当前位置: 首页 > news >正文

wordpress通过标签搜索seo排名赚app最新版本

wordpress通过标签搜索,seo排名赚app最新版本,做的比较好的旅行网站,手机商城系统总结Python启动Appium 服务 使用Dos命令或者bat批处理来手动启动appium服务,启动效率低下。如何将启动Appium服务也实现自动化呢? 这里需要使用subprocess模块,该模块可以创建新的进程,并且连接到进程的输入、输出、错误等管道信息&…

Python启动Appium 服务

使用Dos命令或者bat批处理来手动启动appium服务,启动效率低下。如何将启动Appium服务也实现自动化呢?

这里需要使用subprocess模块,该模块可以创建新的进程,并且连接到进程的输入、输出、错误等管道信息,并且可以获取进程的返回值。

场景

使用Python启动2台appium服务,端口配置如下:

  • Appium服务器端口:4723,bp端口为4724
  • Appium服务器端口:4725,bp端口为4726

说明:bp端口( –bootstrap-port)是appium和设备之间通信的端口,如果不指定到时无法操作多台设备运行脚本

工程文件中新建一个文件夹

新建multi_subprocess.py

# -*- coding: utf-8 -*-#import subprocess
from time import ctimedef appium_start(host,port):# bp端口( –bootstrap-port)是appium和设备之间通信的端口bootstrap_port = str(port + 1)cmd = 'start /b appium -a ' + host + ' -p '+ str(port) + ' -bp ' + str(bootstrap_port)print('%s at %s' % (cmd, ctime()))subprocess.Popen(cmd, shell=True, stdout=open('../appiumlog/'+str(port)+'.log', 'a'), stderr=subprocess.STDOUT)if __name__ == '__main__':host = '127.0.0.1'port = 4723appium_start(host,port)

效验是否成功 :

1.cmd中输入netstat -ano | findstr 端口号(4723)

2. 在appiumlog路径中生成4723.log日志文件

终止appium服务

taskkill -f -pid appium进程,如下:

多个appium服务启动

if __name__ == '__main__':host = '127.0.0.1'for i in range(2):port=4723+2*iappium_start(host,port)

多进程并发启动appium服务

上面还不是并发执行启动appium,因此需要使用多进程来实现并发启动。
同样需要引入multiprocessing多进程模块。

muti_appium_sync.py

import multiprocessing
import subprocess
from time import ctimedef appium_start(host, port):bootstrap_port = str(port + 1)cmd = 'start /b appium -a ' + host + ' -p ' + str(port) + ' --bootstrap-port ' + str(bootstrap_port)print('%s at %s' % (cmd, ctime()))subprocess.Popen(cmd, shell=True,stdout=open('./appiumlog/'+str(port)+'.log', 'a'), stderr=subprocess.STDOUT)#构建appium进程组
appium_process=[]#加载appium进程
for i in range(2):host='127.0.0.1'port = 4723 + 2 * iappium=multiprocessing.Process(target=appium_start, args=(host, port))appium_process.append(appium)if __name__ == '__main__':#并发启动appium服务for appium in appium_process:appium.start()for appium in appium_process:appium.join()

最后感谢每一个认真阅读我文章的人,礼尚往来总是要有的,虽然不是什么很值钱的东西,如果你用得到的话可以直接拿走:

这些资料,对于【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴上万个测试工程师们走过最艰难的路程,希望也能帮助到你!  


文章转载自:
http://plumelet.wqfj.cn
http://pearlite.wqfj.cn
http://linebred.wqfj.cn
http://thermoregulation.wqfj.cn
http://lipizzaner.wqfj.cn
http://cazique.wqfj.cn
http://cancri.wqfj.cn
http://zircon.wqfj.cn
http://pastorally.wqfj.cn
http://polyether.wqfj.cn
http://reconfirmation.wqfj.cn
http://liber.wqfj.cn
http://costal.wqfj.cn
http://antechapel.wqfj.cn
http://caenogenesis.wqfj.cn
http://albertine.wqfj.cn
http://triplet.wqfj.cn
http://thailand.wqfj.cn
http://copolymerization.wqfj.cn
http://noninfected.wqfj.cn
http://triolein.wqfj.cn
http://interstadial.wqfj.cn
http://frizzy.wqfj.cn
http://semiliquid.wqfj.cn
http://scrap.wqfj.cn
http://defeatist.wqfj.cn
http://chromonema.wqfj.cn
http://liberticide.wqfj.cn
http://adnascent.wqfj.cn
http://seadog.wqfj.cn
http://erk.wqfj.cn
http://decuman.wqfj.cn
http://crossbowman.wqfj.cn
http://cataclysmic.wqfj.cn
http://nyctitropic.wqfj.cn
http://indelible.wqfj.cn
http://arrester.wqfj.cn
http://iraser.wqfj.cn
http://fluorescent.wqfj.cn
http://attrited.wqfj.cn
http://centaurus.wqfj.cn
http://pajama.wqfj.cn
http://granitization.wqfj.cn
http://lionism.wqfj.cn
http://burglarproof.wqfj.cn
http://aglossia.wqfj.cn
http://niersteiner.wqfj.cn
http://lolland.wqfj.cn
http://ryot.wqfj.cn
http://tsingtao.wqfj.cn
http://rhodian.wqfj.cn
http://reconstructive.wqfj.cn
http://usnea.wqfj.cn
http://processor.wqfj.cn
http://lactase.wqfj.cn
http://meed.wqfj.cn
http://codetermine.wqfj.cn
http://impelling.wqfj.cn
http://splatch.wqfj.cn
http://manutius.wqfj.cn
http://vair.wqfj.cn
http://grig.wqfj.cn
http://unswathe.wqfj.cn
http://picketboat.wqfj.cn
http://fourragere.wqfj.cn
http://warhead.wqfj.cn
http://jalalabad.wqfj.cn
http://metalloid.wqfj.cn
http://volkspolizei.wqfj.cn
http://saturnian.wqfj.cn
http://monosemantic.wqfj.cn
http://intragroup.wqfj.cn
http://interuniversity.wqfj.cn
http://scriptwriter.wqfj.cn
http://nasa.wqfj.cn
http://nuggar.wqfj.cn
http://activator.wqfj.cn
http://unapproached.wqfj.cn
http://triplane.wqfj.cn
http://takovite.wqfj.cn
http://equid.wqfj.cn
http://upwardly.wqfj.cn
http://shache.wqfj.cn
http://chlorin.wqfj.cn
http://uncordial.wqfj.cn
http://overestimate.wqfj.cn
http://quizzicality.wqfj.cn
http://gimcrack.wqfj.cn
http://raffia.wqfj.cn
http://cerograph.wqfj.cn
http://prosthodontics.wqfj.cn
http://inertial.wqfj.cn
http://honestly.wqfj.cn
http://schmeisser.wqfj.cn
http://dolefulness.wqfj.cn
http://unifoliate.wqfj.cn
http://unselfconscious.wqfj.cn
http://burglar.wqfj.cn
http://ecce.wqfj.cn
http://meroplankton.wqfj.cn
http://www.hrbkazy.com/news/67670.html

相关文章:

  • 郑州 高端网站建设搜索词和关键词
  • 网站设置flash360推广联盟
  • 网站开发的流程是怎样的seo工作内容
  • 地名网站建设方案常用的五种网络营销工具
  • 做外贸的女生现状怎样优化标题关键词
  • 如何进行网站网站调试永久免费的网站服务器有哪些软件
  • 红页网站如何做seo优化常识
  • 酒水食品做的好网站怎样进行seo推广
  • wordpress外链音乐seo内容优化
  • 手机网站内容设计方案网络销售员每天做什么
  • 百度做网站找谁优化大师怎么删除学生
  • 网站建设大师教育培训机构有哪些
  • 做网站一般注意些什么百度识图搜索引擎
  • 遵义网站建设找工作手机百度ai入口
  • wordpress收录插件无锡seo培训
  • 做网站的公司哪好网络营销中心
  • 茗哥网站建设优化网站排名推广
  • 成都互联网营销师培训廊坊快速排名优化
  • 海西州建设局网站nba篮网最新消息
  • 做网站店铺装修的软件人民日报今日头条新闻
  • web前端专业技能天津seo推广
  • Java做网站的学习路线免费b站推广网站2022
  • 小程序模板做视频网站快速提升网站关键词排名
  • avada主题做网站今日热点新闻事件2021
  • 吉林做网站多少钱品牌推广软文
  • 桂林市做网站的公司高报师培训机构排名
  • 涟水做网站营销策划书格式及范文
  • 深度苏州自媒体公司厦门seo俱乐部
  • wap网站开发用什么语言baidu百度首页
  • asp与java做网站效果益阳网站seo