Task #920

Task #665: Port existing trajectory analysis tools to use the new framework

Add test framework for trajectory analysis modules

Added by Teemu Murtola almost 9 years ago. Updated over 4 years ago.

In Progress
Target version:


It should be straightforward to write a Google Test fixture that takes a trajectory analysis module (derived from gmx::TrajectoryAnalysisModule) and provides functionality for executing the analysis on a given trajectory and topology, with given options. Output from the modules should be accessible through datasetFromName(), and can be verified with the test classes written for the analysisdata subdirectory.

So this task consists of:
  • Moving common code from src/gromacs/analysisdata/tests/ to a separate library (src/testutils/ probably works fine).
  • Writing the test fixture class. Initially, the test fixture can probably use gmx::TrajectoryAnalysisCommandLineRunner. If common parts of the runner are split into a separate class as part of #868, it may be possible to also write a simpler runner for the tests only, and test the command-line runner separately.
  • Writing some simple test cases to check that it works.

Associated revisions

Revision 34e0eaa7 (diff)
Added by Teemu Murtola almost 9 years ago

Move common test code to testutils.

- Move test fixture for AbstractAnalysisData classes from analysisdata/
to testutils/.
- Some renaming to make file and class names more descriptive.
- Move gmx::test::CommandLine from commandline/ to testutils/.

Prerequisite for #920.

Change-Id: I2d4c8aaf87db03fe6c170856ba5b41eae05c483b

Revision 691bc21d (diff)
Added by Teemu Murtola almost 9 years ago

Improve analysisdata reference checks.

The reference checking for AnalysisData objects now supports more
scenarios with multipoint data, i.e., cases where there are point sets
that do not cover all columns.

Supporting changes:
- Add a TestReferenceChecker::checkPresent() method that allows to
assign meaning to absence of a reference data item (and to check for
- Split common analysisdata XML stylesheet elements to a separate xsl
- Add a script for copying the XML stylesheets to the reference data
directories for easier maintenance. Master copies of shared
stylesheets are now kept in src/testutils/.

Needed for #920, but split from the main change to keep it smaller.

Change-Id: I108c013833052c37a4f2e6c73be6161c0dae1c78

Revision bccb1693 (diff)
Added by Teemu Murtola almost 9 years ago

Improve gmx::test::CommandLine.

- Make the class properly copyable for easier use in tests that need to
manipulate it.
- Make the class manage its memory using std::vector and prevent memory
leaks if the argv array is modified outside the class (the internal
state of the class is still not correctly maintained, though).
- Add methods to append arguments.

Needed for #920, but split from the main change to keep it smaller.

Change-Id: I66ebe9d48936d35bce9e0b4fc1d6246d3d5ec07d

Revision b9a48ab2 (diff)
Added by Teemu Murtola over 8 years ago

Test framework for TrajectoryAnalysisModules.

- Add a test fixture that makes it simple to test analysis tools that
are implemented as TrajectoryAnalysisModule subclasses (moduletest.*).
- Add tests using the new fixture for most of the functionality of the
Select module.
- Minor adjustment to reference data test fixture to make it more usable
in this context.
- Move all dataset registration calls to trajectory analysis module
constructors from initAnalysis(). Also moved static initialization of
the datasets, in particular calls to setMultipoint().
In addition to enabling the tests to access the datasets before any
initialization of the module is done, this also makes the modules
easier to use for other interfacing than the command-line runner.

Main part of #920, may need some additional features.

Change-Id: I67e123f8361fe7710e936d9b4a880e65a3dc89c5


#1 Updated by Teemu Murtola almost 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Teemu Murtola

#2 Updated by Erik Lindahl over 6 years ago

  • Target version changed from 5.0 to 5.x

#3 Updated by Teemu Murtola over 6 years ago

  • Category set to testing

#4 Updated by Mark Abraham over 4 years ago

  • Target version deleted (5.x)

Also available in: Atom PDF