Giter Club home page Giter Club logo

feldspar's Introduction

Feld Spar F#

An opinionated test framework designed to be functional from the ground up.

.NET Core Build

Available on Nuget

NuGet Status -- Framework

NuGet Status -- CI Runner


What's Different

  1. Function Paradigm from the start
  2. Random Test Execution
  3. Not a xUnit Clone

Writing Tests

The Documentation

##Goals

1. Be as purely functional as possible

2. (done) Enforce Test Isolation

  • (done) Test execution order is indeterminate

3. (done) Enable Gold Standard Testing as a Framework Feature

  • (done) Enable use of Approval Libraries in a functional manner
  • (done) Enable Configuration to setup global reporters for test Assembly.

4. (done) Implement Theory Based Testing

  • (done) Theory test type

6. (done) Create Console CI Runner

  • (done) Create parameterized console

7. Generate Documentation

  • Add XML Comments
  • (done) Add Read Me
  • (done) Add Example File on install

Design Considerations

NO Exception Driven Workflows

OO based test frameworks use Assert to designate a failure. This works because it generates an exception which forces an early exit without if then else or case 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.

Ignored Tests are failing tests

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.

Show Intention

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

Feld Spar?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.