Testing logic that uses data services?

Using A12 2025.06 is it feasible to test my own code that uses data services without starting a Spring context with @SpringBootTest?

Basically, I want a unit test for my own code, but use models and documents from A12 “for real”.
I found that
a) mocking away all a12 library classes is a lot of work
b) I am sometimes unsure how exactly a12 apis will behave, so I can’t really mock it, but want to verify my own code against the real api
c) I like to use test models and documents rather than my real application’s workspace
d) Spring Boot tests are slooooow

Mainly, I want to load/write models and documents and manipulate document content.

I’ll try and have a go at this by checking how data services sets itself up in Spring Boot configuration, but maybe it isn’t feasible or advisable for some reason anyway?
Also 2025.06 might make it harder and slower because it needs to bootstrap postgres (rather than use h2 in memory)?

I found that for basic document access, the docs at GetA12 Login are helpful.

I guess anything involving persistence and query is probably better done with a SpringBootTest.

Hi @stephen-warm-graph,

Unfortunately, there is no “cheaper” way than setting up the context to have all the required functionality working.

Regarding mocking, you can get inspired by our test code, like com.mgmtp.a12.dataservices.KernelTestSupport, com.mgmtp.a12.dataservices.AbstractKernelAwareTest, com.mgmtp.a12.dataservices.AbstractDataServicesCoreTest.