Bot releases are visible (Hide)
Published by haf about 7 years ago
Task<T>
extensions for C#, thanks @0x53AExpect.throws
thanks @alex-bogomazisOK
and isError
, thanks @rmunnallExists
and allEqual
thanks @MNiePublished by haf over 7 years ago
In this release we have done some major-version improvements, like adding support for .Net Core out of the box, added Assert functions and improved output for continuous integration systems.
Assert.isOk
and isError
for the new F# result types. (thanks @rmunn)allEqual
assert function (thanks @MNie)Published by haf over 7 years ago
Helping the TeamCity runner along by replacing spaces with underscores and slashes with dots. Thanks @ronniebarker
That's it. Have fun!
Published by haf over 7 years ago
Thanks to @enricosada @cloudRoutine and @forki for help with getting this release out. This release contains primarily bugfixes and pretty-printing changes:
I've changed the colourisation of verbose output and together with @adamchester made the path to the logger be printed. Or in a picture:
This aims to make it easier to see relevant log messages; less clutter.
This means that you can write a test like:
open Expecto
open Expecto.Logging
open Expecto.Logging.Message
let logger = Log.create "MyApp.Tests"
let [<Tests>] test =
testCase "foo bar test" <| fun () ->
let res = app "input string"
logger.debug (eventX "Got {response} from app" >> setField "response")
Expect.equal res "mar foo" "Should return a sensible output"
And have that display nicely in the log when you run mytests.exe --debug
(which enables debug logging)
Also note that you can configure the logger with your own colour palette; have a look at the Logary facade for F# for notes on how.
If you want to get involved, here are a few open issues that could be nice to start with:
They are of varying complexity. We could also use some better docs on how to run stress tests with FsCheck, see https://github.com/haf/expecto/issues/141 for a detailed investigation that would be useful to document.
Another documentation opportunity is to use https://github.com/haf/expecto/issues/136#issue-220219860 as an example of how to write FsCheck tests with Expecto.
Published by haf over 7 years ago
Published by haf over 7 years ago
Published by haf over 7 years ago
Published by haf over 7 years ago
This release marks the start of .Net Core support in Expecto. A big thanks to @cloudRoutine for starting the port, and to @adamchester for going that extra mile and finishing it off!
Also since last release, here's a Roman's photo of Expecto being used for testing hardware chips.
Here's the nuget.org version – enjoy!
Published by haf over 7 years ago
This release makes it easier to reference BenchmarkDotnet
and to write expectations of matching regexes:
Expect.isMatch "{function:45}" "{function:(\\d+)}" "string matches passed pattern"
Expect.isNotMatch "{function:45d}" "{function:(\\d+)}" "string not matches passed pattern"
let regex = Regex("{function:(\\d+)}")
Expect.isRegexMatch "{function:45}" regex "string matches passed regex"
let regex = Regex("{function:(\\d+)}")
Expect.isRegexMatch "{function:45d}" regex "Deliberately failing"
I've also fixed the names of the nuget, from this:
to this:
Published by haf over 7 years ago
A nice new minor release with the fixues from many different people.
asyncTest
workflow builder and updating docsExpecto.Flip
!Expecto.CSharp
open Expecto
open Expecto.Logging
open Expecto.Logging.Message
let logger = Log.create "Sample"
let printingFsCheck =
{ FsCheckConfig.defaultConfig with
receivedArgs = fun config name no args ->
logger.debugWithBP (
eventX "For {test} {no}, generated {args}"
>> setField "test" name
>> setField "no" no
>> setField "args" args)
maxTest = 10000
}
let test =
testPropertyWithConfig printingFsCheck "addition is commutative" <| fun a b ->
a + b = b + a
Published by haf over 7 years ago
Fix #105, #104, #103
Published by haf over 7 years ago
Filtering tests is now unit-tested and working.
Testing,
Let's me do my resting,
Outside of work,
Because I know the code won't bork.
Published by haf over 7 years ago
Thanks to the great work of @AnthonyLloyd we now support stress tests and grouped async/parallel tests in expecto!
You write your tests like normal, and if you want to enable stress testing, just pass the corresponding flag to your executable.
Use testSequencedGroup
to group sequential tests. This means that things which are not sequenced to the group will run in parallel to the group. Docs
More docs in the README.
Published by haf over 7 years ago
Minor improvements to the Expect assertion messages. Thanks to @isaacabraham for his contribution.
Published by haf almost 8 years ago
In this release we have a new logo! Rejoice and thanks to @sergey-tihon for his awesome work! This library now also has a nice twitter account @ExpectoIO.
v3.2.0 is a minor bump in version because we have a new feature – support for ptestProperty
to make test properties pending, support for passing the standard gen-seed to FsCheck and a brand new FsCheck printer that nicely formats the output from FsCheck as it runs. Many thanks go out to @AnthonyLloyd for adding these improvements.
Version 3.0+ introduced a bug when you turn off parallelism with { config with parallel = false }
, causing some test suites to hang and others to crash. This release fixes that bug (#83).
We'd also like some feedback with regards to our plans for supporting stress testing, so if you are on github, do check it out and perhaps give your opinion.
Happy testing!
Henrik
Published by haf almost 8 years ago
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!
Published by haf almost 8 years ago
Fixes #74
Published by haf almost 8 years ago
Published by haf almost 8 years ago
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!
https://video.twimg.com/tweet_video/C1lBWlYWEAATB53.mp4
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!
@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.
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!
Henrik
Published by haf almost 8 years ago
If someone has focused a test but not unfocused it before committing, you can now have the CI server go red! ;)