sartography / spiff-arena

SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams
https://www.spiffworkflow.org/
GNU Lesser General Public License v2.1
73 stars 44 forks source link

BPMN Unit Testing - Timers, Messages, Data Stores, etc... #578

Open calexh-sar opened 1 year ago

calexh-sar commented 1 year ago

We expect to encounter a number of issues as we try to test more production processes with the BPMN unit testing framework. We will certainly have to deal with the unique problems of how to handle writes to data stores or message start events. We'll sometimes want to test when timers go off, and sometimes we'll want tests there the timers don't go off. But there are likely many other situations. Rather than create dozens of individual tickets, this is just a placeholder for tackling these issues as we encounter them to assure that unit testing can become a central part of our efforts.

jasquat commented 7 months ago

From @madhurrya in #965

I generated a test case for PP1, but it is giving an error when I run it. https://dev.app.spiff.status.im/process-models/manage-procurement:procurement:requisition-order-management:request-goods-services/form/test_request_goods_services.json

And the same error with PP2 also https://dev.app.spiff.status.im/process-models/manage-talents:manage-compensation-benefits-administer-payroll:business-related-meetingsevents:request-travel/form/test_request_travel.json

From @jasquat in #945 I'm not sure how the process instance that the test was made from can work: https://dev.app.spiff.status.im/process-instances/manage-procurement:procurement:requisition-order-management:request-goods-services/3179

I'm not seeing where resp_XeroCurrencies is set or pulled into the call activity https://dev.app.spiff.status.im/process-instances/manage-procurement:procurement:requisition-order-management:request-goods-services/3179?process_identifier=Set_Xero_Currencies_Enum_List&bpmn_process_guid=299dde61-4333-49a5-944e-060a543163dd for Get Xero Currencies. Is this variable a Data Object? Maybe the test runner is not handling data objects properly.

madhurrya commented 7 months ago

In order to test PP1/PP2 and Upload expense models, we'll need messages working.

dinithihj commented 6 months ago

Unit test issues found during adding unit tests to demo site examples are listed here https://github.com/sartography/spiff-arena/issues/1554

dinithihj commented 6 months ago

Unit test issues found in some multi-instance examples - https://github.com/sartography/spiff-arena/issues/1380