Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session Objectives How to Debug PTF test case/Script Session-6 DebuggingSlide 2.

Similar presentations


Presentation on theme: "Session Objectives How to Debug PTF test case/Script Session-6 DebuggingSlide 2."— Presentation transcript:

1 Session Objectives How to Debug PTF test case/Script Session-6 DebuggingSlide 2

2 Debugging A Test Case Debugging a test in PTF makes it structured and user – friendly and allows us to make modifications for better understanding. Debugging can be done once a test is saved and a log is available. There are 2 ways to debug a test: Debugging Test Editor Debugging Log Session-6 DebuggingSlide 3

3 Debugging in Test Editor Step Into - Executes the current step and advances to the next step. Step Over - Executes the current step of the test and advances to the next step, unless the next step calls another test. Toggle Break - Sets a break point at the selected step or removes an existing breakpoint. Clear All Breaks - Removes all break points. Session-6 DebuggingSlide 4

4 Toggle Breaks Toggle breaks set a breakpoint at the selected step to pause a test or remove an existing breakpoint. Toggle break icon is available on the Test Editor It helps us to stop a test midway and make any changes if required on the online page. To add a toggle break, take the cursor to the sequence next to where you want to pause and click on the icon. To remove a toggle, select the sequence and click on the icon. Session-6 DebuggingSlide 5

5 Debugging - Toggle Toggle Break Test will pause after sequence 105 is executed. Session-6 DebuggingSlide 6

6 Stop on Error Execution is terminated on error if the ‘stop on error’ menu is clicked before executing the test. This option helps the user find the exact test which failed the Shell Test. It also prevents the execution of the remaining test and saves time in the case of large tests. Stop on error Session-6 DebuggingSlide 7

7 Streamline/Improve Performance A script can be debugged in test editor by using the following Modify test data in value column Log messages Page Prompt Error Handling Session-6 DebuggingSlide 8

8 Streamline/Improve Performance Log Message is intended to increase understanding of the test. A log message allows us to insert any message between the test steps without affecting the running of the test. Session-6 DebuggingSlide 9

9 Page Prompt A Page prompt is used to skip navigation steps and reach the desired online page directly. Replaces explicit navigation in the test and takes the user directly to the component search page by URL manipulation PTF page prompting steps make tests more robust and repeatable by simplifying test data Opens a component based on the MENU.COMPONENT.MARKET recognition string If the component has a search page, use the Page.PromptOk action to close the search page. Session-6 DebuggingSlide 10

10 Steps to Add a Page Prompt Go to the required online page Make a note of the Menu.Component.Market string from the URL address Alternatively, press Ctrl + J to find out the string Open the test editor Inactivate/delete all the navigation steps Insert a new row above the navigation steps Add Page/Prompt – To add a Page Prompt Enter the above string in recognition column Enter ADD/UPDATE in the value column for Add/Modify actions Session-6 DebuggingSlide 11

11 How to Pick a String from an Online Page The string can be picked up directly from the URL. This represents Component.Menu.Market. Press Ctrl+J on the online page. This page opens up. The component and menu names are available here. The Market name is normally GBL Session-6 DebuggingSlide 12

12 Screen Shot Log message to explain the steps below is inserted. Menu.Component.Market string for job data page UPDATE action for editing job data Navigation steps inactivated Session-6 DebuggingSlide 13

13 PTF Error Handling To handle errors and warning messages that pop up during the test, PTF uses message recognition. Boeing Recommendation – Capture Warning message only. Use Message Recognition The link becomes activated when Error Handling is checked The number of the warning message, along with desired action is entered here Session-6 DebuggingSlide 14

14 Debugging Log Log can be debugged using the followings Flags in log file Screenshots of the error Highlight errors Session-6 DebuggingSlide 15

15 Flags in Log File Each step of the log has a flag attached to it. The red flag in the logs shows that the step in the test is failed. When it is expanded, the logs also give the reason for the failure. Using the information, the failed step must be fixed The following flags are available in log: Information message only or Information message only or Step was successful or Step was successful, but or with a warning Step failed or The test encountered a or condition that it was not configured to handle Session-6 DebuggingSlide 16

16 Log Message for Debugging The Step with an error is marked in red An explanation of the error is given Session-6 DebuggingSlide 17

17 Screen shots of the Error A Screenshot option is available on the test editor. Whenever a test fails, PTF provides a screenshot of the execution at that point in time which helps in fixing the failed steps. By default, the option to take a screenshot is enabled; however, it can be turned off. Log.SnapShot allows to capture the Screen. Session-6 DebuggingSlide 18

18 Screen shot- Log Clicking on the Icon will open up the Screenshot of the error. Session-6 DebuggingSlide 19

19 Screenshot- Error An Image opens up along with a display of sequence number. Session-6 DebuggingSlide 20

20 Highlight Errors Highlights the failed steps in a log message. A failed step with an error message will be highlighted which helps locate the failed steps easily in case of a huge shell test failure. Highlight errors icon is enabled. Session-6 DebuggingSlide 21

21 Screenshot The execution was stopped as stop on Error was enabled. Session-6 DebuggingSlide 22

22 Training Hand out the Training Material To be completed in 30 minutes Discussion Walk through the Log Explaining the log Results Highlight the Key words and lesson learned Session-6 DebuggingSlide 23

23 Q & A and Comments Session-6 DebuggingSlide 24


Download ppt "Session Objectives How to Debug PTF test case/Script Session-6 DebuggingSlide 2."

Similar presentations


Ads by Google