qacafe - ip test solutions
Knowledge Base > How can I insert a break point into a test?

How can I insert a break point into a test?

Test Execution

When test cases are executed using the buddy -pause option, buddy will automatically stop at each buddy::pause procedure that is called from a test case. The user is prompted to hit the Enter key before the test continues. While the test suite waits for user input, the event loop continues to execute. This allows protocols such as PPP, PPPoE, and DHCP to continue to run. When the -pause option is not specified, buddy ignores the buddy::pause procedures when the test case is executed.

New buddy::pause procedures can be added to a test case to create new break points. The buddy::pause procedure can be called with an optional text message.

Example

proc mytestcase_1 { testNum } {
   global lanStack remoteHost

   buddy::pause "About to start test mytestcase_1"

   # -- perform actual test
}

Enabling pause mode using buddy

To enable pause mode when running tests from the command line with buddy, simply add the -pause option to your command string:

buddy -module nat.tcl -pause

Please see this Knowledge Base article for information on ending pause mode while running.

Enabling pause mode using BuddyWeb

To enable pause mode using BuddyWeb, edit your test package and check off the "Pause between each test case" option. CDRouter will now pause at each break point and between each test case.

Related articles that may also be helpful: