Provar Automation Advanced: Debugging
Course Contributor: Jatin Sukhija and Harpreet Bedi
Course Designer: Caroline Smith
The purpose of this course is to show you recommended debugging practices with Automation
to help you find and fix errors quickly.
We want to make your University of Provar experience as accessible as possible. Please note
that you can navigate directly to lesson content and skip sidebar navigation if you are tabbing
through our course with a screen reader. You can also use these keyboard shortcuts for
alternative navigation.
NOTE: Provar Automation Advanced courses are best completed in conjunction with the use
of our Automation product. Please contact sales@[Link] to learn more about
becoming a customer.
INTR ODUC TION
Getting Started
DEBUGGING
Debugging with Test Builder
Logs in Provar Automation
Debug Mode
WR AP UP
Quiz
Summary & Badge
Course Transcript
Tell us what you think!
Lesson 1 of 8
Getting Started
By the end of this course, you will be able to. . .
Debug tests with Test Builder
Debug errors with logs in Provar Automation
Debug custom code with Debug mode
This course should take about 30 minutes, and you will earn an Advanced Debugging badge upon
completion.
Lesson 2 of 8
Debugging with Test Builder
Debugging Navigation
Debugging is the process of detecting and removing both existing and potential errors in your
code, which can cause unexpected bugs and crashes. With Provar Automation's Test Builder, you
can debug as you build your tests. Click to flip through the cards below to familiarize yourself with
Test Builder's directional controls for debugging.
Move the test step back
without executing the step
1 of 5
2 of 5
Pause the test while executing
Step forward and execute the
current step
3 of 5
Continue the test case until
the next breakpoint or the end
of the test
4 of 5
5 of 5
Stop the test execution
In addition to the controls at the top of the Test Builder, you can also use Step To to navigate to a specific
test step anywhere in the test. This will re-navigate Test Builder to the defined point without executing other
steps.
Breakpoints
Breakpoints are recommended to debug an issue or to add new test steps in the middle of a test.
Setting a breakpoint on a test step will mean that the Test Builder will pause execution on this
step once it is reached.
Add a breakpoint to a test step by right-clicking on the test step in Automation and selecting Toggle
Breakpoint.
Another option is to directly add a breakpoint from a live session in Test Builder by right-clicking the step and
choosing Toggle Breakpoint.
Test Builder Logs
Test Builder offers logs to help you inspect and debug your test cases.
Test Step Ouput
You can view the detailed log file for any test step by right-clicking on the step in the Test Builder.
Test Builder Console Log
You can also check issues in Test Builder with its own console log. From the top of Test Builder, click
Window and then Inspect to view it.
Lesson 3 of 8
Logs in Provar Automation
Logs help tremendously when
debugging an issue. Identifying what
the error is and where it is located
makes it much easier to correct.
Console logs
Console logs are generated by default from Provar Automation and can be seen in Provar Studio
console logs. Note that warnings are displayed in yellow, and errors are displayed in red.
CO N T IN U E
.Log file
The .Log file contains detailed Provar-specific logs, including Plugin logs, Editor (Provar Desktop
logs), and metadata error logs. You can access it in your workspace directory with the following
path: workspace—> .metadata folder—> .log.
CO N T IN U E
WebDriver Logs
WebDriver logs have details about your test run, including browser capabilities, browser options,
Proxy details, PageLoadStrategy, desiredCapabilities, and detailed logging about every test step.
They are generated when you run your test case.
To configure them, go Test Settings in Provar Automation and click Variables. Click the + icon. This will open
a new window.
In the new window, set the Variable Name to _webDriverLogFile. For the Default Value, provide the path of
the text file where you want to store the logs. Click OK. Now your logs will be stored in the
[Link] file when your execution is complete.
CO N T IN U E
ANT Logs
There are several log options when running your test cases via ANT log files. The Logging Level
controls the amount of detail logged into the ANT log file during test execution. It applies to the
testOutputLevel and pluginOutputLevel attributes. Click through the images below to learn more
about each.
The Test Output Log controls the amount of test output logged to
the ANT test log.
The Plugin Output Log controls the amount of plugin output
logged to the ANT test log.
CO N T IN U E
Chrome Debug Logs
Provar Automation creates a Chrome debug log in your workspace. If any issues occur with the
browser, you can find this log by following this path in your workspace:
workspace/.chromeprofiles/profile0/chrome_debug.txt.
CO N T IN U E
Plug-in Logs
The Plug-in logs can help debug issues with Provar Automation's connection to Salesforce. You
can access it from the Test Plug-ins tab.
Lesson 4 of 8
Debug Mode
Custom Code in Provar Automation
Before we start debugging, let's discuss the two ways to write your own Java code in Provar
Automation: custom APIs and page objects.
C U S T O M A PI PA G E O BJ E C T
Custom APIs are a way to extend the standard features of Provar Automation by writing your own logic in the
form of an API and invoking it easily across all test cases.
Note: For more information, check out our 5-Minute Microlearning: Custom APIs in Provar Automation.
C U S T O M A PI PA G E O BJ E C T
A page object is a custom function that is used to execute Java code on a page object within Provar
Automation. You can use a page object operation in your test case when you need to perform UI testing that
is either not possible or too complex to achieve using the standard Provar test step types.
With page objects, you generally need to write the Java code in a function and call it into your test
case on a page object. You can see an example of this in the video below.
Debugging Custom Code
Before you start debugging, it will help to familiarize yourself with some key terms. Click the + to
learn more about each one.
Step Over
–
This option lets the application execute the next action. If the action involves a call to an operation, it does
not step into its implementation. Instead, it steps over it.
Step Into
–
This option lets the application execute the next action. If the action involves a call to an operation, it steps
into its implementation and breaks the execution on the first action of that implementation.
Step Return
–
This option lets the application execute until the currently executed operation implementation is returned.
Resume
–
This option will resume the execution.
Now let's see how page object and custom API options can help you debug and find errors quickly.
Click through the slides below to learn more.
Debugging with Provar Automation
Step 1
Add a breakpoint
Add a breakpoint on the step from where you want to start debugging in the page object or
custom API. To add a breakpoint on a page object, right click on the the line where you want to
add it and click Toggle Breakpoint.
Step 2
Call the page object or custom API in the test case
Step 3
Switch to Debug perspective
Step 4
Run your test case in Debug mode
Step 5
Stop at the breakpoint
When you run your test in Debug mode, it will stop where you added the breakpoint. When this
happens, go to the Debug section in the top left corner and click the
[Link] line number. The example above shows
[Link](String) line:34.
Step 6
Choose your Debugging option
Lesson 5 of 8
Quiz
Question
01/05
What is the variable name to get your WebDriver logs?
_webDriverLogs
_webDriverFile
_DriverFile
_webDriverLogFile
Question
02/05
What debug options are there in Test Builder?
Move the test step back without executing the step.
Pause the test while executing.
Step forward and execute the current test step.
Continue the test case until the next breakpoint or the end of the test.
Stop the test execution.
All of the above.
Question
03/05
The .log file is present in which folder?
src folder
.metadata folder
tests folder
lib folder
Question
04/05
Which option allows you to navigate to a specific test step anywhere in the test case?
Step Down
Step To
Step Up
Step From
Question
05/05
Which option will you select to switch to Debug mode using Automation?
Switch to Debug perspective
Switch to Team Synchronizing perspective
Switch to Git perspective
None of these
Lesson 6 of 8
Summary & Badge
Congratulations on completing the Advanced Debugging course.
You should now be able to. . .
Debug tests with Test Builder
Debug errors with logs in Provar Automation
Debug custom code with Debug mode
You've also earned a Advanced Debugging badge. You can view your badge under “My Badges” on UP.
Lesson 7 of 8
Course Transcript
File Attachment Block
No file added
Lesson 8 of 8
Tell us what you think!
First name* Last name*
Email*
Country
Please Select
What course are you providing feedback for?