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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.11.2007, 20:20   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
gatesasbait: Automated DAX test cases
Источник: http://gatesasbait.spaces.live.com/B...B9F5!144.entry
==============

 
Good morning,
 
During an MDIS webEx on Wednesday Microsoft specified new testing requirements for ISV's Dynamics Ax 5.0 MDIS modules. Microsoft will now require delivery of code for automated testing of 50% of test scenarios submitted to them (though what that means exactly is still anyone's guess). So today, I will give a very quick overview of the DAX test case framework.
 
To create a test project, right click on the 'shared projects' node and select 'new test project'. A test project consists of test classes that extend 'SysTestCase'. A test class is required to be named 'test'+'name of class or table tested'. Methods need to be named 'test'+'name of method to be tested'. To run a 'test project', right click on the project, select 'add-ins - run tests'. Here is a quick example: (it's really easy to figure out what it does)
 
public class AxSalesTableTest extends SysTestCase
{
}
public void testParmCustGroup()
{
    #define.testStr("testStr")
    AxSalesTable axSalesTable;
    /*
     * You might need to insert records in the database to test
     * some code or business logic.
     */
    void setUp()
    {
        ;
        axSalesTable = AxSalesTable::construct();
    }
    /*
     * If you inserted records, you must remove them as well as
     * any by-products of your testing.
     */
    void tearDown()
    {
        ;
    }
    ;
    try
    {
        setUp();
        //Code to test
        axSalesTable.parmCustGroup(#testStr);
        //Validation
        this.assertEquals(#testStr, axSalesTable.salesTable().CustGroup);
    }
    catch
    {
        tearDown();
        throw error("Unable to test.");
    }
    tearDown();
}


Источник: http://gatesasbait.spaces.live.com/B...B9F5!144.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
gatesasbait: Wikipedia entry for DAX Blog bot DAX Blogs 1 13.06.2008 14:36
gatesasbait: Dynamics Ax SQL statements (SQL Strings in DAx) Blog bot DAX Blogs 1 16.04.2008 06:55
gatesasbait: DAX and Visual Studio, Future reserved words Blog bot DAX Blogs 0 11.04.2008 18:05
gatesasbait: Local DAX installation method also works for Dynamics Ax 5.0 Build 366 Blog bot DAX Blogs 0 28.11.2007 18:51
Pokluda: SysTest part IV.: Test/Suite initialization and cleaning; Execution isolation Blog bot DAX Blogs 0 28.10.2006 17:43

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 01:12.