uzh / vm-mad

Dynamically grow or shrink GridEngine clusters using cloud-based nodes
https://arxiv.org/abs/1302.2529
Apache License 2.0
3 stars 2 forks source link

Automating tests #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We now start to have quite a few unit tests in the `test/` directory.
We shall need an automated unit test checker soon.

Choose one and implement it for the VM-MAD code.

TOX (http://pypi.python.org/pypi/tox) might be a good first attempt.

Original issue reported on code.google.com by riccardo.murri@gmail.com on 19 Jan 2012 at 3:45

GoogleCodeExporter commented 9 years ago
Some proposals for unit tests:

1. If pending jobs are present, N of running jobs == N of resources UP?
2. If job is running on a VM, idle.vm == 0. Extreme cases?
3. If job is not running on a VM, idle.vm !=0 Extreme cases?
4. If running execution time of all jobs is always the same: spent execution 
time units of all jobs == N of jobs * exec time?
5. If VM is killed, there are no more jobs related to that VM?
6. Job is running exactly for the specified time?
7. VM is dead after the specified timeout?

Original comment by tyanko.a...@gmail.com on 1 Feb 2012 at 4:45

GoogleCodeExporter commented 9 years ago
PyCLI can provide a simple example of how to use TOX in a small-sized module:

https://github.com/wcmaier/cli

The TOX config file is at: https://github.com/wcmaier/cli/blob/master/tox.ini
The actual test code is at: 
https://github.com/wcmaier/cli/tree/master/lib/cli/tests

Original comment by riccardo.murri@gmail.com on 1 Feb 2012 at 4:56

GoogleCodeExporter commented 9 years ago
Please see the work done by Antonio in GC3Pie for running tests with TOX and 
adapt it to VM-MAD.

Original comment by riccardo.murri@gmail.com on 26 Apr 2012 at 9:46