Lots of Zenmap's component Python modules have unit tests of some sort or other, but many are just "run this function if __name__=='__main__'" type of things. We currently use the test discovery built in to Python 2.7's unittest library, so this task could be taken in a few different steps:
Convert existing tests to unittest test cases so that autodiscovery can pick them up.
Add new test cases for functions and modules not covered by any tests.
Use a more robust testing structure (like a zenmap/tests/ directory) so we don't rely on autodiscovery, which doesn't work on Python 2.6 and earlier.
The text was updated successfully, but these errors were encountered:
@Amertz08 I would anticipate that this would take about 2 or 3 weeks of full-time work, but I'm a bad estimator of other people's time budgets. The modules are in the zenmap/ directory under zenmapGUI, zenmapCore, and radialnet. The existing unittest-compatible tests are discovered and run with zenmap/tests/run_tests.py.
Traceback (most recent call last):
File "run_tests.py", line 15, in <module>
IndexError: list index out of range
make: *** [zenmap_check] Error 1
The problem is that the build directory doesn't exist.
Assuming that zenmap isn't enabled by default, I didn't configure to build it (that is, my configure command was just ./configure --with-libpcap=included). I have both python (Python2) and python3 executables on my system