v3.1.0 – TeamCity printers

@haf haf released this Jan 11, 2017 · 19 commits to master since this release

Expecto now supports TeamCity out of the box. If the test framework is running inside a TeamCity instance, it will notice it and print accordingly.

Thanks to @theimowski for contributing this!


v3.0.2 – Downgrade BenchmarkDotNet

@haf haf released this Jan 10, 2017 · 24 commits to master since this release

Fixes #74


v3.0.0 – Ionide highlighting infra, `testCaseAsync`

@haf haf released this Jan 9, 2017 · 34 commits to master since this release

The v3 release comes with new bells and whistles – it now supports async tests and has out-of-the box integration with Ionide's test location support. When you write a test in Ionide you can now use Expecto out of the box to run them and run them on code changes! After running them you'll get highlights in the editor to show which failed and which passed. Thanks to @Krzysztof-Cieslak for his contributions!


Asserting on floats with floatClose

There's also a new Expect.floatClose assertion function that's more robust than floatEquals. We've updated the docs for you, and there's this pull request with the background. Thanks @AnthonyLloyd for your contributions!

Async test support

@AnthonyLloyd Has also contributed a new asynchronous test runner to fix issue #2. You can create async tests with testCaseAsync "name" async {} and they'll be run like they should.

Remember testSequenced

When you run performance tests or use Expect.fasterThan, remember to use the newly added testSequenced function that can tag Test-values (testList, testCase, testCaseAsync) to make your tests robust to run in parallel.

Happy testing!


v2.4.1 – Support failing tests if there are focused tests

@haf haf released this Jan 4, 2017 · 106 commits to master since this release

  • This release provides a runTestsWithArgs function which runs the passed tests and also overrides the passed ExpectoConfig with the command line parameters.
  • Expecto now accepts the command line argument --fail-on-focused-tests, which checks if focused tests exist. This parameter can be set in build scripts and allows CI servers to reject commits that accidentally included focused tests.

If someone has focused a test but not unfocused it before committing, you can now have the CI server go red! ;)


v2.4.0 – Welch's T-test statistical performance testing

@haf haf released this Jan 3, 2017 · 134 commits to master since this release

I'm happy to release another minor version of Expecto with a new performance-test feature – namely Expect.isFasterThan.

Don't let the name mislead you. It's actually a more profound test that builds on Student's T-test by using Welch's T-test for validating the hypothesis that the two passed functions are equally fast. Here's a sample:

    testSequenced (testCase "matrix" <| fun _ ->
      let n = 100
      let rand = Random 123
      let a = Array2D.init n n (fun _ _ -> rand.NextDouble())
      let b = Array2D.init n n (fun _ _ -> rand.NextDouble())
      let c = Array2D.zeroCreate n n

      let reset() =
        for i = 0 to n-1 do
            for j = 0 to n-1 do
              c.[i,j] <- 0.0

      let mulIJK() =
        for i = 0 to n-1 do
          for j = 0 to n-1 do
            for k = 0 to n-1 do
              c.[i,k] <- c.[i,k] + a.[i,j] * b.[j,k]

      let mulIKJ() =
        for i = 0 to n-1 do
          for k = 0 to n-1 do
            let mutable t = 0.0
            for j = 0 to n-1 do
              t <- t + a.[i,j] * b.[j,k]
            c.[i,k] <- t
      Expect.isFasterThanSub (fun measurer -> reset(); measurer mulIKJ ())
                             (fun measurer -> reset(); measurer mulIJK ())
                             "ikj faster than ijk")

More information about this feature can be found in the docs.

A big thanks to @AnthonyLloyd for contributing this code!

Happy performance testing!


v2.3.1 – bugfixes

@haf haf released this Dec 29, 2016 · 141 commits to master since this release

Version 2.3.1


v2.3.0 – improved printouts, containsAll function, internal tests

@haf haf released this Dec 25, 2016 · 145 commits to master since this release

In this release I give you an improved containsAll and better string diff messages. Thanks to @MNie for his contributions again!


If you're thinking of contributing, you'll be happy to know, it's even easier to do now, since I've improved the internal tests (very meta).



v2.2.0 - String diffing!

@haf haf released this Dec 23, 2016 · 158 commits to master since this release

In this release @MNie has added string diff support!

It looks like this: