Skip to content

Writing tests

Marnik Bercx edited this page Mar 9, 2022 · 1 revision

This wiki page is still very much under construction! It's mainly a place for me to drop some small notes as I'm writing tests that will hopefully aggregate into a proper guide.

Parser tests

Providing output files

When providing output files for the tests, try to keep the calculations (and hence the output files) as small as possible. Our test fixtures also provide an easy way to generate a structure for FCC silicon, so good to use this structure if you can. There are also several parts of the aiida.out (or stdout file) that can be removed to further reduce the output. Below is a list for pw.x, in the order they appear in the file, as well as the message we typically leave to clarify the removal:

  • The symmetry operators (--- SYMMETRIES REMOVED ---)
  • The K-points list and FFT mesh (--- K-POINTS REMOVED ---)
  • The memory information (--- MEMORY INFO REMOVED ---)
  • The occupations, after each ionic step (--- OCCUPATIONS REMOVED ---)
  • The final SCF calculation for a vc-relax (--- FINAL SCF REMOVED ---)
  • The timing information at the end (--- TIMINGS REMOVED ---)

The data-file.xml needs to be left complete, and hence cannot be trimmed.

Clone this wiki locally