localPlannerBench icon indicating copy to clipboard operation
localPlannerBench copied to clipboard

Add integration test

Open maxspahn opened this issue 3 years ago • 3 comments

Make sure that basic functionality is not destroyed by changes made during structure improvement. This can be done with GitHub actions and a CI.

maxspahn avatar Feb 16 '22 10:02 maxspahn

Approach to writing the integration/blackbox test: Compare the output of running an experiment with a specific type of planner and robot with the expected output.

The planners are deterministic, so the planners are expected to produce the same output for the same input configuration. Some of the fields are non-deterministic; they produce values that depend on the platform or OS that the experiment is run on. For the integration tests only the deterministic output fields can be compared each time.

Requirements

  • Input configurations and results produced by the planners for those configurations.
  • Pseudo code/logic to run experiments, store results in temporary directories, compare them against expected output, and delete the temporary result directories.

Workflow actions to be tested:

  • Test if the runner command resulted in creation of a results folder with the expected no. and names of the files: res.csv, exp.yml, etc.
  • test if the deterministic contents of the results produced are the same for a specific robot type and experiment.
  • The test can be made more robust by testing runner execution and results produced for different combinations such as one planner and one robot type, two panners and one robot type, one planner and two robot typs, etc.

The integration test can be developed for the example planner now. It is not possible to use fabric and mpc planner in the tests because these planner are not open source; they can't be installed and run by GitHub actions. In future, open source versions of these two planners could be developed.

niketagrawal avatar Feb 23 '22 13:02 niketagrawal

Introduced initial tests in a1c69c6bf35c4f23c773f35962d4e3ba7be8fee4

maxspahn avatar Mar 02 '22 15:03 maxspahn

See #12 for switching from bash script to pytest only syntax.

maxspahn avatar Mar 04 '22 09:03 maxspahn