An opinionated test framework designed to be functional from the ground up.
- Function Paradigm from the start
- Random Test Execution
- Not a xUnit Clone
##Goals
- (done) Test execution order is indeterminate
- (done) Enable use of Approval Libraries in a functional manner
- (done) Enable Configuration to setup global reporters for test Assembly.
- (done) Theory test type
- (done) Create parameterized console
- Add XML Comments
- (done) Add Read Me
- (done) Add Example File on install
OO based test frameworks use
Assert
to designate a failure. This works because it generates an exception which forces an early exit withoutif
then
else
orcase
statements.
Functional programming has a better way. In F# that way is called a workflow. Every test must return a valid type indicating its success or failure. In FeldSpar that type is a
TestResult
.
Exceptions happen. The Framework will handle them, however they should be an exception to the normal rule.
In other frameworks an ingnored test simply does not run and reports itself as being in a third state if ignored. Ignoring a test is a failure. It is a failure of either the test or test methodologies.
By having an ignored state you increase complexity of the system because there are three states of a test.
Feld Spar tackles this by having only 2 states of a test. Success or Failure. Failures allow you to have a reason for failure, which will be
Ignored
for an ignored test.
.Net attributes are not immediately obvious when your program execution depends on them. If you find a method that conforms to the test signature but lacks the attribute was the attribute removed?
I wanted a test framework that made a test method as obviously indented to be a test.
Vikings navigated using solar navigation. This presented a problem when it was foggy, overcast or rainy. However they were very successful at navigation despite these limitations. Myth states that the Vikings had a magic Sun Stone that enabled them to navigate during the worst of weather.
Recent discoveries have shown that the Viking Sun Stone was not a myth. It was a type of stone known as Icelantic Spar which is in tern a type of Feld Spar.
Unit tests guide us out of the worst situations. And so I named my framework after the tool that guided the Vikings out of the worst weather.