You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
moduleExpectoLoggingopenExpectoopenExpecto.LoggingopenExpecto.Logging.Messageletlogger= Log.create "Logger"[<Tests>]lettests=
testList
"all tests"([1..10]|> List.map (fun i ->
testCase $"failing test {i}"(fun()->
logger.info (eventX "Info from test before {testNumber}">> setField "testNumber" i)
Expect.isFalse true"Expected false")))[<EntryPoint>]letmain argv =
Tests.runTestsInAssemblyWithCLIArgs [] argv
I was expecting that logs from assertions and my custom logs would be grouped together and the order would be preserved,
that is having 3 tests:
"a"-> which logs "x" and then fails on assertion,
"b" -> which logs "y" and then fails on assertion,
"c" -> which logs "z" and then fails on assertion
expected output would be something like
-----test "a"------
"x"
Expected false
-----test "c"------
"z"
Expected false
----- test "b"------
"y"
Expected false
However, my custom logs in output are disconnected from its wrapping testCase - they are not grouped.
I'm not sure if I have missed something in documentation and this should be done differently to make it working.
Do you have any hints how could I achieve this behaviour?
The text was updated successfully, but these errors were encountered:
Hi,
following steps specified in section about test parallelism https://github.com/haf/expecto#about-test-parallelism
I've created a few tests with logging inside to check how logging behaves.
I was expecting that logs from assertions and my custom logs would be grouped together and the order would be preserved,
that is having 3 tests:
"a"-> which logs "x" and then fails on assertion,
"b" -> which logs "y" and then fails on assertion,
"c" -> which logs "z" and then fails on assertion
expected output would be something like
-----test "a"------
"x"
Expected false
-----test "c"------
"z"
Expected false
----- test "b"------
"y"
Expected false
However, my custom logs in output are disconnected from its wrapping testCase - they are not grouped.
I'm not sure if I have missed something in documentation and this should be done differently to make it working.
Do you have any hints how could I achieve this behaviour?
The text was updated successfully, but these errors were encountered: