unity系统测试工具_Unity测试工具发布

unity系统测试工具

Through the past 2 years Unity QA has expanded and built tools, frameworks, and test rigs for internal use, something we have previously blogged about. Through all this work we have done, we have created a lot of value internally in Unity and we want to give our users access to these awesome tools. Today we have released version one of the Unity Test Tools on the Asset Store. Get it here:

在过去的两年中,Unity QA扩展并构建了供内部使用的工具,框架和测试平台,这是我们之前写过的博客 。 通过我们完成的所有工作,我们在Unity内部创造了很多价值,我们希望为我们的用户提供使用这些出色工具的权限。 今天,我们在Asset Store上发布了Unity测试工具的版本一。 在这里获取:

Thus we made the decision to make Unity Test Tools available for our users, which we hope will help you attain a high quality in your code while developing your games.

因此,我们决定为用户提供Unity测试工具,我们希望它可以帮助您在开发游戏时获得高质量的代码。

单元测试 (Unit Test)

The lowest and most efficient level to do automation is at the unit level. We have decided to use nUnit as the basis for our unit test framework, which is a well known framework for those already writing unit tests.

进行自动化的最低和最高效的级别是在单元级别。 我们已经决定使用nUnit作为我们的单元测试框架的基础,对于那些已经编写单元测试的人来说,这是一个众所周知的框架。

We have ensured that the integration to the editor is intuitive and simple, with the option of having automatic execution on every recompile, so you have immediate feedback while you write your code. Another important aspect of a test framework is the ability to make a build pipeline where unit tests are executed without a head and the Unity Test Tools give you this option as well.

我们确保与编辑器的集成是直观且简单的,并且可以选择在每次重新编译时自动执行,因此在编写代码时可以立即获得反馈。 测试框架的另一个重要方面是能够建立构建管道的能力,在该构建管道中无需头就可以执行单元测试,并且Unity Test Tools也为您提供此选项。

整合测试 (Integration Test)

In order for you to test the integration between components, objects and assets, you need a higher level of tests and for this we have made the Integration Test Framework. Integration tests are also the easiest way of starting to write automation tests on a game in development, since they don’t have requirements on the architecture of the code.

为了测试组件,对象和资产之间的集成,您需要更高级别的测试,为此,我们制定了集成测试框架。 集成测试也是开始在开发中的游戏上编写自动化测试的最简单方法,因为它们对代码的体系结构没有要求。

The simplest use of these would be to make a scene, use assets and gameobjects, and set up the conditions you want to verify. The execution is as simple as with the unit tests, where the execution will cycle through the scenes containing tests and execute each test for you. This framework can also be integrated into a build pipeline seamlessly, so you can test all levels of your project from commandline.

最简单的用途是制作场景,使用资产和游戏对象并设置要验证的条件。 执行与单元测试一样简单,在单元测试中,执行将循环浏览包含测试的场景并为您执行每个测试。 该框架也可以无缝集成到构建管道中,因此您可以从命令行测试项目的所有级别。

断言组件 (Assertion Component)

The assertion component is able to monitor the state of gameobjects while in playmode and pause the game if the condition is met. The primary use is debugging, where you can make the game stop in the exact frame the condition is met, thus enabling you to see the entire picture of when it occurs.

断言组件能够在处于游戏模式时监视游戏对象的状态,并在满足条件时暂停游戏。 主要用途是调试,您可以在其中将游戏停在符合条件的确切帧中,从而使您可以看到发生该事件的全貌。

To help manage the assertion components, we have added an explorer which is similar to a list of breakpoints in code, so you have an overview of the states and where the components are placed. The component can evaluate complex conditions runtime and thus is more powerful than a normal breakpoint.

为了帮助管理断言组件,我们添加了一个资源管理器,该资源管理器类似于代码中的断点列表,因此您可以概览状态以及组件的放置位置。 该组件可以评估复杂条件的运行时,因此比正常的断点更强大。

In order to enable the build and release pipeline, we have made it possible for you to disable assertion components in release builds, thus making sure you don’t hit them in a released game.

为了启用构建和发布管道,我们使您可以禁用发布构建中的断言组件,从而确保您不会在发布的游戏中命中它们。

例子 (Examples)

In the package you download you will find a full set of examples and a comprehensive documentation on how each of the tools work.

在下载的软件包中,您将找到全套示例以及有关每种工具如何工作的全面文档。

未来 (The Future)

Releasing the tools is just the beginning for us. We will be committed to release tutorials and patterns which will help you structure your projects such that they are testable. We will also continue improving on the tools and increase integration into Unity, all with the aim of making it easy for you to start testing your projects.

释放工具只是我们的开始。 我们将致力于发布教程和模式,以帮助您构建可测试的项目。 我们还将继续改进工具,并增加与Unity的集成,所有这些目的都是为了使您轻松开始测试项目。

Happy testing!

测试愉快!

翻译自: https://blogs.unity3d.com/2013/12/18/unity-test-tools-released/

unity系统测试工具

相关文章: