Testing Netflix on Android

Netflix团队在进入Android生态系统时面临了设备多样性、快速迭代和保持团队满意度的挑战。他们通过构建自动化测试框架,实现了关键场景的自动化,如登录、浏览电影目录、搜索和控制电影播放,并确保了质量分析由人类完成。此外,他们还优化了测试设备选择和团队规模,以实现快速而经济的反馈循环。
部署运行你感兴趣的模型镜像
转自:http://techblog.netflix.com/search/label/Android

Wednesday, March 14, 2012

Testing Netflix on Android


When Netflix decided to enter the Android ecosystem, we faced a daunting set of challenges: a) We wanted to release rapidly every 6-8 weeks, b) There were hundreds of Android devices of different shapes, versions, capacities and specifications which need to playback audio and video and c) We wanted to keep the team smallandhappy.

Of course, the seasoned tester in you has to admit that these are the sort of problems you like to wake up to every day and solve. Doing it with a group of other software engineers who are passionate about quality is what made overcoming those challenges even more fun.

Release rapidly

You probably guessed that automation had to play a role in this solution. However automating scenarios on the phone or a tablet is complicated when the core functionality of your application is to play back videos natively but you are using an HTML5 interface which lives in the application’s web view.

Verifying an app that uses an embedded web view to serve as its presentation platform was challenging in part due to the dearth of tools available. We considered, Selenium, AndroidNativeDriver and the Android Instrumentation Framework. Unfortunately, we could not use Selenium or the AndroidNativeDriver, because the bulk of our user interactions occur on the HTML5 front end. As a result, we decided to build a slightly modified solution.

Our modified test framework heavily leverages a piece of our product code which bridges JavaScript and native code through a proxy interface. Though we were able to drive some behavior by sending commands through the bridge, we needed an automation hook in order to report state back to the automation framework. Since the HTML document doesn’t expose its title, we decided to use the title element as our hook. We rely on the onReceivedTitlenotification as a way to communicate back to our Java code when some Javascript is executed in the HTML5 UI. Through this approach, we were able to execute a variety of tasks by injecting JavaScript into the web view, performing the appropriate DOM inspection task, and then reporting the result through the title property.

With this solution in place, we are able to automate all our key scenarios such as login, browsing the movie catalog, searching and controlling movie playback.

While we automate the testing of playback, the subjective analysis of quality is still left to the tester. Using automation we can catch buffering and other streaming issues by adding testability in our software, but at the end of the day we need a testers to verify issues such as seamless resolution switching or HD quality which are hard to achieve today using automation and also cost prohibitive.

We have a continuous build integration system that allows us to run our automated smoke tests on each submit on a bank of devices. With the framework in place, we are able to quickly ascertain build stability across the vast array of makes and models that are part of the Android ecosystem. This quick and inexpensive feedback loop enables a very quick release cycle as the testing overhead in each release is low given the stakes.

Device Diversity
To put device diversity in context, we see almost around 1000 different devices streaming Netflix on Android every day. We had to figure out how to categorize these devices in buckets so that we can be reasonably sure that we are releasing something that will work properly on these devices. So the devices we choose to participate in our continuous integration system are based on the following criteria.
  • We have at least one device for each playback pipeline architecture we support (The app uses several approaches for video playback on Android such as hardware decoder, software decoder, OMX-AL, iOMX).
  • We choose devices with high and low end processors as well as devices with different memory capabilities.
  • We have representatives that support each major operating system by make in addition to supporting custom ROMs (most notably CM7, CM9).
  • We choose devices that are most heavily used by Netflix Subscribers.


With this information, we have taken stock of all the devices we have in house and classified them based on their specs. We figured out the optimal combination of devices to give us maximum coverage. We are able to reduce our daily smoke automation devices to around 10 phones and 4 tablets and keep the rest for the longer release wide test cycles.

This list gets updated periodically to adjust to the changing market conditions. Also note that this is only the phone list, we have a separate list for tablets. We have several other phones that we test using automation and a smaller set of high priority tests, the list above goes through the comprehensive suite of manual and automation testing.

To put it other way, when it comes to watching Netflix, any device other than those ten devices can be classified with the high priority devices based on their configuration. This in turn helps us to quickly identify the class of problems associated with the given device.

Small Happy Team
We keep our team lean by focusing our full time employees on building solutions that scale and automation is a key part of this effort.When we do an international launch, we rely on crowd-sourcing test solutions like uTest to quickly verify network and latency performance. This provides us real world insurance that all of our backend systems are working as expected.These approaches give our team time to watch their favorite movies to ensure that we have the best mobile streaming video solution in the industry.

In a future post, we will discuss our iOS test process which provides its own unique set of technical challenges.

Amol Kheris the Engineering Manager in Tools for the Android, iOS and AppleTV teams. If you are interested in joining Netflix or the Mobile team, apply at www.netflix.com/jobs.

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

Android 14 系统上配置 Netflix 的无障碍助手功能,主要涉及使用系统自带的无障碍工具以及 Netflix 应用内提供的辅助功能选项。以下是详细的设置与使用方法: Netflix 应用本身支持多种辅助功能,包括屏幕阅读器(如 TalkBack)、字幕和音频描述等。Android 14 提供了更强大的无障碍服务管理功能,允许用户自定义特定应用的无障碍权限。 ### 启用 TalkBack 屏幕阅读器 TalkBack 是 Android 自带的屏幕阅读器,适用于视障用户操作界面[^1]: 1. 打开 **设置 > 辅助功能 > 讲述人(TalkBack)**。 2. 开启 TalkBack,并按照引导完成设置。 3. 在启用状态下,TalkBack 会朗读 Netflix 应用中的菜单、剧集标题和播放控制项。 ### 配置字幕和音频描述 对于听障或语言障碍用户,Netflix 支持字幕和音频描述功能: - 进入 **Netflix 应用 > 个人资料设置 > 字幕与音频语言偏好**。 - 可选择默认字幕语言、隐藏式字幕样式,以及开启“强制显示字幕”选项。 - 对于支持音频描述的内容,可在播放页面点击音轨切换至带有音频描述的轨道。 ### 使用第三方无障碍服务 某些第三方无障碍插件可增强 Netflix 的交互体验,例如通过语音控制播放暂停、快进等操作。安装此类插件后,需前往 **设置 > 辅助功能** 中启用对应的服务。 ### 限制无障碍权限给 Netflix 如果只想让某个无障碍服务作用于 Netflix,可以通过以下步骤限制其应用范围: 1. 前往 **设置 > 辅助功能 > 无障碍服务**。 2. 选择已启用的服务,点击“应用限制”。 3. 添加 Netflix 至白名单,确保该服务仅对 Netflix 生效。 ```java // 示例代码:检查当前是否启用 TalkBack 服务 AccessibilityManager accessibilityManager = (AccessibilityManager) getSystemService(Context.ACCESSIBILITY_SERVICE); boolean isTalkBackEnabled = accessibilityManager.isTouchExplorationEnabled(); ``` ### 调整字体大小和显示设置 Android 14 允许全局调整字体大小,有助于低视力用户更好地阅读界面内容: - 前往 **设置 > 显示 > 字体与显示大小**。 - 调整字体大小滑块以适应观看需求。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值