New Upload weather data from web services into TM1/Planning Analytics — Read the post →

Module 3: Test Case 2 – Rule Check & Test Case 3 – Dimension Updates

Test Case 2: Rule Check

The Rules Check test case ensures that business rules defined within the model are implemented and functioning correctly. Incorrect rules can lead to wrong results with significant financial consequences.

Test Details

Name02 Rule Check
CategoryTest Case 2
DescriptionTest to see if new rule is correct and feeding correctly

Preconditions

  • Rule to test: ['Margin'] = N: ['List Price'] - ['Standard Cost']; on the Product cube
  • The Product cube starts with no data — values will be injected by the Set Up step

Test Execution

Set Up
ActionTest Type: Rule Execute | Target: Product cube
Clean Up

Assertions

#NameTypeDetails
1Calculated Value CorrectCompare Cell Cube ValueCell: Product [Version=Actual, Year=2022, Currency=Local, Region=3, Product=483, Measure=Margin] | Operator: Equals | Expected: 2 (leaf element)
2Test FeedersCompare Cell Cube ValueCell: Product [Version=1, Year=2022, Currency=Local, Region=3, Product=Bike Racks, Measure=Margin] | Operator: Equals | Expected: 2 (consolidated element)

Test Case 3: Dimension Updates

Dimensions in TM1 represent the structure of your data model (time periods, products, regions, departments). Any update — adding/removing members, changing attributes or hierarchies — can have significant consequences on data integrity and reporting accuracy.

Test Details

Name03 Dimension Updates
CategoryTest Case 3
DescriptionAdding a new Element to a Dimension via a TI

Preconditions

  • Target dimension: Employee
  • TI process: Dim.Employee.AddNewEmployee

Test Execution

Set UpLeave blank.
ActionTest Type: Process Run | Target: Dim.Employee.AddNewEmployee
Parameters: pID=0000000001, pName=Test User, pDept=2, pRegion=France, pStartDate=2011-01-01
Clean Up

Assertions

#NameTypeDetails
1Element Created CorrectlyInspect Dimension ElementElement: Employee[0000000001] | Value Source: Element Index | Operator: Does Not Equal | Expected: 0
2Element Added to ConsolidationCheck Process ResultCode: IF( ElIsAnc('Employee', 'All Employees', '0000000001') = 0); ProcessBreak; ENDIF; | Expected: Completed Successfully
3Attributes as ExpectedCheck Process ResultCode: checks CellGetS('}ElementAttributes_Employee', '0000000001', 'Full Name') = 'Test User' | Expected: Completed Successfully