[master 1/1] Add test documentation

atodorov installerbot-noreply at redhat.com
Thu Aug 20 13:23:44 UTC 2015


From: Alexander Todorov <atodorov at redhat.com>

---
 docs/index.rst   |  1 +
 docs/testing.rst |  1 +
 tests/README.rst | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+)
 create mode 100644 docs/testing.rst
 create mode 100644 tests/README.rst

diff --git a/docs/index.rst b/docs/index.rst
index 4bf1ad2..c0995d3 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -19,6 +19,7 @@ Contents:
    iscsi
    multipath
    modules
+   testing
 
 Indices and tables
 ==================
diff --git a/docs/testing.rst b/docs/testing.rst
new file mode 100644
index 0000000..7e7bbfc
--- /dev/null
+++ b/docs/testing.rst
@@ -0,0 +1 @@
+.. include:: ../tests/README.rst
diff --git a/tests/README.rst b/tests/README.rst
new file mode 100644
index 0000000..c376c5e
--- /dev/null
+++ b/tests/README.rst
@@ -0,0 +1,69 @@
+Testing Anaconda
+================
+
+Before testing Anaconda you need to install all required dependencies and
+prepare the environment::
+
+    make -f Makefile.am install-test-requires
+    ./autogen.sh
+    ./configure
+
+Executing the tests can be done with::
+
+    make check
+
+To run a single test do::
+
+    make TESTS=install/run_install_test.sh check
+
+See `tests/Makefile.am` for possible values. Alternatively you can try::
+
+    make ci
+
+This has the advantage of producing Python test coverage for all tests.
+In case the *ci* target fails there is also a *coverage-report* target
+which can be used to combine the multiple `.coverage` files into one and
+produce a human readable report.
+
+Test Suite Architecture
+------------------------
+
+Anaconda has a complex test suite structure where each top-level directory
+represents a different class of tests. They are
+
+- *cppcheck/* - static C/C++ code analysis using the *cppcheck* tool;
+- *dd_tests/* - Python unit tests for driver disk utilities (utils/dd);
+- *dracut_tests/* - Python unit tests for the dracut hooks used to configure the
+  installation environment and load Anaconda;
+- *gettext/* - sanity tests of files used for translation; Written in Python and
+  Bash;
+- *glade/* - sanity tests for .glade files. Written in Python;
+- *gui/* - specialized test suite for the graphical interface of anaconda. This
+  is written in Python and uses the `dogtail <https://fedorahosted.org/dogtail/>`_
+  accessibility module. All tests are executed inside a LiveCD;
+- *install/* - basic RPM sanity test. Checks if anaconda.rpm can be installed in
+  a temporary directory without failing dependencies or other RPM issues;
+- *kickstart_tests/* - each test is a kickstart file and a shell script. The
+  test runner provisions a virtual machine using boot.iso and a kickstart file.
+  A shell script then verifies installation was as expected;
+- *lib/* - helper modules used during testing;
+- *pyanaconda_tests/* - unit tests for the :mod:`pyanaconda` module;
+- *pylint/* - checks the validity of Python source code using the *pocketlint*
+  tool;
+- *regex_tests/* - Python unit tests for regular expressions defined in
+  :mod:`pyanaconda.regexes`;
+- *storage/* - test cases used to verify partitioning scenarios for success or
+  expected failures. The scenarios are described using kickstart snippets.
+  Written in Python with a custom test case framework based on
+  `blivet <https://github.com/rhinstaller/blivet>`_;
+
+
+
+.. NOTE::
+
+    All Python unit tests inherit from the standard :class:`unittest.TestCase`
+    class unless specified otherwise!
+
+    Some tests require root privileges and will be skipped if running as regular
+    user!
+


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/b920a26dcf02512115ba4ccff0d7a24a5e1f1075


More information about the anaconda-patches mailing list