Live Debug

Live Debug Overview

Live Debug allows a user to interact with a test while it is running on Virtual Machines (VMs) in the Functionize Cloud. This means a user can quickly diagnose test failures or modify tests in a clean execution environment. See also How to Debug a Failing Test Case. We recommend Live Debug as the most robust method to update a test case.

To diagnose tests, set Breakpoints to stop the test execution at certain points, or simply wait for the step to fail. On failure or a breakpoint, the test will automatically pause for 10 minutes. Users can always add more time before the test automatically resumes playback.

Because you are interacting directly with Functionize VM servers, we allow you to use Architect during your test to make workflow changes when the test is paused due to a breakpoint or failure. Architect will also show up when manually pausing the test.

Live Debug is also available for executing Page Objects.

Note: Live Debug is now available in Chrome, Firefox, and Edge browsers. Additionally, tests may run more slowly during a Live Debug or Live Execution run than a Headless Run.

 

Starting a Live Debug Session

  1. Open the Test Detail page of your test, from the Chrome Results tab, click the Execution button and select Live Debug



  1. After a few seconds and the page refreshes, click Watch Now to view the execution

 

Live Debug Controls

  1. Resume, Restart, or Stop test

  2. Time remaining before the test resumes playback automatically and add additional time if needed

  3. Stop and Fail the test and all the subsequent steps

  4. Clear Breakpoints when the test is paused

  5. Close icon to close the Live Debug execution window
  6. Indicates what step is currently being executed
  7. Use to hide the Architect window if not needed
  8. Use to re-execute a specific action
  9. Breakpoint mceclip4.png set on an action
  10. Architect appears when test is paused to record new actions, if necessary

Playback Options

While the test is running, you have the option to Pause the test at any moment. 



When Paused, the test will automatically resume after 10 minutes. You can extend the Pause in five minute increments. After a reasonable length, the machine will automatically shut down if paused for too long. 

You may also Resume, Restart, or Stop the test whit the test is Paused.



You may leave the Live Debug window by clicking the Close icon and return to the Live Debug allowing the user to multi-task in the system. To return to an executing test, just click Watch Now.

 

Setting Breakpoints

Just like a development IDE, we support Breakpoints, allowing the test to manually be paused at certain action. There are two ways to add a breakpoint to a test case. In both cases you can set and unset a breakpoint.

  1. Add a Breakpoint to any step on the Test Details page by hovering near the step number and clicking the grey dot to set the Breakpoint and click the red dot to remove the Breakpoint


  2. Add a Breakpoint to any step while watching the Live Debug execution in real-time when the test is paused by clicking the grey dot and click the red dot to remove the Breakpoint

 

Editing Tests

When a test pauses at a Breakpoint or due to a Failed Action, the Architect will open, allowing you to add actions to alter the test flow.

Live Debug with Breakpoint:

  1. When a test reaches a Breakpoint, the test execution pauses, then click the REC button and do not clear the cookies and/or HTML storage, typically


  2. Record your additional test flow actions and click on Save


  3. Wait for a few seconds for new actions to get loaded in the left action slider panel


Live Debug with Failed Action:

  1. Alternatively, when the test fails, the test will automatically pause on the failed step when running in Live Debug mode so that you can record actions to resolve the failure


  2. When the test stops on the failed action, the Architect will automatically open on the step, from here, simply click on the record icon and start recording actions
  3. Click Save, the new actions will be inserted into the test just after the action the test paused on

Continuing Test Execution with Live Debug

If the test has stopped and you do not want to modify the test, you may simply click the Architect icon in the browser header to hide the architect.




Resume the test at a particular step , or simply click resume in the header navigation. If resuming on a previous step, make sure to start on actions where the site is in the same state that you are currently viewing, or start at PageInit actions in order to successfully resume the test in a similar way that the test would run without interventions.

 

Helpful Hints for Using Live Debug

For the quickest launch of Live Debug tests, do not hard code the Region, let Functionize pick the Region in which to run the Virtual Machine. Generally speaking, it will be run in a US Region, unless specified, as we have the greatest pool of resources available there.

 

Updating Your Region

  1. From the Test Details page, click on the Test Actions menu and click on Test Settings option.


  2. In the Test Settings modal, open the Advanced tab


  3. If the Region field displays 'Select Region', you're all set, the test will automatically be set up to run in the Region with the greatest capacity
  4. If the Region field displays a specific region, and your test is not dependent upon a specific location, just click on the small cross icon then the drop-down will show 'Select Region'


  1. Click on Save

 

Diagnosing Tests Using Live Debug

If you're trying to figure out why a test isn't working, it can be very helpful to use Live Debug in order to see exactly how your site behaves on a clean Functionize Cloud Virtual Machine.

You have full browser control giving you the ability to view Chrome Developer Tools to see Console errors, Network calls, Page Source, and more. If you've determined that an error is occurring due to the test selecting the wrong element, or incorrectly interacting with that element, see How to Debug a Failing Test Case for more details.