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.
  • You need CzechIdM 9.7.7 dependency (and higher).

Source codes for this tutorial can be found in the example module

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 :)

Configuration name and provided property names will be covered by integration test.

  • by tomiskar