You can try any unit testing framework here. Although unit tests aren't intended for such use, they can be useful there - test runners have red/green indicator out of the box.
Write test which executes mdx using ADOMD.NET ( http://j.mp/NtKFih ) and exception during execution will fail test. You can also investigate result using CellSet object and decide if test has passed.
Simple example using Microsoft's Unit Testing Framework (references To System.Data.dll and Microsoft.AnalysisServices.AdomdClient.dll are required):
using Microsoft.AnalysisServices.AdomdClient;
...
[TestMethod]
public void CubeHealthCheck1()
{
using (AdomdConnection conn = new AdomdConnection("Data Source=localhost;
Initial Catalog=SejmCube")) //your connection string here
{
conn.Open();
AdomdCommand cmd = conn.CreateCommand();
//your mdx here
cmd.CommandText = "SELECT NON EMPTY { [Measures].[Glosow Przeciwko] }
ON COLUMNS FROM [Sejm]";
CellSet cs = cmd.ExecuteCellSet();
}
}
Any exception will fail test (no connection for example) - you can add try/catch and in message inform what went wrong.
You can run this test from for example Test List Editor window
and then in Test Results window you have result with indicator
If you don't want using unit testing framework, you can develop custom visual studio extension (http://j.mp/QfMNQt) with similar logic inside.