# How to completely disable flowable for unit tests

**URL:** <https://forum.flowable.org/t/how-to-completely-disable-flowable-for-unit-tests/6880>\
**Category:** Flowable Engine\
**Created:** [October 7, 2020, 8:51am UTC](https://forum.flowable.org/t/how-to-completely-disable-flowable-for-unit-tests/6880 "2020-10-07T08:51:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikezerosix](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/mikezerosix/32/2160_2.png) [@mikezerosix](https://forum.flowable.org/u/mikezerosix)\
**Post date:** [October 7, 2020, 8:51am UTC](https://forum.flowable.org/t/how-to-completely-disable-flowable-for-unit-tests/6880/1 "2020-10-07T08:51:12Z")

</div>

**As** a developer  
**I want to** run unit test of Spring Boot embedding Flowable without any part of Flowable starting  
**so that** it is not started with Spring context in tests not needing it **and** to prevent errors in test / context shutdown:

```
ERROR [flowable-event-change-detector-1] o.f.e.i.m.EventRegistryChangeDetectionRunnablerun(EventRegistryChangeDetectionRunnable.java:37) Exception while detecting event registry changes

```

org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: EntityManagerFactory is closed

---

<div class="post-metadata">

**Author:** ![pickwik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pickwik/32/2610_2.png) [@pickwik](https://forum.flowable.org/u/pickwik)\
**Post date:** [October 20, 2021, 10:37am UTC](https://forum.flowable.org/t/how-to-completely-disable-flowable-for-unit-tests/6880/2 "2021-10-20T10:37:22Z")

</div>

In my case I’ve solved it using this properties:

```auto
flowable:
  process:
    enabled: false
  idm:
    ldap:
      enabled: false
    enabled: false
  form:
    enabled: false
  eventregistry:
    enabled: false
  dmn:
    enabled: false
  content:
    enabled: false
  cmmn:
    enabled: false
  app:
    enabled: false

```

and also mocking every flowable component that is injected to my services:

```auto
@MockBean(RepositoryService.class)
@MockBean(TaskService.class)
@MockBean(RuntimeService.class)

```

I’m using flowable version 6.6.0
