PDA

View Full Version : [Mondrian] Unit tests



Pappyn Bart
04-25-2007, 04:40 AM
I am busy writing a test suite for mondrian, covering all predefined
queries on my cube of my application.

I tried the following approach : an applications gathers all mdx queries
and with cmdrunner, xml files are prepared. Then these xml files are
translated to junit test cases (java).

But some results are so large, that java cannot compile them in code.

Then I looked at the testsrc\queryFiles directory, that contains xml
files with mdx and test results and I was wondering how these xml files
are created ? Is there code available to generate these xml files ?

Thanks,
Bart


_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Julian Hyde
04-25-2007, 01:10 PM
I suggest you use the DiffRepository class. This maintains an XML file
of resources for each test, called ClassName.ref.xml. When you run the
test, it will generate a file called ClassName.log.xml, and you can copy
that over if the results look correct.

Several tests already use this.

http://mondrian.pentaho.org/api/mondrian/test/DiffRepository.html

Julian




_____

From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
On Behalf Of Pappyn Bart
Sent: Wednesday, April 25, 2007 1:30 AM
To: Mondrian developer mailing list
Subject: [Mondrian] Unit tests


I am busy writing a test suite for mondrian, covering all predefined
queries on my cube of my application.

I tried the following approach : an applications gathers all mdx queries
and with cmdrunner, xml files are prepared. Then these xml files are
translated to junit test cases (java).

But some results are so large, that java cannot compile them in code.

Then I looked at the testsrc\queryFiles directory, that contains xml
files with mdx and test results and I was wondering how these xml files
are created ? Is there code available to generate these xml files ?

Thanks,
Bart



_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian