web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Need help to create unit test cases for Custom data entities using systestframework

(0) ShareShare
ReportReport
Posted on by 65

Hi Axperts,

Looking for inputs on creating unit test cases for Custom data entities using systestframework. 

Regards,

Maneendra

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi,

    Do you operate D365FO or AX2012?

    Best regards,

    Ludwig

  • Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at

    What kind of input? Could you please explain what problem do you need to address?

  • Maneendra Kumar Guggilam Profile Picture
    65 on at

    D365FO

  • Maneendra Kumar Guggilam Profile Picture
    65 on at

    Hi Martin,

    I am looking for an approach to be followed to create the automated unit test cases using systest framework for Custom data entities.

    Regards,

    Maneendra

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    moved to the d365 community forum

  • Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at

    Does it mean that you don't know the unit testing framework at all and you're looking for an introduction, or that you have a problem specific to data entities?

    If you know how to use tables in unit tests, you should be able to use data entities as well.

    Obviously we can't address your problem unless you tell us what it is.

  • Maneendra Kumar Guggilam Profile Picture
    65 on at

    I have a problem specific to data entities. I don't understand how to create the test cases for dataentity methods.

    I followed below docs to understand the systest framework.

    docs.microsoft.com/.../testing-validation

    Here they are calling the table methods and passing test data. but i doubt that how to code the unit test case for the data entities as entities expect the run time  entity context and data source context.

  • Verified answer
    Martin Dráb Profile Picture
    239,684 Most Valuable Professional on at

    It seems that you mean methods like updateEntityDataSource(), but is it the right level of testing?

    Consider two other options:

    Maybe you consider the entity being the unit, and you'll test it via its public interface. What you'll call to update data of an entity will be update() method, not updateEntityDataSource().

    Or you want to test a specific piece of logic, which will be encapsulated in a method - let's call it method1(). This method will be called from updateEntityDataSource(). But then you want to write a test against method1() and not updateEntityDataSource(), don't you?

  • Suggested answer
    Maneendra Kumar Guggilam Profile Picture
    65 on at

    Yeah Martin, I am already following the second option. I just want to check any framework available to generate the test methods for the standard entity methods.

    Thanks for your inputs Martin.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 681 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 598 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 579

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans