ExceptionInInitializerError while running SampleIntegrationTest

Hello, I’m trying to run test on my app, but if i run tests by clicking in studio - it says ExceptionInInitializerError on 26th line of SampleIntegrationTest (Common Container Instance getter), and if i run test with gradle task - it says NPE on the same line… where to search for an answer: what went wrong?

Thanks in advance

Hi,
I have had harsh experience myself adding integration tests to an existing project. Usually it’s some small thing.

I would do the following:

  1. Create fresh new project, add test with a CUBA Studio.
    Try to find the difference in the project configuration (app.properties, code of the base test class, files layout, library dependencies).

  2. Debug the launch of the test in your project and in the fresh project. Try to find the difference in the variables and conditions in the test runtime.

1 Like