Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: [Mondrian] how to run the standard test suite of Mondrian

  1. #1
    Venkatesh U Guest

    Default [Mondrian] how to run the standard test suite of Mondrian

    Hi,
    I have setup the mondrian code in eclipse and I run the build.xml to build
    the project. I could debug and run cmdRunner successfully. But when i also
    link the testsrc folder, there are lot of errors in the project. How to run
    the standard test suite and verify the test results. I am sorry if this is
    some thing very simple and obvious.

    Thanks,
    Venki

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

  2. #2
    Michele Rossi Guest

    Default Re: [Mondrian] how to run the standard test suite of Mondrian

    Hi,
    I am having similar issues, I think it's a bit tricky to work on Mondrian in
    Eclipse.
    Perhaps most of the problems are to do with the fact that Mondrian supports
    both JDBC 3.0 and JDBC 4.0 at the same time.

    Julian - is supporting JDBC 3.0 and older versions of Java still a strong
    requirement?

    Perhaps at some point we could drop the support for Java 5.0 and people that
    don't want to upgrade could always use old versions of Mondrian?
    After all Java 6.0 with JDBC 4.0 was released in December 2006, 4 years and
    4 months ago.

    If we did that and used Maven we would obtain automatic eclipse integration.
    You could change a line of code, hit ctrl+s and run your tests again from
    eclipse to verify that your new code works.

    I only mean to throw in some ideas, not to criticise - I think that Mondrian
    is great!

    thanks,
    Michele


    On 5 April 2011 12:32, Venkatesh U <venkatesh20 (AT) gmail (DOT) com> wrote:

    > Hi,
    > I have setup the mondrian code in eclipse and I run the build.xml to build
    > the project. I could debug and run cmdRunner successfully. But when i also
    > link the testsrc folder, there are lot of errors in the project. How to run
    > the standard test suite and verify the test results. I am sorry if this is
    > some thing very simple and obvious.
    >
    > Thanks,
    > Venki
    >
    > _______________________________________________
    > Mondrian mailing list
    > Mondrian (AT) pentaho (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian
    >
    >


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

  3. #3
    Luc Boudreau Guest

    Default Re: [Mondrian] how to run the standard test suite of Mondrian

    Gentlemen,

    I use Eclipse to work on Mondrian. Here are some tips.

    Once you have imported the project into Eclipse, run the ant targets: "clean
    compile compile.tests". This will do a few things for you. It will resolve
    all artifacts and place them in the 'lib' and 'testlib' folders. Then it
    will generate the parser and the message files. Once you have done that, you
    can refresh the project from within Eclipse, and everything should build,
    with the exception of the JDBC4 driver. You can safely ignore it, as the
    runtime execution path will fork to the proper JDBC driver for the Java
    version you are running against.

    To run the test suite, you need to create a 'Run Configuration' which will
    execute a single test class: 'mondrian.test.Main'. This test class will in
    turn configure some stuff and call all the other tests. I suggest adding the
    following JVM arguments to your run configuration: '-Xms512m -Xmx1024m'.

    You should also take a look inside the file called 'mondrian.properties' at
    the root of the project. You will need to use read this file and uncomment
    the proper lines so Mondrian can test against a FoodMart database isntalled
    on your machine. If you don't have the FoodMart database configured, you can
    easily load it into your RDBMS. Look in Mondrian sources, there should be a
    folder called 'demo'. Inside that folder are some examples of scripts to
    import the data. Here's how to import the data for MySQL. First, create a
    batch file. Call it whatever you fancy, but in there, add the following
    commands:

    -------------------------------------------------------------------------------------------
    @echo off
    set
    CP=../lib/commons-dbcp.jar;../lib/commons-collections.jar;../lib/commons-pool.jar;../lib/commons-logging.jar
    set
    CP=%CP%;../lib/eigenbase-properties.jar;../lib/eigenbase-resgen.jar;../lib/eigenbase-xom.jar
    set CP=%CP%;../lib/javacup.jar;../lib/mondrian.jar
    set CP=%CP%;../lib/log4j.jar
    set CP=%CP%;../dev-lib/mysql-connector-java-5.1.5-bin.jar
    rem set CP=%CP%;../testlib/postgresql-driver-jdbc3-74-214.jar
    rem set CP=%CP%;../testlib/jtds-1.2.jar

    java -Xms100m -Xmx500m -cp "%CP%"
    mondrian.test.loader.MondrianFoodMartLoader -verbose -aggregates -tables
    -data -indexes
    -inputFile="C:/workspace-olap4j/luc-mondrian-3.2/open/mondrian-release/3.2/demo/FoodMartCreateData.sql"
    -jdbcDrivers=com.mysql.jdbc.Driver
    -outputJdbcURL="jdbc:mysql://localhost:3306/foodmart"
    -outputJdbcUser=foodmart -outputJdbcPassword=foodmart
    -------------------------------------------------------------------------------------------

    You might need to change the user/password/host, but you'll manage. If you
    did deploy the data in MySQL, make sure that the contents of
    mondrian.properties reflect that.

    The only gotcha that I know of is when Eclipse decides to wipe out the class
    output folders, it erases the generated resources as well. You might need to
    re-run the ant target called generate.resources.

    This should be it. If you have any other issues, let me know.

    Luc


    On Tue, Apr 5, 2011 at 6:42 AM, Michele Rossi <michele.rossi (AT) gmail (DOT) com>wrote:

    > Hi,
    > I am having similar issues, I think it's a bit tricky to work on Mondrian
    > in Eclipse.
    > Perhaps most of the problems are to do with the fact that Mondrian supports
    > both JDBC 3.0 and JDBC 4.0 at the same time.
    >
    > Julian - is supporting JDBC 3.0 and older versions of Java still a strong
    > requirement?
    >
    > Perhaps at some point we could drop the support for Java 5.0 and people
    > that don't want to upgrade could always use old versions of Mondrian?
    > After all Java 6.0 with JDBC 4.0 was released in December 2006, 4 years and
    > 4 months ago.
    >
    > If we did that and used Maven we would obtain automatic eclipse
    > integration.
    > You could change a line of code, hit ctrl+s and run your tests again from
    > eclipse to verify that your new code works.
    >
    > I only mean to throw in some ideas, not to criticise - I think that
    > Mondrian is great!
    >
    > thanks,
    > Michele
    >
    >
    > On 5 April 2011 12:32, Venkatesh U <venkatesh20 (AT) gmail (DOT) com> wrote:
    >
    >> Hi,
    >> I have setup the mondrian code in eclipse and I run the build.xml to
    >> build the project. I could debug and run cmdRunner successfully. But when i
    >> also link the testsrc folder, there are lot of errors in the project. How to
    >> run the standard test suite and verify the test results. I am sorry if this
    >> is some thing very simple and obvious.
    >>
    >> Thanks,
    >> Venki
    >>
    >> _______________________________________________
    >> Mondrian mailing list
    >> Mondrian (AT) pentaho (DOT) org
    >> http://lists.pentaho.org/mailman/listinfo/mondrian
    >>
    >>

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


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

  4. #4
    Julian Hyde Guest

    Default RE: [Mondrian] how to run the standard test suite of Mondrian

    The easiest way to build and run tests is to use ant from the command line.
    I also use mondrian/bin/megatest -- it makes it easy to run the test suite
    several times, against different databases, JDKs, and with different
    property settings -- but that is optional.

    I don't run Eclipse myself. I'm sure there is a way to get it to work.

    In IntelliJ, I tend to develop under JDK 1.6, and I exclude JDK 1.5 files
    (such as mondrian/olap4j/FactoryJdbc3Impl.java) from compilation. A similar
    approach may work for you in Eclipse.

    Julian



    _____

    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of Michele Rossi
    Sent: Tuesday, April 05, 2011 3:42 AM
    To: Mondrian developer mailing list
    Subject: Re: [Mondrian] how to run the standard test suite of Mondrian


    Hi,
    I am having similar issues, I think it's a bit tricky to work on Mondrian in
    Eclipse.
    Perhaps most of the problems are to do with the fact that Mondrian supports
    both JDBC 3.0 and JDBC 4.0 at the same time.

    Julian - is supporting JDBC 3.0 and older versions of Java still a strong
    requirement?

    Perhaps at some point we could drop the support for Java 5.0 and people that
    don't want to upgrade could always use old versions of Mondrian?
    After all Java 6.0 with JDBC 4.0 was released in December 2006, 4 years and
    4 months ago.

    If we did that and used Maven we would obtain automatic eclipse integration.
    You could change a line of code, hit ctrl+s and run your tests again from
    eclipse to verify that your new code works.

    I only mean to throw in some ideas, not to criticise - I think that Mondrian
    is great!

    thanks,
    Michele


    On 5 April 2011 12:32, Venkatesh U <venkatesh20 (AT) gmail (DOT) com> wrote:


    Hi,
    I have setup the mondrian code in eclipse and I run the build.xml to build
    the project. I could debug and run cmdRunner successfully. But when i also
    link the testsrc folder, there are lot of errors in the project. How to run
    the standard test suite and verify the test results. I am sorry if this is
    some thing very simple and obvious.

    Thanks,
    Venki

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





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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.