简体   繁体   English

在移动应用程序和 Web 浏览器上并行运行测试

[英]Running tests in parallel on the mobile app and web browser

Help me guys.帮帮我,伙计们。 I need to run the e2e tests in parallel on mobile app and on the web browser, then make some changes on mobile app and check the changes on the web browser and vise versa several times.我需要在移动应用程序和网络浏览器上并行运行 e2e 测试,然后在移动应用程序上进行一些更改并检查网络浏览器上的更改,反之亦然。 I plan to use webdriver.io + appium(as a service for webdriver.io).我计划使用 webdriver.io + appium(作为 webdriver.io 的服务)。 But if exists other frameworks or tools for this, I can use them.但是如果存在其他框架或工具,我可以使用它们。

Case, for example:案例,例如:

  1. Open the web page on the browser and add some text to input field(or attach the file).在浏览器上打开网页并在输入字段中添加一些文本(或附加文件)。
  2. Open the mobile native app on mobile emulator, synchronize the data(app functionality) and check entered text.在移动模拟器上打开移动原生应用,同步数据(应用功能)并检查输入的文本。
  3. Enter text on mobile and save the changes.在移动设备上输入文本并保存更改。 Push 'Synchronize' button(or wait 5 minutes).按下“同步”按钮(或等待 5 分钟)。
  4. Switch to the opened(step 1) web page and check the entered text(or picture).切换到打开的(步骤 1)网页并检查输入的文本(或图片)。
  5. Repeat steps 1-4 several times.重复步骤 1-4 几次。

You can use wdio multi remote to achieve this.您可以使用 wdio multi remote 来实现这一点。 Your config should look like below and you can access the app with the appiumDriver.doSomething() and browser with chromeBrower.doSomething() in steps:您的配置应如下所示,您可以使用 appiumDriver.doSomething() 访问应用程序,并使用 chromeBrower.doSomething() 分步访问该应用程序:

capabilities: {
      appiumDriver: {
         port: 4723,
         capabilities: {
            // maxInstances: 1,
            platformName: 'Android',
            deviceName: 'Pixel_4',
            app: join( process.cwd(), '<path to apk>' ),
            autoGrantPermissions: true,
            appWaitActivity: '*',
            fullContextList: true,
            webviewConnectTimeout: 10000,
         },
      },
      chromeBrowser: {
         port: 4444,
         capabilities: {
            browserName: 'chrome'
         },
      },
   },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检查移动网络浏览器是在移动设备的前台还是后台运行 - how to check mobile web browser is running in foreground or background on mobile device React Web App路由未在移动浏览器上加载 - React web app route not loading on mobile browser 如何使用在桌面浏览器上运行的移动应用程序渲染移动屏幕? - How to render a mobile screen with mobile app running on desktop browser? 在断开状态下运行jQuery移动Web应用程序? - Running a jquery mobile web app in a disconnected state? 当用户离开浏览器时运行网络应用程序 - Running a web app when user leaves browser 如何检测移动浏览器或应用程序是否打开了网页? - How can I detect if a web page is opened by a mobile browser or an app? 检测在 Android Stock 浏览器上作为主屏幕应用运行的网络应用 - Detect web app running as homescreen app on Android Stock Browser 启用移动网络应用以在用户移动默认浏览器中打开链接,而不是在应用内部打开 - Enable mobile web app to open a link in user mobile default browser instead of opening inside the app 如何检测 Web 应用程序是否在 Chrome 移动设备上独立运行 - How to detect if web app running standalone on Chrome mobile 量角器并行运行导致测试失败 - Protractor parallel running leads tests to fail
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM