Open forki opened 7 years ago
I do screenshots on any failure in canopy, but the only way I know to do it is in the runner. Do you know if Expecto has an "On Fail" thing we can hook into and make it screenshot then?
/cc @haf @Krzysztof-Cieslak
open Expecto
let testCase name fn =
testCase name <| fun () -> try fn () with e -> // take screenshot
That's a really nice way to do it. Thanks.
Am 24.12.2016 7:31 nachm. schrieb "Henrik Feldt" notifications@github.com:
open Expectolet testCase name fn = testCase name <| fun () -> try fn () with e -> // take screenshot
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Canopy.Mobile/issues/14#issuecomment-269095350, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNFxYij1XQLhD8VyqvWROLxqZzlEVks5rLWTxgaJpZM4LUqPF .
Actually this is so simple and yet so effective. Decades of nunit style have made me a bit blind.
Am 24.12.2016 7:34 nachm. schrieb "Steffen Forkmann" sforkmann@gmail.com:
That's a really nice way to do it. Thanks.
Am 24.12.2016 7:31 nachm. schrieb "Henrik Feldt" <notifications@github.com
:
open Expectolet testCase name fn = testCase name <| fun () -> try fn () with e -> // take screenshot
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Canopy.Mobile/issues/14#issuecomment-269095350, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNFxYij1XQLhD8VyqvWROLxqZzlEVks5rLWTxgaJpZM4LUqPF .
this works very well. we should document it
When a find operation times out we should capture a screenshot and trace other avaliable elements. @lefthandedgoat is there already a special way how canopy proper does it? I personally would use a configuration variable for the path and just activate this by default. It's probably also important to trace other elements that we can find on the page.
@part-timedev this is particularly important on the CI. Do we already know if we can tell gitlab that we have special artifacts?