[TOC] ---------------------------------------------------------------------------------------------------- # Python version ## Libraries This implementation uses the following libraries for Markdown texts processing: - __Python-Markdown__ project: - [Official documentation](https://python-markdown.github.io/) - [PIP Python-Markdown project page](https://pypi.org/project/Markdown/) - `pymdown-extensions` ([the project's documentation](https://facelessuser.github.io/pymdown-extensions/extensions/superfences/)) that improves some features of the __Python-Markdown__ module. ## Packaging No special packaging actions required. ## Testing To run unit tests execute: ````shell > cd %MD2HTML_HOME%\python >run_tests.bat ```` The output must be something like this: ````wrapped-shell ........................................................................................................................... ---------------------------------------------------------------------- Ran 123 tests in 0.199s OK ```` A single test may be called like this: `python -m unittest test\test_arg_file_parsing.py`. ---------------------------------------------------------------------------------------------------- # Java version This implementation uses module [vsch/flexmark-java](https://github.com/vsch/flexmark-java) for converting Markdown text to HTML. ## Packaging and tests The packaging and the tests are defined in the source code and run automatically when the project is built. See the [installation instructions](#installation_java) for more details. ---------------------------------------------------------------------------------------------------- # End-to-end tests The end-to-end (E2E) tests are used for testing the built and ready-to-use program's artifacts. These tests are the same for the Python and the Java versions. ## Implementation The test framework [Python `unittest`](https://docs.python.org/3.8/library/unittest.html) is used. [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#navigating-the-tree) library is used for HTML parsing. ## Prerequisites To run the E2E tests [Python 3](https://www.python.org/) is required. The following additional Python package must be installed: ````unixshell $ python3 -m pip install beautifulsoup4==4.9.3 ```` All tested artifacts must be built (if required). All unit tests must pass. ## Execution ````winshell >cd %MD2HTML_HOME%\test >run_tests.bat ```` or ````unixshell $ cd $MD2HTML_HOME/test $ ./run_tests ```` The output must look like this: ````shell ===== py implementation E2E tests ===== ......................................... ---------------------------------------------------------------------- Ran 41 tests in 6.525s OK ===== java implementation E2E tests ===== ......................................... ---------------------------------------------------------------------- Ran 41 tests in 13.805s OK ```` A certain test may be executed in the following way: ````shell >set IMPLEMENTATION=py >python -m unittest test_index_plugin.py ```` The above test will be executed for the Python version. Use `set IMPLEMENTATION=java` to execute it for the Java version.