You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something like this in io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert
/**
* Asserts whether this process has thrown an error for this element
*
* @param elementId The id of the element that should have thrown error
* @return this {@link ProcessInstanceAssert}
*/
public ProcessInstanceAssert hasProcessInstanceThrownError(final String elementId) {
final long count =
StreamFilter.jobRecords(recordStream)
.withIntent(JobIntent.ERROR_THROWN)
.withElementId(elementId)
.stream()
.filter(r -> r.getValue().getProcessInstanceKey() == actual)
.count();
assertThat(count)
.withFailMessage(
"Expected element with id %s to have thrown %s error(s), but was %s",
elementId, 1, count)
.isEqualTo(1);
return this;
}
then assert count
The text was updated successfully, but these errors were encountered:
Thanks for raising this @muraliweb9! I think it's a good suggestion. Unfortunately, I don't see us having the time to implement this short-term. Would you be willing to provide a pull request for this?
muraliweb9
added a commit
to muraliweb9/zeebe-process-test
that referenced
this issue
Jun 5, 2023
Heads up! We are building a new Java testing library for Camunda 8.6. The new library will replace Zeebe Process Test.
Read more about upcoming changes here and stay tuned for updates. 🚀
com.interview.carworkflowcloud.ZeebeTestThreadSupport has many useful asserts.
Something similar to this would be useful:
ZeebeTestThreadSupport.hasProcessInstanceThrownError(processInstance, "element-id");
Something like this in io.camunda.zeebe.process.test.assertions.ProcessInstanceAssert
then assert count
The text was updated successfully, but these errors were encountered: