Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Overview of how I use Fitnesse for testing jobs

  1. #1
    Join Date
    Jul 2010
    Posts
    10

    Default Overview of how I use Fitnesse for testing jobs

    I mentioned on another thread that my company has started using Fitnesse for testing Kettle jobs. Someone asked for more details on that, so here is a quick overview. I need to turn this into a tutorial eventually, and would like to share some of the tools we are using, but for now I am just going to post this overview and see if people have questions.

    Basically, what we are doing is using Fitnesse to do testing of our jobs. We wrote a fixture (it extends DoFixture) that allows us to run a job from a fitnesse test and collect the return value. The fixture is called KettleRunnerFixture and has methods that can set up a source and target database connection, along with other parameters that the job might need. We then use dbFit to populate the source database with simulated input data. Then we go back to the KettleRunnerFixture and use a method 'runKettleJob' to launch a named job and see if it was successful or not. This method uses a copy of kitchen.java that we altered to implement the standard java Runnable interface. This allows us to control the job better than just using a java exec() call. Finally, we check the results of the job using dbFit again to see if the destination database is in the state we expect.

    I know that is pretty high level. If you have any questions, feel free to ask away.

    Links:
    Fitnesse itself: http://fitnesse.org/
    More on fitnesse at http://www.fitnesse.info/
    DbFit described at http://www.fitnesse.info/dbfit and http://gojko.net/fitnesse/dbfit/



    The

  2. #2

    Default

    Thanks for the overview. That's an approach I will look into it.

    I have a couple questions about this test setup/environment.

    How performant is this test setup? What i mean is how many tests do you execute and how long does it take (average tast case run)?

    Do you perform tests at job level or also on transformation level?

    How do you generate the test data for the test fixture? And how do you keep the test data synchronized with changes in the real system? Do you have a kind of automated extraction process for the test data?

    Lot of questions ... I know.

    kind regards
    Max

  3. #3
    Join Date
    Jul 2010
    Posts
    10

    Default

    I'll try to quantify a bit.

    We currently have 8 projects with tests. There are a total of 42 test pages. Each of those tests a full kettle job, although we have also used fitnesse to test individual transforms. One of the projects is very complex - it has 1 master job, 3 sub-jobs, and a total of 65 transformations. Running its test suite (20 tests) takes a little over 3 minutes.

    The test data is manually extracted from production data and designed to test certain behaviors of the system. Typically the input to a test is fairly small, and the set of things we test afterwards is also small.

    We haven't had to deal too much with changes to the system - the things we deal with don't change much in terms of structure or behavior.

  4. #4
    Join Date
    Aug 2010
    Posts
    21

    Default

    hello
    I also need to perform some test of Jobs and Transformation using Fitness.
    But I just started with it so I dont have any experience with it.
    Would you please be able to post some samples of the way that you structured Fitness in order to call the java files.

    Thank you

  5. #5
    Join Date
    Jul 2010
    Posts
    10

    Default Unfortunately, no

    I wish I could help, but I am no longer at that job and don't have access to the code.

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.