How to run ATSes?

There are several ways to run ATSes. There is no best way, that is very depending of the goal and the project. This chapter gives an overview of the options; so you can select the one that fits you best. But remember, you can easily add or combine options.

Using pw

Pathways comes with a tool pw (1) to run one or more ATSfiles from the command-line.:

[albert@pathways:tst]%  pw  ATS/demo1.py
...
Final Test result: OK (after 1 ATS)
[albert@pathways:tst]%  pw  ATS/demo1 ATS/demo2.py
...
Final Test result: OK (after 2 ATSes)

As the configuration is read before the ATS is loaded, the ATS may use import modules (like plugins) from non-standard locations, without setting PYTHONPATH.

Tip

The .py extension in the named ATSes are optional, as shown above

Use pathways.autorun() (run the ATS itself)

Most ATSes can be started by executing that file. Only the ATStests in that file are executed.:

[albert@pathways:tst]%  ./ATS/demo3.py
...
Final Test result: OK (after 1 ATS)

Typically it is called from the tst directory; to make sure all relative paths are correct.

Attention

To enable this, each ATSfile should call pathways.autorun() as main routine. As shown in the following code fragment

if __name__ == "__main__":
   exit(pathways.autorun())

To make sure the exit-code is correctly set, the pathways.autorun() should be wrapped in exit()

Interactively in Jupyter (IPython) Notebook

It is possible to develop and/or run ATS in Jupyter Notebook (or directly in IPython).

Todo

This runner need work; the link above is a HACK

More to follow

There should be options to integrate running the ATSes within other frameworks, like:

  • cronstab

  • nightly build

  • continues integration tools

  • build tools,

  • etc

During such an automatic-run, it should be possible to select tests, determine the order and to determine how to continue after an failure.

This work to be planned. For now, some simple shell (or python) script will do.