I am customizing a report in TFS, the report include a matrix used to show the result result of a Test Plan and Test Cases. Currently the report shows all the Test Runs result for each test case.
e.g. There is a test plan contains 2 test cases, tester run each test case 2 times. The first time is failed, the 2nd time is success. Then in the report, it will show the test plan totally has 2 failed runs and 2 successed runs.
Actually we don't care the result of every run for a case. We just case the last run result for each case. The MDX in the dataset for the matrix is as below:
SELECT
NON EMPTY { [Measures].[Result Count] } ON COLUMNS,
NON EMPTY { ([Test Plan].[Test Plan Name].[Test Plan Name].ALLMEMBERS *
[Test Suite].[Suite Path].[Suite Path].ALLMEMBERS *
[Test Case].[System_Id].[System_Id].ALLMEMBERS *
[Test Configuration].[Configuration Name].[Configuration Name].ALLMEMBERS *
[Test Result].[Outcome].[Outcome].ALLMEMBERS *
[Test Run].[Test Run ID].[Test Run ID].ALLMEMBERS )
}
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM ( SELECT ( -{ [Test Run].[Test Run ID].[All].UNKNOWNMEMBER } ) ON COLUMNS
FROM ( SELECT ( -{ [Test Suite].[Suite Path].[All].UNKNOWNMEMBER } ) ON COLUMNS
FROM ( SELECT ( STRTOSET(@TestPlanTestPlanName, CONSTRAINED) ) ON COLUMNS
FROM [Team System]
)
)
) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
In the query, every test case has multiple coressponding test runs. I just want to select the one which has biggest Test Run ID.
Please teach me how to make it.
Thanks Very much