Sidebar LogoHomeInstallationUsageIndexIndexGitHub </> Back Next Development

Development


Python version

Libraries

This implementation uses the following libraries for Markdown texts processing:

Packaging

No special packaging actions required.

Testing

To run unit tests execute:

> cd %MD2HTML_HOME%\python

>run_tests.bat

The output must be something like this:

...........................................................................................................................
----------------------------------------------------------------------
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 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 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 is used. Beautiful Soup library is used for HTML parsing.

Prerequisites

To run the E2E tests Python 3 is required. The following additional Python package must be installed:

$ python3 -m pip install beautifulsoup4==4.9.3

All tested artifacts must be built (if required). All unit tests must pass.

Execution

>cd %MD2HTML_HOME%\test

>run_tests.bat

or

$ cd $MD2HTML_HOME/test

$ ./run_tests

The output must look like this:

===== 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:

>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.

 


Back Next