使用adb和cmdline简化Android应用测试

Hello there,

你好,

If you have been testing mobile apps on the android platform, chances are there are some common workflows/steps that you follow to enable you to test effectively.

如果您已经在android平台上测试了移动应用程序,则可能需要遵循一些通用的工作流程/步骤才能有效地进行测试。

Most of these are done as you get set up or are in the middle of actually testing the feature/functionality on the app.

其中大多数操作都是在您设置好功能后或正在实际测试应用程序的功能时进行。

Some of these include:

其中一些包括:

  • Copy the apk file over to the real device using Android File Transfer (on mac) while ensuring that the MTP mode is enabled for file transfer in the first place

    使用Android File Transfer (在Mac上)将apk文件复制到真实设备上,同时确保首先启用MTP模式进行文件传输

  • Installing the build by finding it in the sdcard folder

    通过在sdcard文件夹中找到它来安装构建

  • Capture any crash logs that occur while you are testing the app

    捕获测试应用程序时发生的所有崩溃日志
  • If you notice a bug, then take a screenshot

    如果发现错误,请截图
  • While pairing with another dev/tester, require to share the real device screen, (You might be using Vysor for this but the loss of quality in the free version is simply annoying)

    与另一位开发人员/测试人员配对时,需要共享真实的设备屏幕,(您可能为此使用了Vysor ,但是免费版本中的质量损失简直令人讨厌)

  • Take videos of the test execution cycle.

    拍摄测试执行周期的视频。

Now, some or most of these flows can be performed via Android studio by using the logcat control, however, the caveat is that Android Studio/running emulator is quite a performance intensive task and captures a lot of memory

现在,这些流程中的某些或大多数流程可以通过使用logcat控件通过Android Studio执行,但是需要注意的是,Android Studio /运行模拟器是一项性能密集型任务,需要占用大量内存

If you are running other demanding applications like IntelliJ, Pycharm, and possibly Docker then it can quickly slow down your machine considerably and bring you close to the point of frustration.

如果您正在运行其他要求苛刻的应用程序,例如IntelliJ,Pycharm,甚至可能是Docker,那么它可能会Swift显着降低计算机的速度,并使您感到沮丧。

Image for post

Well, we don’t want that to happen to us, do we?

好吧,我们不希望这种情况发生在我们身上,对吗?

As testers, we owe it to ourselves to solve some of these pains or to make it easy. Turns out after a little bit of digging and some pointers from friendly android devs in my current team, I was able to figure out some easy workarounds to accomplish all these tasks All via command line and adb… 👨🏻‍💻

作为测试人员,我们应该自己解决一些难题或使其变得简单。 经过一番挖掘和我当前团队中友好的android开发人员的一些提示后,我发现了一些简单的解决方法,可以通过命令行和adb完成所有这些任务

Sweet. Let's get started.

甜。 让我们开始吧。

前提条件 (Pre-requisite)

Most of the comman

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值