并且很难用集成测试模拟代码需要正确处理的所有临界情况。
It's also hard to use integration tests to stimulate all of the edge cases that your code should handle properly.
美国科罗拉多州国家大气研究中心的科学家宣布,他们计划与日本地球模拟中心合作,转换美国气象模拟代码,使之和这台新计算机兼容。
Research in Boulder, Colo., said they were planning to work with the Japanese earth simulation center to convert United States weather modeling codes to work with the new computer.
这些类型的测试提供了模拟的客户环境中的产品代码稳定性置信度。
These types of tests provided confidence of the stability of the product code in simulated customer environments.
然后,无需进一步修改,就可以立即回放这些代码来执行简单模拟测试。
You can then immediately play back this code with no further revision necessary to perform simple simulation testing.
即使在这些系统可用时,测试数据也可能不适于使用所有代码路径;也就是说,模拟一些错误条件可能会很困难。
Even when such systems are available, the test data may not be suitable for exercising all code paths; that is, it may be difficult to simulate some error conditions.
因此,如果您模拟多个同时运行此代码的客户机,那么就会重现死锁场景。
Hence, if you simulate multiple clients running this code simultaneously, then the deadlock problem is recreated.
只需选择两种颜色,然后就会得到你想要模拟的效果的十六进制代码。
Just choose two colors, and then the effect you want to simulate to get the resulting hex code.
大多数情况下,我只是简单的模拟它们,而不是重写代码。
In most cases I simply emulated them, rather then rewriting the code.
通过这些代码,您就实现了一个旋转投射的简单模拟。
With this small amount of code, you've implemented a simple simulation of a rotating projectile.
编写模拟用户与GUI交互的代码会很繁琐且易出错。
Writing code that simulates user interaction with GUIs can be tedious and error-prone.
我们已经建立了模拟sca组件的需求(如人工任务和外部服务),以便它们可以在BPEL流程中驱动特定的代码路径。
We have established the need to emulate SCA components such as human tasks and external services so that they can drive particular code paths in the BPEL process.
然后我们可以通过向结构添加代码、进行填充并返回一个适当的数据对象来完成功能性模拟对象的创建。
We can then complete the creation of a functioning mock object by adding code to construct, populate, and return a suitable data object.
清单3给出模拟设备对象的代码。
我们的测试代码,特别是模拟对象,使我们能完全控制数据库结果。
Our test code, specifically the mock objects, give us total control over the database results.
协调程序团队将服务测试作为服务使用者可以进行的工作的示例,并在实际的服务仍然处于开发过程的同时使用服务模拟对其代码进行测试。
The coordinator teams employ the service tests as examples of what the service consumers can do and the service mocks to test their code while the real services are still being developed.
使用默认行为的描述性html元素可以避免用大量代码模拟通用DIV的行为。
Using descriptive HTML elements with default behavior saves a lot of time writing JavaScript code to simulate the behavior with general-purpose DIVs.
上面的模拟引擎是脚本环境(真实模拟的代码)。
Above the simulation engine is the script environment (the code for the actual simulation).
RationalGUI自动化工具有很好的记录器功能,可以记录用户的活动,并自动生成代码来模拟这些活动。
The Rational GUI automation tool has a wonderful recorder feature that records a user's activities and automatically generates code that simulates these activities.
这次测试是在一个WindowsXP双核笔记本计算机上执行的,使用DB 2 V 9.1代码库,模拟几个只由connect语句组成的DB 2命令行处理程序作业流。
This test was performed on a Windows XP dual-core laptop, using DB2 V9.1 code base, simulating several DB2 command line processor job streams that consisted exclusively of connect statements.
上述代码定义了Customer类的操作,但我们需要在运行模拟之前,创建一些实际的顾客对象。
The above code defines what a Customer class does, but we need to create some actual customer objects before we run a simulation.
通过在这些前端和后端驱动程序中的virtio,为开发模拟设备提供标准化接口,从而增加代码的跨平台重用率并提高效率。
These front-end and back-end drivers are where virtio comes in, providing a standardized interface for the development of emulated device access to propagate code reuse and increase efficiency.
清单4的代码在模拟应用程序运行的同时捕获性能度量指标。
The code simulates an application run while capturing performance metrics.
如果服务更复杂(如无状态会话Bean或SOAPWeb服务),此POJO代码仍然可以作为更复杂的模拟实现的基础。
If the service is something more complex, like a stateless session bean or a SOAP Web service, this POJO code still serves as the basis for the more complex mock implementation.
在开发过程中使用的是托管模式,它是一个模拟器,通过它可以同时模拟客户机和服务器代码,在开发时使部署大为简化。
You use hosted mode during development; it's an emulator with which you can simulate both client and server code at once, dramatically simplifying deployment while you are developing.
请仔细研究,如果愿意的话,您也可以在自己的WTK模拟器中运行这段代码以查看输出。
Study it carefully, and then run the code in your WTK emulator to view the output if you like.
软件开发就是使用代码来模拟现实世界。
Software development is about modeling the real world in code.
我们大约需要编写50行代码来真正执行我们在模拟对象类中所需的行为。
We had to write approximately 50 lines of code that actually implemented the behavior we needed in our mock object classes.
在任何情况下,模拟实现肯定都不应该试图处理每个可能的股票代码或访问具有实时数据的数据库。
In any event, the mock implementation should definitely not try to handle every possible stock symbol or access a database with real-time data.
访问实际硬件(卡)寄存器的代码现在应该进行一些修改,访问模拟设备寄存器的本地变量。
The code that accesses the actual card registers should now be changed to access the local variables that mimic the device's registers.
模拟对象将模仿出于指导代码执行的惟一目的而编写的类的行为,以便它在测试时符合代码执行要求。
Mock objects mimic the behavior of classes written with the sole purpose of guiding code execution so that it falls within those areas under test.
应用推荐