D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

No data inserted during automated tests

  • 1.  No data inserted during automated tests

    Posted May 09, 2019 12:44 PM

    Hello,

    I recently started writing automated tests for our Dynamics 365 Finance and Operations system. We are currently running version 8.1.3.

    My question is the following: When I run automated tests following the steps described here, the tests complete successfully but no data is being inserted into the database. If I execute the same code from a runnable class instead, the data is indeed inserted in the database. 

    It looks as though the entire test was being executed inside an SQL transaction and when the tests complete the transaction is rolled back.

    I this the expected behavior?

    Thanks!



    ------------------------------
    Simon DuBerger
    Genetec
    ------------------------------


  • 2.  RE: No data inserted during automated tests

    Posted May 13, 2019 04:53 PM
    Seeme this behavior is expected. To change the behavior, the following attribute can be added to the test class: [SysTestTransaction(TestTransactionMode::None)].

    ------------------------------
    Simon DuBerger
    Genetec
    Montreal QC
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role