Chuck Tomasi

3 minute read

The good stuff just keeps getting better! As if Automated Test Framework (ATF) wasn’t handy enough, we’ve improved it based on your suggestions in the Community Idea Portal to make debugging even better.

Background

ATF is an in-platform tool to let you author and run functional tests on your apps (custom or OOB). Use it to ensure developer configurations work as expected before going to production and before/after upgrades. Once built, the tests are easy to run again and again. No more setting up a spreadsheet full of instructions for an intern to run and hope you get back meaningful results. ATF solves all that.

Breakpoints

One of the improvements we heard was that ATF debugging would be far more useful if ATF developers could ‘pause’ a test at certain points to ensure ATF was doing what they expect. Concepts like this have been available in scripting/coding environments for years; they’re called breakpoints. For ATF, simply right-click on the step (in the Test Steps related list) where you want the test to pause and choose Add/Remove Breakpoint (1). You can tell which steps have breakpoints associated by the red indicator (2). An entry is also added to the Breakpoints related list (3). Next, run the test with the Debug Test UI action button. The system pauses the test at that step. You can then examine records, values, logic, etc. then either continue execution one step at a time (Step over) or have the test run to completion - or the next breakpoint if there are any. The step over and continue option are available in the modal and client runner.

2022-03-09-08-10-38.png

Breakpoints pause test execution for up to 10 minutes so if you decide to go poking around other records, be aware that your test will start running again if you take longer than 10 minutes.

Breakpoints are also user specific so if I’m running a test and pause at a breakpoint, and Brad decides to debug the same test, his breakpoints are his own, they do not interfere with mine.

Finally, to remove a breakpoint use the same right-click action Add/Remove Breakpoint on the step.

Also note that using the Run Test button ignores breakpoints.

Pause before rollback

The other big suggestion we heard was that you wanted a way to look at records, examine logs, review notifications and more, before the system does a rollback on the data. Well, now it’s possible. When you lauch a test, there’s a checkbox on the model that allows you to pause before rollback. Simply check the checkbox (shown below) when you debug a test.

Think of this as a breakpoint after the last step. That last step may be important validation that needs to happen before the rollback.

2022-03-09-08-17-33.png

Be sure to check out the Creator Toolbox session on ATF Debugging to learn more.

Thank you for your input and keep those ideas coming!

Other resources


Comments