AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.04.2009, 01:06   #1  
Blog bot is offline
Blog bot
Участник
 
25,510 / 847 (80) +++++++
Регистрация: 28.10.2006
mfp: AX6 sneak preview - X++ Unit test improvements
Источник: http://blogs.msdn.com/mfp/archive/20...rovements.aspx
==============
These days the first milestone of AX6 is being completed. It means the first wave of new functionality has been implemented, tested and documented. As always; it is an exciting time to be working on AX...

One of the features coming in MorphX in AX6 is set of improvements in the X++ Unit Test framework.

First of all the unit test framework in AX6 is leveraging the new attribute feature in the X++ langauge. For example; you can use an attribute to declaratively specify the target class for your test (i.e. the class that is being tested by this unit test). Here is how:

[SysTestTargetAttribute('MyClass')]
class MyTestCase extends SysTestCase
{
}

Starting in AX6; you can also use attributes to mark which methods on the unit test class are test methods:

[SysTestMethodAttribute]
public void myTest()
{
}

If you are using both unit testing and a version control system, you can benefit from marking your most critical test methods as check-in-tests. When setting up the version control system, you can specify which test project to run during check-in, and whether to run all unit test methods, or only the unit test methods that are marked as check-in-tests. During a check-in process the specified unit tests will be executed, and only if they all succeed the check-in will be submitted. This gives you the flexibility to run the most critical unit tests during the check-in process, while still having a full suite of unit tests that can be run on-demand. Here is how to mark a method as a check-in-test:

[SysTestCheckInTestAttribute]
public void myCheckInTest()
{
}


Using test projects in AX6 to group your unit tests brings even more benefits. When running the test project, you now get the results visible directly in the project as small icons - and when hovering over a failed unit test, you get the failure message.

This posting is provided "AS IS" with no warranties, and confers no rights.



==============
Источник: http://blogs.msdn.com/mfp/archive/20...rovements.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mfp: Late night discussions on software development #3: Unit testing Blog bot DAX Blogs 6 17.03.2008 12:01
mfp: Sneak preview - Code Upgrade Enhancements Blog bot DAX Blogs 0 02.03.2007 20:46
mfp: Channel9 - AX screencast on Unit Testing Blog bot DAX Blogs 2 28.10.2006 23:31
Pokluda: SysTest part IV.: Test/Suite initialization and cleaning; Execution isolation Blog bot DAX Blogs 0 28.10.2006 17:43
Dynamics AX: Dynamics AX 4.0 - Unit Testing and Test Projects Blog bot DAX Blogs 0 28.10.2006 16:40

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 12:12.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.