Changes between Version 46 and Version 47 of GSoC/2014/TestingFrameworkForGRASS


Ignore:
Timestamp:
Jul 18, 2014, 8:50:55 AM (10 years ago)
Author:
wenzeslaus
Comment:

Weekly report 9

Legend:

Unmodified
Added
Removed
Modified
  • GSoC/2014/TestingFrameworkForGRASS

    v46 v47  
    705705
    706706[source:grass/trunk/lib/python/gunittest?rev=61238 src] [#TestingonMSWindows Testing on MS Windows section] [http://lists.osgeo.org/pipermail/grass-dev/2014-July/070000.html report email]
     707
     708=== Week 09 ===
     709
     7101. What did you get done this week?
     711
     712I added assert methods for testing vector equality based on `v.info` and difference of GRASS vector ASCII files, most notably `assertVectorEqualsVector()` and `assertVectorEqualsAscii()` methods. So, comparison of two vectors is now possible. I also added assert methods for 3D rasters but my tests for some of them are failing and also some refactoring will be needed in the future.
     713
     714Additionally, I included two experimental methods for vector comparison based on buffering and overlays but I'm not sure if these are more useful than the ones based on ASCII and v.info. Perhaps these could be an inspiration for comparison of vectors for report if they are not equal.
     715
     716There are no special methods to test temporal datasets but comparison of key-value outputs is applicable.
     717By the way, there is currently 19 successfully running test files and 5 failing test files (each test file contains multiple tests). And thanks to the tests I also randomly found a bug revealed by more strict type checking (fix should be in r61272).
     718
     7192. What do you plan on doing next week?
     720
     721The plan was to implement the basic test results reports. I've already done part of this, so now I will improve report generation for individual test files and add different summaries to the main report page (which summarizes all test files).
     722
     723The structure or the report is the same as source code (where we look for the `testsuite` directories). The difference is that  the `testsuite` directory is replaced by several directories, one for each test file. Each of these directories has its own `index.html`. The test case classes and methods probably will not have their own directories.
     724
     725The `index.html` of one test file seems to be the central page of report containing basic information about individual tests (including descriptions) with links to more details such as stdout, stderr and some additional files (files created during the test). Information about tested modules will be gathered separately (using some test metadata or logging rather than using information about a directory).
     726
     727The primary goal is, however, to add some parseable outputs such as key-value file with number of successful and failed tests. I'm considering also XML (XUnit XML test result format) which is understood by some applications or report tools (however, it seems that definition of this XML is not clear).
     728
     729Perhaps writing some script which would gather information from different test runs would be beneficial.
     730
     7313. Are you blocked on anything?
     732
     733I'm not really blocked but there is few things on testing framework todo list which I might not be able to solve in the next weeks.
     734
     735First, the distribution is still not completely solved (see [http://lists.osgeo.org/pipermail/grass-dev/2014-July/070000.html previous week discussion], [http://osgeo-org.1560.x6.nabble.com/Weekly-report-8-Testing-framework-for-GRASS-GIS-td5150717.html Nabble link], [http://comments.gmane.org/gmane.comp.gis.grass.devel/59328 Gmane link]). Second, the system for different locations and data requirements still waits on being tested. Third, I postponed the integration with build system and improvements in command line interface.
     736
     737Also some tests, including the one for comparison of 3D raster maps, are failing for me because of the following error (same as in #2074).
     738
     739{{{
     740ERROR: Rast3d_get_double_region: error in Rast3d_get_tile_ptr.Region
     741coordinates x 0 y 0 z 0 tile index 0 offset 0
     742}}}
     743
     744[http://grass.osgeo.org/grass71/manuals/libpython/gunittest_testing.html Online documentation]
     745[http://trac.osgeo.org/grass/log/grass/trunk/lib/python/gunittest?rev=61266 src]
     746
     747To compile the latest documentation:
     748{{{
     749cd grass-source-code-root-dir
     750make sphinxdoc
     751# open file "dist.../docs/html/libpython/gunittest_testing.html"
     752}}}
     753To run all tests in all subdirectories in special location:
     754{{{
     755python -m grass.gunittest.main gisdbasepath nc_smp_location_name nc
     756# open file "testreport/index.html"
     757}}}
     758To run one test file in the current location and mapset:
     759{{{
     760cd raster/r.gwflow/testsuite/
     761python validation_7x7_grid.py
     762# see the output in terminal (stdout and stderr)
     763}}}
     764