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

Community site session details

Session Id :
Supply Chain Management forum

SysTest / SysTestCase framework

(0) ShareShare
ReportReport
Posted on by 216

hi

I am writing test cases using SysTest framework. These tests are workflow related and hence cannot be written using the new framework that Microsoft is releasing soon.

 

The issue I am facing is that when I run the test that creates a document and submit to workflow, it is not getting picked up by workflow. I suspect that this is because the data is not committed. In SQL server I have to set transaction isolation level 'read uncommitted' to see this data.

Can someone please confirm whether this is expected? If yes, then any hack to get this working? We would actually prefer that the test cases that have been executed stay in the database in case end users wish to review the results.

 

regards

harry

I have the same question (0)
  • Deshpande Profile Picture
    216 on at
    RE: SysTest / SysTestCase framework

    wow! how do I add attachment to the thread? Looks like it is not allowed.

    Let me host the workflow testing project somewhere  and then I will add the link.

  • Joris dG Profile Picture
    17,775 on at
    RE: SysTest / SysTestCase framework

    I'd love to see that!

  • Deshpande Profile Picture
    216 on at
    RE: SysTest / SysTestCase framework

    Actually, I am almost done with writing / hacking into that framework. I will publish the project in a day.

  • Suggested answer
    Joris dG Profile Picture
    17,775 on at
    RE: SysTest / SysTestCase framework

    Unfortunately, no. The kernel of the AOS that deals with database versus the abstraction of that in the X++ exposed APIs doesn't support it. I would love to see that feature built but this would be a considerable effort.

  • Community Member Profile Picture
    on at
    RE: SysTest / SysTestCase framework

    Any of test tools come with mocking tool so I don't have to write data into the database?

  • Deshpande Profile Picture
    216 on at
    RE: SysTest / SysTestCase framework

    Unfortunately regression test suite cannot handle workflow tests

  • Suggested answer
    Joris dG Profile Picture
    17,775 on at
    RE: SysTest / SysTestCase framework

    For that type of scenario, you may want to consider moving away from SysTest and use the recently released Regression Suite Tool. This is automated end-to-end integrated testing through the browser.

    See

    docs.microsoft.com/.../using-task-guides-and-bpm-to-create-user-acceptance-tests

    www.microsoft.com/.../details.aspx

  • Deshpande Profile Picture
    216 on at
    RE: SysTest / SysTestCase framework

    We are writing scenario test cases for user acceptance testing. These are not unit tests. Yes, workflow is running and if I execute the scenario manually then purchase order workflow gets processed as expected.

    We will worry about build automation once we figure out how to execute these workflow test cases. :(

    Workflow is not getting processed in these test cases since the record is not committed. I know this since I do not see the record in SQL server until read isloation level is set to uncommitted. I am wondering if anyone can confirm this and if there is any hack to get around this issue.

  • Verified answer
    Joris dG Profile Picture
    17,775 on at
    RE: SysTest / SysTestCase framework

    What's the intent of the test (i.e. what are you testing)? Unit tests need to precise and very small and isolated. If you're submitting something to workflow then what are you asserting? That it was submitted?

    If you're expecting a certain workflow outcome based on the test, clearly you need to also execute the workflow to process your code, so you can actually test the outcome.

    I think reviewing those questions should answer and fix your test. That said, yes the data isolation is one thing - but also the tests can run in any which way including without batch server. If you depend on the batch server doing something then you have a dependency outside of your control.

    The build automation - unfortunately - runs the tests while the AOS and the batch are running. But interestingly, neither is actually used by the framework and for performance and other reasons it probably should leave the AOS and batch server off until the tests are done.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Supply Chain Management

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans