You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, HTF is a big, monolithic package. It would be nice to split HTF into several smaller packages. This has the following benefits:
extensibility: e.g. support for other test methods such as smallcheck
possibly fewer dependencies
choices for the user: for example, the user can decide whether to have source code locations in assertion failures, and how these source code locations are realized (template haskell, htfpp, or something different)
I could imagine the following packages:
HTF-core
The core of HTF. Defines how tests are organized and executed. This could include the following modules:
Test.Framework.AssertM
Test.Framework.History
Test.Framework.JsonOutput
Test.Framework.Location
Test.Framework.CmdlineOptions
Test.Framework.Colors
Test.Framework.Pretty
Test.Framework.PrettyHaskell
Test.Framework.TestInterface
Test.Framework.TestManager
Test.Framework.TestReporter
Test.Framework.TestTypes
Test.Framework.XmlOutput
Test.Framework.ThreadPool
We could split HTF-core even in even smaller parts by abstracting over how test results are reported. I think we should post this split.
Things to consider:
It should be possible to write and execute simple tests with HTF-core.
HTF-UnitTests
HTF adapter for HUnit. Includes the current module
Test.Framework.HUnitWrapper
HTF-QuickCheck
HTF adapter for QuickCheck. Includes the current module
Test.Framework.QuickCheckWrapper
HTF-ShellTests
Shell-based tests with HTF. Includes the current module
Test.Framework.BlackBoxTest
(I suggest renaming "black box tests" to "shell tests")
HTF-preprocessor
The htfpp preprocessor. Includes the current module
Test.Framework.Preprocessor
htfpp needs a configuration file where we define the prefix to look for and the expansion code for a given prefix. This is necessary to be able to extend htfpp to new test providers (e.g. smallcheck). There should be a sensible default configuration file for all know test providers.
HTF
The HTF umbrella package, defining a sensible default set of package dependencies. Its functionality is the same as the current HTF package. Also includes the tutorial:
Test.Framework.Tutorial
The text was updated successfully, but these errors were encountered:
We could start adding separate library entries to HTF.cabal for all of the suggested sub-packages. If at some point a library only depends on other libraries and its own modules, it should be easy to extract the whole thing into a separate package.
Seems like a good start. I would suggest that we do the restructuring without adding any new functionality or changing functionality. For example, we just leave the preprocessor "as is" and add the config file later. With this approach, we can run the tests at the end and make sure that everything works as before.
I think the dependencies should be as follows:
HTF-core: only external dependencies
HTF-preprocessor: only external dependencies (the generated code has more dependencies)
HTF-UnitTests, HTF-QuickCheck, HTF-ShellTests: on HTF-core
Currently, HTF is a big, monolithic package. It would be nice to split HTF into several smaller packages. This has the following benefits:
I could imagine the following packages:
HTF-core
The core of HTF. Defines how tests are organized and executed. This could include the following modules:
We could split HTF-core even in even smaller parts by abstracting over how test results are reported. I think we should post this split.
Things to consider:
HTF-UnitTests
HTF adapter for HUnit. Includes the current module
HTF-QuickCheck
HTF adapter for QuickCheck. Includes the current module
HTF-ShellTests
Shell-based tests with HTF. Includes the current module
(I suggest renaming "black box tests" to "shell tests")
HTF-preprocessor
The
htfpp
preprocessor. Includes the current modulehtfpp
needs a configuration file where we define the prefix to look for and the expansion code for a given prefix. This is necessary to be able to extendhtfpp
to new test providers (e.g. smallcheck). There should be a sensible default configuration file for all know test providers.HTF
The HTF umbrella package, defining a sensible default set of package dependencies. Its functionality is the same as the current HTF package. Also includes the tutorial:
The text was updated successfully, but these errors were encountered: