Documentation ¶
Overview ¶
Package debug provides an API to add breakpoints to the test to debug its execution.
The functions defined in this package must only be used for local debugging and require that the test be run in Debug Mode. If a breakpoint is reached when not in debug mode, the test will fail there and then. Therefore, no tests with breakpoints should be committed to any persistent repository
To insert a simple breakpoint in your code, use:
ondatra.Debug().Breakpoint(t)
For more informative breakpoints, the Debug.Breakpoint and Debug.Breakpoint functions allow you to include custom text in the breakpoint message:
ondatra.Debug().Breakpoint(t, "this should be unreachable") ondatra.Debug().Breakpointf(t, "myVar has value %v", myVar)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Debug ¶
type Debug struct{}
Debug is the Ondatra debug API.
func (*Debug) Breakpoint ¶
Breakpoint inserts a breakpoint in the test and prints fmt.Sprint(a...) in the breakpoint message.