1

I would like to get the name of the currently executing canopy test inside the before function.

Is there some kind of global context I can refer to or do I need to dive into selenium?

Nick
  • 6,366
  • 5
  • 43
  • 62
  • 3
    It doesn't look like Canopy keeps a mutable context object that gets updated as tests run. If your test functions have names, you might be able to do something clever with https://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace(v=vs.110).aspx to get the name of the current function, and print that. But that won't get you the description of the function, and the usual Canopy style is `"test description" &&& fun _ -> (test body)`. And that just creates an anonymous lambda function, which means StackTrace won't help. – rmunn Jun 19 '17 at 16:16
  • Thought that might be the case! – Nick Jun 19 '17 at 16:49

0 Answers0