通过appium&命令启动appium服务器或仅使用appium是否有区别

时间:2019-12-20 03:54:40

标签: npm appium

由于我使用npm安装了appium,因此可以通过命令行使用以下命令通过以下命令启动appium服务器。

   appium &
   appium

//To change the default port 
appium & --port 9090 
appium  --port 9090 

正如我观察到的,两个命令都在做相同的事情,所以它们是相同的还是有区别?

1 个答案:

答案 0 :(得分:1)

  1. appium &

appium &在子Shell中运行Appium。

后果:

  • 您无法轻易退出该Appium会话(例如,以control + c退出。
  • 由于您无法退出它们,因此必须关闭整个终端才能关闭会话,这样您可能会遇到更多类似这样的错误:
Could not start REST http interface listener. The requested port may already be in use. Please make sure there is no other instance of this server running already.
Fatal Error: listen EADDRINUSE 127.0.0.1:4723

这就是为什么我建议在本地进行此操作的原因。 (我认为在CI上很好)

  1. appium

appium在您的终端会话中运行Appium,并实质上将该进程“锁定”到该Shell。这样一来,您就可以轻松control + c退出MacOS上的程序。我在本地推荐。

相关问题