mausch / Fuchu

Functional test library for F# / C# / VB.NET
Apache License 2.0
120 stars 22 forks source link

Better formatting of output #26

Closed haf closed 7 years ago

haf commented 10 years ago

As a tester, When writing failing tests, I want to quickly be able to see differences between expected and actual output And I want to quickly see where there the test cases start and stop in the output.

Example output that takes times to parse:

when serialising MetadataRequest/single topic: Failed:
single topic
Expected: [|0uy; 0uy; 0uy; 1uy; 0uy; 6uy; 116uy; 111uy; 112uy; 105uy; 99uy; 49uy|]
Actual: [|0uy; 0uy; 0uy; 1uy; 116uy; 111uy; 112uy; 105uy; 99uy; 49uy|]
  g:\prg\Fuchu\Fuchu\Assertions.fs(8,1): <StartupCode$Fuchu>.$Assertions.Equal@8.Invoke(String msg)
 (00:00:00.0090713)
when serialising MetadataRequest/three topics: Failed:
three topics
Expected: [|0uy; 0uy; 0uy; 3uy; 0uy; 3uy; 102uy; 111uy; 111uy; 0uy; 3uy; 98uy; 97uy; 114uy;
  0uy; 3uy; 98uy; 97uy; 122uy|]
Actual: [|0uy; 0uy; 0uy; 3uy; 102uy; 111uy; 111uy; 98uy; 97uy; 114uy; 98uy; 97uy; 122uy|]
  g:\prg\Fuchu\Fuchu\Assertions.fs(8,1): <StartupCode$Fuchu>.$Assertions.Equal@8.Invoke(String msg)
 (00:00:00.0022625)
13 tests run: 11 passed, 0 ignored, 2 failed, 0 errored (00:00:00.0878414)
``
mausch commented 10 years ago

I like this idea. I'm thinking of implementing this as an overload of Equal with an additional parameter 'a -> 'a -> string doing the diff. But I want to be very careful about "convenience" overloads in assertions, their number can easily get out of control.

haf commented 9 years ago

Any progress the last year on this?

mausch commented 9 years ago

Nope, I didn't implement anything about this.

haf commented 9 years ago

What are your plans with this this library?

mausch commented 9 years ago

As with most of my OSS work, I don't have any particular "plans" for it. I work on new features as I need them. I offer help and advice to others when I can, and try to review pull requests whenever I have some time.

haf commented 8 years ago

It would also be nice if it didn't print to both stdout and trace, because they git mixed together in XS. Beyond what the topic initially was about.