Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

End to end automation AX2012

Posted on by 390

Hi All,

We want to implement e2e automation test for ax2012 , can you please guide me how we can proceed with that.

Thanks!

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: End to end automation AX2012

    If you're looking for information about this particular framework, check out AX 2012 documentation: Unit Test Framework. It's purely X++ framework, therefore you would write code in AX client, not in Visual Studio.

    If you aren't familiar with unit tests at all (how to design test etc.), it may be better to check resources written for other languages. Note that SysTest belongs to a family of similar test frameworks (MSTest, uUnit, jUnit, phpUnit...) and therefore you can use core principles learnt in one language and apply them in another. Obviously there are many differences as well, especially because these frameworks are around for decades and evolved a lot (while SysTest didn't).

  • Dev Profile Picture
    Dev 390 on at
    RE: End to end automation AX2012

    Thanks Martin.

    GUI is good to have but since we are facing lot of issues with it and as you pointed on the limitation I think implementing SysTest framework makes sense. I am not sure how we can use it for end to end testing in AX2012. Does it require Visual studio to connect to the AOT, can you please provide any help on how to start it.

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: End to end automation AX2012

    As I said, if you bypass GUI, the tests will be more stable (because they don't care about changes in GUI), which makes them cheaper to main and faster. Running test through GUI also makes error detection much more difficult and you can't meaningfully use things like test stubs. But they obviously don't test GUI.

    In the ideal situation, you'll have unit and coded integration tests to test business logic and some GUI tests to test GUI (but not business logic). It's because no type of tests can cover everything. For example, you may have a several unit tests to test a single method, because there are several things that may fail there. And there is no point in running integration and GUI tests if the individual method doesn't do its job. You can't make such granular testing with GUI tests, because you'd need an huge amount of tests, and because GUI tests are so slow, they would take too much time to execute. You also won't be able to simulate all possible situations. But unit tests are not a complete answer either - you may have all units working as designed, but not working together correctly. That's the job for integration tests. And so on.

    But we don't live in the ideal world (testing tools for AX 20120 are far from perfect, people don't want to invest to tests etc.), therefore you need to make some compromises anyway. But you should have a good idea what you want to test and why, and what you won't test and why.

    AX 2012 comes with SysTest framwork for unit tests, which can be used for integration tests as well. You can even manipulate form controls through X++. But if you want pure GUI tests (which handle AX as a black box), coded UI tests make a good sense to me.

  • Dev Profile Picture
    Dev 390 on at
    RE: End to end automation AX2012

    @Martin can you please guide me on this.

  • Dev Profile Picture
    Dev 390 on at
    RE: End to end automation AX2012

    Although the GUI is preferred but can you please let me know both the ways so that we can make decide based on that. Currently the team is using coded UI (C#)  but is willing to move to automation using x++.

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: End to end automation AX2012

    Which kind of test are you looking for? Do you want to test the process itself (which can - and typically should - bypass GUI) or do you want an automated test going through GUI (which is always slower and more frasgile)?

  • Dev Profile Picture
    Dev 390 on at
    RE: End to end automation AX2012

    So there is a process where we download Sales order from external application and process it further in ax i(its a 8-10 steps process through customized forms). I want to know how we can automate it in ax2012 so that we can test the flow end to end.

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: End to end automation AX2012

    Could you please tell us (much) more about your requirements?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans