是否可以在目标应用程序之外使用 detox 进行自动化测试? [英] Is it possible to do automated testing with detox outside of the target application?

查看:39
本文介绍了是否可以在目标应用程序之外使用 detox 进行自动化测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个 react-native 应用程序,并且正在尝试在 android 端构建一些特定的端到端测试.为此,我设置了排毒.不幸的是,为了正确测试,我需要查看当用户在目标应用程序之外执行操作时应用程序如何响应.

I have built a react-native application and am trying to build a few specific end-to-end tests on the android side. For this, I have setup detox. Unfortunately, to test properly, I need to see how the application responds when the user is performing actions outside of the target application.

例如我需要在目标应用程序 A 中自动单击 A,单击 android 主页按钮,在屏幕上向右滑动,然后打开应用程序 B.然后应用程序 A 应该自行打开,测试可以确认它是否已打开到右侧屏幕.

e.g. I need to automate click A within target application A, click android home button, swipe right on screen and then open application B. Application A should then open itself and the test can confirm if it has opened to the right screen.

在 Detox 中可以实现这样的事情吗?如果没有,是否有任何框架可以让我对此进行测试?

Is something like this possible within Detox? If not, are there any frameworks that would allow me to test this?

推荐答案

您想要做的是使用名为Appium"的东西而不是Detox".这是因为 Appium 与 androids uiAutomator API 接口,允许在单个应用程序之外进行自动化和测试,Detox 更多用于测试应用程序本身而不是应用程序外部的行为.

What you are wanting to do is use something called 'Appium' instead of 'Detox'. This is due to Appium interfacing with the androids uiAutomator API which allows automation and testing outside of a single application, Detox is more for testing the behaviour within the application itself rather than outside of it.

这篇关于是否可以在目标应用程序之外使用 detox 进行自动化测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆