Changes between Version 43 and Version 44 of GSoC/2014/TestingFrameworkForGRASS


Ignore:
Timestamp:
Jul 3, 2014, 8:34:51 PM (10 years ago)
Author:
wenzeslaus
Comment:

Weekly report 7 (no formatting)

Legend:

Unmodified
Added
Removed
Modified
  • GSoC/2014/TestingFrameworkForGRASS

    v43 v44  
    614614http://trac.osgeo.org/grass/browser/sandbox/wenzeslaus/gunittest/gmodules.py?rev=61003
    615615http://trac.osgeo.org/grass/wiki/GSoC/2014/TestingFrameworkForGRASS#Week06
     616
     617=== Week 06 ===
     618
     6191. What did you get done this week?
     620
     621After discussion with my mentor I introduced PyGRASS Module class as the main way to invoke modules in tests. The module is executed by an assert function, so the run and result can be examined throughly.
     622I added functions and classes for finding and running tests in GRASS. The system is based on Python unittest package. Currently, several ways of invoking tests should be possible but it seems that only one or two will prevail in the future. The individual test files are executed as separate processes and there is a main process which controls everything. Most importantly it controls switching to the given gisdbase and location and it creates a mapset for each test file.
     623The tests are loaded from a source tree starting in the current directory. All files in all testsuite directories are considered as tests and executed. Only portion of files can be selected by using a global variable in the file, i.e. only files which can run in the given location.
     624The main process is now creating a HTML report which is not particularly fancy but it usable for examining results of larger number of tests.
     625
     626I updated the documentation to reflect the recent improvements. Although the documentation is not finished yet, it can be used to write and run tests when gunittest package is added to PYTHONPATH.
     627
     628I was thinking hard about the location handling and approach to different data and projections and I think that I have a solution which can work, although I don't say that it is simple. The description is in the documentation.
     629
     6302. What do you plan on doing next week?
     631
     632I plan to put the gutittest package to trunk. The parts needed for writing tests are more stable then the parts for invoking and report generation, so I can consider putting only the stable ones to GRASS. I need to improve command line interface, maybe introduce `make test` and finally I would like to advance in location handling (which fits to the original plan for week 8).
     633
     634Considering the state of report generation I can be more spacific about plan for week 10. I will improve report generation for individual test files, add some paseable outputs, and add different summaries to the main report
     635
     6363. Are you blocked on anything?
     637
     638I need more tests to see how the ideas about location-specific and location-independent tests work in actual tests. I will of course use the existing tests but if you can contribute some more, please do.
     639Vaclav
     640
     641Documentation including information about locations and tests
     642(additional documentation is in docstrings):
     643http://trac.osgeo.org/grass/browser/sandbox/wenzeslaus/gunittest/testing.rst?rev=61144
     644Wiki:
     645http://trac.osgeo.org/grass/wiki/GSoC/2014/TestingFrameworkForGRASS#Week07