View Issue Details

IDProjectCategoryView StatusLast Update
0001922Slicer4Core: Scripting (Wrapping, Python)public2012-08-20 09:57
Reporterpieper Assigned Topieper  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001922: add a self-testing module
Description

We need a way for developers to provide tests that users can run as self-tests of the installed application in order to confirm expected behavior.

Currently, slicer tests are run on build machines, typically from a build tree and not an install tree; while critical, these tests do not really capture the end-user's situation and therefor important aspects of our software are completely untested except by our users (who understandably are disappointed when features don't work as advertised).

For example, bug 0001822, appears to only happen on mac release builds and requires many steps to reproduce. Being able to consistently reproduce this situation will be important in finding a solution.

Additional Information

To partially address this issue, I plan to implement a Testing->SelfTests module with a plugin architecture so that module writers can define tests that can be run inside of a slicer install tree. These tests should also be invokable from the command line, meaning they can be seamlessly exposed to ctest so they run on the nightly dashboard.

There are a number of features that could be added to this:

  • timing of the tests
  • collection of statistics about test results that could be emailed to developers to help diagnose issues
  • integration with cdash (i.e. letting release builds contribute to the dashboards)
  • making it possible for users to contribute tests that define their workflow

other suggestions are welcome, but for now all we really need is a simple way to users to invoke tests and find out the results.

This work should be integrated with the Qt testing framework project when it becomes available.

TagsNo tags attached.

Relationships

related to 0001822 closedpieper Split volume results corrupted 

Activities

pieper

pieper

2012-04-20 06:57

administrator   ~0004052

This module should serve as a BIST:

http://en.wikipedia.org/wiki/Built-in_self-test

pieper

pieper

2012-04-20 07:29

administrator   ~0004053

Module is being developed here:

https://github.com/pieper/Slicer/tree/1922-bist

pieper

pieper

2012-05-01 09:50

administrator   ~0004117

This will be part of Project week:

http://www.na-mic.org/Wiki/index.php/2012_Summer_Project_Week:SelfTesting

pieper

pieper

2012-05-01 09:51

administrator   ~0004118

One thing to consider is a mode in which the module could be invoked outside of the running slicer so that it could run tests and report on tests that lead to crashes. One option would be for to launch child slicer processes to run tests and check the return code of these. I'm not going to put this on the short term feature list but may want to add it in the future.

pieper

pieper

2012-05-21 12:49

administrator   ~0004536

A discussion of using CTest/midas for data management of build-time and run-time tests is copied below for reference.

Jean-Christophe Fillion-Robin jchris.fillionr@kitware.com

4:30 PM (17 minutes ago)

to pieper, James, Julien, Patrick
Hi Steve, Jim,

We meet with Patrick. Here are the conclusions:

1) Our intern Chris will probably be working with me to:

Thanks
Jc

On Mon, May 21, 2012 at 3:17 PM, Steve Pieper <pieper@ibility.net> wrote:

Hi Jc, Patrick -

Sounds good - let us know your thoughts.  I'm particularly interested in having a solution that can work equally well for build time tests, for run-time self-tests (on an install tree), and for sample data downloaded at the user's request.

Best,
Steve

On Mon, May 21, 2012 at 2:52 PM, Jean-Christophe Fillion-Robin &lt;jchris.fillionr@kitware.com> wrote:

    Hi Jim, Steve, 

    Just to let you know that I will be discussing with Patrick later today. 

    Thanks
    Jc

    On Mon, May 21, 2012 at 9:42 AM, Jean-Christophe Fillion-Robin &lt;jchris.fillionr@kitware.com> wrote:

        Good morning, 

        Including Patrick, I am he will have insightful comments.

        Thanks
        Jc

        On Mon, May 21, 2012 at 9:39 AM, Miller, James V (GE Global Research) &lt;millerjv@ge.com> wrote:

            Certainly the data can be pulled down from the External site for the sample data etc.  It is really just a website with data indexed by hash keys.  That index could just be a directory structure on a website or could be a Midas host.

            But most of the External Data mechanisms are layers of CMake magic to maintain an efficient local cache. We'd have to translate some of the logic for the cache management for the self tests (unless they get configured into the build treeā€¦.)

            Jim

            On May 18, 2012, at 10:46 PM, Steve Pieper wrote:
            That sounds great - will it also be usable at run time for sample data and self tests?

            On Fri, May 18, 2012 at 5:47 PM, Miller, James V (GE Global Research) &lt;millerjv@ge.com> wrote:

                Hey guys, 

                I have been playing around with configuring Slicer to use the ITKv4 ExternalData mechanism for test and baseline data.  I have branches called ExternalDataWIP on my github (millerjv) repositories for both the Slicer4 and the SkullStripper extension.

                The process works by placing the real data on a server like Midas or any web server.  Files in the source repository just contain the md5 hash keys of the true files. At build time, specifically referenced files are downloaded to a local object store.  

                We should be able to set it up so that all of Slicer and all its Extensions share a single local object store.  I don't have that working yet. Some config file problem.

                I think this could make it easier for us to publish a list of available test data and have it easy for people to configure their Extensions to reference our or even their data.

                http://www.na-mic.org/Bug/view.php?id=1987

                Jim Miller
                Senior Scientist
                GE Research 
                Interventional and Therapy

                GE imagination at work
            Jim Miller
            Senior Scientist
            GE Research 
            Interventional and Therapy

            GE imagination at work

        -- 
        +1 919 869 8849

    -- 
    +1 919 869 8849

--
+1 919 869 8849

pieper

pieper

2012-08-20 09:56

administrator   ~0005594

A self-test module and an example test that pulls data from midas has been added:

http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=20779

pieper

pieper

2012-08-20 09:57

administrator   ~0005596

Feature has been added, now it can be used and refined.

Issue History

Date Modified Username Field Change
2012-04-20 06:53 pieper New Issue
2012-04-20 06:53 pieper Status new => assigned
2012-04-20 06:53 pieper Assigned To => pieper
2012-04-20 06:57 pieper Note Added: 0004052
2012-04-20 07:29 pieper Note Added: 0004053
2012-05-01 09:50 pieper Note Added: 0004117
2012-05-01 09:51 pieper Note Added: 0004118
2012-05-01 10:16 pieper Relationship added related to 0001822
2012-05-21 12:49 pieper Note Added: 0004536
2012-08-13 10:25 pieper Target Version => Slicer 4.2.0 - October 1st 2012
2012-08-20 09:56 pieper Note Added: 0005594
2012-08-20 09:57 pieper Note Added: 0005596
2012-08-20 09:57 pieper Status assigned => closed
2012-08-20 09:57 pieper Resolution open => fixed
2012-08-20 09:57 pieper Fixed in Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012