Skip to main content
This topic discusses miscellaneous information on topics that are not mandatory for using Copper in a project, but can be useful in certain situations.

Cross compatibility with non-Copper definitions

Defining measures using both Copper and the classic ways (like the builders or using the measure definitions) should work seamlessly. Copper is also able to handle non-Copper analysis levels and hierarchies, under the condition that the property in IAxisLevelDescription#ANALYSIS_LEVEL_TYPE_PROPERTY be specified in the properties of the levels of the Analysis Hierarchy. This is because Copper is not aware of the level types for the analysis hierarchies defined outside its context’s scope (like Java-based analysis hierarchies defined in the Cube description). in such cases you need to provide that information in the hierarchy description properties. Since the information is to be provided in the hierarchy description, it can either be specified by the Analysis Hierarchy’s description provider:
Or via the Analysis Hierarchy fluent builder’s withCustomizations(Consumer<IHierarchyDescription>) method:

Using the testing framework

Atoti Server comes with utility functions to ease the writing of tests. These utilities come in the form of another module:

Defining a test environment

Defining the application to test follows the same standard practices as one would use in a regular application.
In this snippet, we define the underlying Datastore and a single cube on top of it. After starting the application, we populate the Datastore with some data.

Using the testers

The testing framework provides a tester for the cube, which can be obtained by calling CubeTester.from(<manager>). It will allow to run an MDX query against the created cube.
Then, we can easily access the various cells of the result and test their values.
We can also test for empty cells.