利用Unity Cloud Build测试大型项目

本文讲述了Unity团队如何使用Unity Cloud Build自动化大型项目测试,从而提高效率。在Unity 5开发过程中,手动测试大型项目既耗时又繁琐,但Unity Cloud Build的出现改变了这一状况。现在,通过简单操作,测试者可以快速构建并测试所有支持平台的项目,大大节省了时间和资源。此外,Unity Cloud Build还可以配置为自动监测代码仓库变化并重建项目,以适应不同Unity版本。未来,团队计划通过集成更多设备测试服务,以解决移动设备碎片化带来的测试挑战。
摘要由CSDN通过智能技术生成

This is a story about how we are using Unity Cloud Build internally and how it can make life easier for you, our users, as well. Read on to learn how we used to deal with large project testing and which awesome new possibilities are available now!

这是关于我们如何在内部使用Unity Cloud Build以及如何使您和我们的用户的生活变得更轻松的故事。 继续阅读以了解我们过去如何处理大型项目测试,以及现在有哪些令人敬畏的新可能性!

Once upon a time

很久以前

During development of the massive Unity 5 release, and the extensive changes it entailed, we frequently ran into issues with importing and building projects. For Unity 5 we wanted a cleaner API, which in some cases meant we had to break backwards compatibility. Often, when importing an older project in Unity 5, we had to fix scripts manually. We were also hitting major bugs and regressions in graphics, physics and performance related areas.

在开发庞大的Unity 5版本及其带来的广泛更改的过程中,我们经常遇到导入和构建项目的问题。 对于Unity 5,我们需要一个更简洁的API,这在某些情况下意味着我们必须打破向后兼容性。 通常,在Unity 5中导入较旧的项目时,我们不得不手动修复脚本。 我们还遇到了图形,物理和性能相关领域中的重大错误和回归。

Our testers do a very good job at making sure that projects import, build and run properly in every new build on all our supported platforms, but since we are constrained by time we usually used small projects (like AngryBots or Nightmares) to run these tests. These projects don’t cover many of Unity’s features – any of which might break in a new version – and they are nowhere close to the size and complexity of some of the projects developed by our users.

我们的测试人员在确保项目在所有支持的平台上的每个新版本中都能正确导入,构建和运行方面做得非常出色,但是由于我们受时间的限制,我们通常使用小型项目(例如AngryBotsNightmares )来运行这些测试。 这些项目没有涵盖Unity的许多功能-任何功能都可能会在新版本中中断-并且与我们的用户开发的某些项目的规模和复杂性相去甚远。

We were fortunate enough to have a few major studios share the full project folders for some of their completed games with us (for example, Republique) and we started manually importing and building these games on every new build during the beta and release candidate phases of development. We found and fixed many issues before any of our users would have been affected by them, but it was a tedious and time-consuming task.

我们很幸运,有几个主要工作室与我们共享一些已完成游戏的完整项目文件夹(例如Republique ),我们开始在Beta的Beta版和发行候选阶段中,在每个新版本上手动导入和构建这些游戏。发展。 我们发现并解决了许多问题,而我们的任何用户都没有受到他们的影响,但这是一个繁琐且耗时的任务。

This is how the testing process worked back then:

这就是当时的测试过程:

    This was usually done by one person and it could take a few days.

    这通常是由一个人完成的,可能需要几天时间。

    The glorious present

    光荣的礼物

    We quickly started discussing how we could automate some of this. While we were busy figuring that out, in another part of the company work was underway for the official release of what is now Unity Cloud Build. Cloud Build seemed like a perfect fit for automating testing of these large projects.

    我们很快开始讨论如何使其中一些自动化。 当我们忙于弄清楚这一点时,公司的另一部分工作正在进行正式发行,现在是Unity Cloud Build 。 Cloud Build似乎非常适合自动化这些大型项目的测试。

    Fast forward to the present day,  and after we released Unity 5.1, and Cloud Build has been out there for a while, testing large projects goes through an entirely different process (described below with pictures for your viewing pleasure):

    时至今日,在我们发布Unity 5.1和Cloud Build已有一段时间之后,测试大型项目将经历一个完全不同的过程(下面介绍图片以供您欣赏):

    1. Add project to Cloud Build

    1.将项目添加到Cloud Build

    2. Press build for all supported platforms (currently Webplayer, Android and iOS with standalones and WebGl in the pipeline)

    2.为所有受支持的平台(当前为Webplayer,Android和iOS,其中包含独立版本和WebGl)进行构建

    3_receive_notification

    3. Receive an e-mail notification from Cloud Build when everything is finished

    3.一切完成后,从Cloud Build接收电子邮件通知

    4. Share the build link with any/all testers, open the link in the browser, install the app, run and profit!

    4.与任何/所有测试人员共享构建链接,在浏览器中打开链接,安装应用程序,运行并获利!

    This saves us a tremendous amounts of time, since all it requires to make the build is a few clicks and all builds for all projects are done in parallel. As soon as the builds are ready we receive the notification e-mail, and testing can begin on all platforms. If anything fails during importing or building we also get a notification and we can act on it immediately.

    这使我们节省了大量时间,因为进行构建所需的所有操作只需单击几下,并且所有项目的所有构建都是并行完成的。 构建就绪后,我们会收到通知电子邮件,并且可以在所有平台上开始测试。 如果在导入或构建过程中发生任何故障,我们也会收到通知,我们可以立即采取行动。

    Unity Cloud Build can also be configured to automatically poll a repository for changes and rebuild the projects automatically. It can rebuild projects on any supported Unity version.

    也可以将Unity Cloud Build配置为自动轮询存储库以查找更改并自动重建项目。 它可以在任何受支持的Unity版本上重建项目。

    A brighter future

    美好的未来

    Since we want to be able to scale up to testing more projects, the limiting factor now is running the builds on devices. The more projects we have in Unity Cloud Build, the more builds we have to install and run on devices.

    由于我们希望能够扩展以测试更多项目,因此现在限制因素是在设备上运行构建。 我们在Unity Cloud Build中拥有的项目越多,就必须在设备上安装和运行的构建越多。

    The biggest problem with testing on mobile is device fragmentation (especially on Android) and we can only test on a few of the most popular models. We would like to know how these builds run on most devices (including some of the more esoteric ones). To that end, we are currently investigating services like TestDroid and AppThwack.

    在移动设备上进行测试的最大问题是设备碎片(特别是在Android上),我们只能在一些最受欢迎的型号上进行测试。 我们想知道这些构建如何在大多数设备(包括一些较深奥的设备)上运行。 为此,我们目前正在研究诸如TestDroidAppThwack之类的服务。

    These services give us access to hundreds of devices and we can run our projects on any number of them. They offer a REST API that we can use to feed builds from Unity Cloud Build directly into them. What we get in return is performance data (CPU, Memory, Threading), screenshots of the game while running on the device, the ability to run custom testing scripts, get device logs and more.

    这些服务使我们可以访问数百种设备,并且我们可以在任意数量的设备上运行我们的项目。 他们提供了一个REST API,我们可以使用该API将Unity Cloud Build中的构建直接提供给它们。 我们得到的是性能数据(CPU,内存,线程),在设备上运行时的游戏截图,运行自定义测试脚本,获取设备日志等的能力。

    By feeding all this data back into our own data warehouse, we can keep track of metrics across Unity versions, projects and devices and quickly pinpoint performance, rendering, and input issues.

    通过将所有这些数据反馈到我们自己的数据仓库中,我们可以跟踪Unity版本,项目和设备的指标,并快速查明性能,渲染和输入问题。

    Example test run results from our Doll Demo project on TestDroid

    Unity Cloud Build and you

    Unity Cloud Build与您

    Unity Cloud Build is the solution of choice for us when it comes to removing all the time-consuming tasks and bottlenecks involved in importing projects to newer Unity builds, switching platforms and building projects. But we built Unity Cloud Build first and foremost with you, our users, in mind. If you are just getting started on a new Unity project, sign up for the free Cloud Build option and see how easy it is to have us do the heavy lifting for you and share the final build results with your entire team. If you are a veteran Unity user working on one or multiple projects, you will find something suitable for you in one of our other licensing options.

    在消除将项目导入到较新的Unity构建,切换平台和构建项目中所涉及的所有耗时任务和瓶颈时, Unity Cloud Build是我们的首选解决方案。 但是,我们首先牢记您和我们的用户来构建Unity Cloud Build。 如果您刚刚开始一个新的Unity项目,请注册免费的Cloud Build选项,看看让我们为您做繁重的工作并与您的整个团队共享最终的构建结果是多么容易。 如果您是从事一个或多个项目的资深Unity用户,则可以在我们的其他许可选项之一中找到适合您的内容。

    So, what are you waiting for? Give Unity Cloud Build a try! It might just be the best thing that happened to you since we introduced the Cancel Build button!

    那你还在等什么? 尝试一下Unity Cloud ! 自从我们引入了“取消构建”按钮以来,这可能是发生在您身上的最好的事情!

    翻译自: https://blogs.unity3d.com/2015/06/26/leveraging-unity-cloud-build-for-testing-large-projects/

    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

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

    抵扣说明:

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

    余额充值