Module - Test configurations
The aim of this tutorial is show the way, how to test module provided configurations (and all registrable configurable components). Every module provide it's configuration properties. In CzechIdM 9.7.7 was added support to test this configurations - "formal" test are implemented:
- configuration naming - configuration should provide spinal-case name. This name is used as part of configuration key in application configuration and in frontend localization (e.g. for long running tasks, reports, authorizable policies …).
- configuration properties naming - if configuration is secured, then all properies should not start with public (
idm.pub.
) prefix.
What do you need before you start
- You need CzechIdM 9.7.7 dependency (and higher).
Source codes for this tutorial can be found in the example module
01 Create integration test
In core test api module abstract test AbstractConfigurableIntegrationTest
was prepared, we need to init this test only:
import eu.bcvsolutions.idm.test.api.AbstractConfigurableIntegrationTest; /** * Check example configurations. */ public class ExampleConfigurableIntegrationTest extends AbstractConfigurableIntegrationTest { }
And that is all :)
02 Run integration test
Configuration name and provided property names will be covered by integration test.