Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2.

Similar presentations


Presentation on theme: "Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2."— Presentation transcript:

1 Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2

2 Reserved Words Reserved Words have special meaning to PTF. Each of these words predefined to perform specific functions when used in a test. Ex.: #TODAY – Applies the current date to the field against which it is entered. Reserved words are useful when data is not known before the test is executed. Reserved words enable you to access data available from the PTF program when a test is executed. Session 8 - Reserve Words and ConditionalSlide 3

3 Reserved Words #DIS# #DTTM #EXIST# #FAIL# #CHECK# #LIKEF #LIKEW# #NOTEXIST# #PREFIX# Session 8 - Reserve Words and ConditionalSlide 4

4 Reserved Word – #DIS# Verifies a value and checks whether the object is display- only. Logs a Fail if the object is not display-only If you use #DIS# without a value, then the value is ignored and #DIS# only checks for whether the field is disabled. This reserved word is useful when, the object is visible but not editable. Reserve Word #DIS# Session 8 - Reserve Words and ConditionalSlide 5

5 Reserved Word – #DTTM #DTTM Populate current date and time into a field. Reserve Word #DTTM Session 8 - Reserve Words and ConditionalSlide 6

6 Reserved Word – #EXIST# Verifies a field exists and return the Value ‘Pass’ if field exists else ‘Fail’ If a value is passed, set the field to value. Example The first step checks for whether the designated Work Location Id field exists in the application and logs a fail if it is not found. The second step not only checks for the existence of the field; it attempts to enter the value 003 into it. Reserve Word #EXIST# Session 8 - Reserve Words and ConditionalSlide 7

7 Reserved Word – #FAIL# Performs comparison but does not update the value. A Fail is logged if value is not matched else a pass is logged Similar Reserved Word - Check Example In this example, the PTF logs a fail if the Desig Work Location Field is not equal to 003. Reserve Word #FAIL# Session 8 - Reserve Words and ConditionalSlide 8

8 Reserved Words- #CHECK# Performs Comparison in an object against the expected value. Updates the value if data does not match Would not update the value if data matches Example In this example, the PTF sets the value to KUSPTEST Session 7 - Reserve Words and ConditionalSlide 9

9 Reserved Word – #LIKEF# (LikeFail) Look for Similar Values, not an exact match Similar match is not found, it logs a Fail. Type of MatchPatternMatch (Log a Pass) No Match (Log a Fail) Multiple charactersa*aaa, aBa, aBBBaABC Multiple characters*ab*abc, AABB, XabaZb, bac Multiple charactersab*abcdefg, abccab, aab Reserve Word Example #LIKEF# Some fields contain the current date and time. Use the #LIKEF##TODAY* Session 8 - Reserve Words and ConditionalSlide 10

10 Reserved Word – #LIKEW# (Like Warning) Look for Similar Values, not an exact match Similar match is not found, it logs a Warning. Example Reserve Word Matches the wild card string, the status is Green #LIKEW# Status of the comparison #LIKEW# Session 8 - Reserve Words and ConditionalSlide 11

11 Reserved Word – #LIKEW# (Like Warning) Look for Similar Values, not an exact match Similar match is not found, it logs a Warning. Example Reserve Word When the wildcard string does not have similarvalue#LIKEW# Status of the comparison when does not match Session 8 - Reserve Words and ConditionalSlide 12

12 Reserved Word – #NOTEXIST# The opposite of the #EXIST# reserved word, #NOTEXIST# verifies that a field does not exist. If the field does not exist, a Pass is logged, else a Fail is logged. Reserve Word #NOTEXIST# Session 8 - Reserve Words and ConditionalSlide 13

13 Reserved Words – #PREFIX# Substitutes the text in the Prefix field in the Test Editor for the #PREFIX# string in the value field. Appends the text if #PREFIX# reserved word is used at the beginning of the text in the Value field. This substitution enables to modify test data. This substitution is useful when same test has to be run on different employee id’s or on different effective dates. Prefix – Mail ID Session 8 - Reserve Words and ConditionalSlide 14

14 Reserved Words – #PREFIX# Using #PREFIX# reserve words, the effective date value coule changed and used in the Test Prefix – Eff. Date Session 8 - Reserve Words and ConditionalSlide 15

15 Object Type – Conditional Conditional logic enables PTF it to take action based on fulfillment/non- fulfillment of a condition. Action ‘If_Then’ – Validate the given Condition Action ‘End_If’ – Close the Statement of ‘If_Then’ Between the above two statements, the set of steps which can be executed when the condition is correct. ret=&variable - returns the value of the field acted upon into the variable. ‘Else’ is not available. Nested condition cannot be performed. Online Page Field cannot be used to compare the value. Value should be retrieved from the Field name and assign it to Variable. Session 8 - Reserve Words and ConditionalSlide 16

16 FLOWCHART OF CONDITIONAL LOGIC PTF Steps True Condition False Steps Executed Rest of PTF Steps Session 8 - Reserve Words and ConditionalSlide 17

17 Steps to add Conditional Logic Record the test and save it Go to the Test Editor and insert a new row Make a note of the field which needs to be verified Type/Exist – to verify the field/button etc. Under recognition, give the field name followed by ret=&var (Returns value to Variable) Conditional/If_Then – to apply a condition to the variable Enter the action to be performed in the next row, if the conditional holds true Conditional/End_If – to end the conditional Session 8 - Reserve Words and ConditionalSlide 18

18 Online Page – Conditional Concept: Special steps based on the information gathered from the application during a test If the work location code is blank then it is filled Session 8 - Reserve Words and ConditionalSlide 19

19 Object Type – Conditional Concept: How to use the Object Types,Actions : Conditional,If_Then,End_If Conditional If Then &Var=/<> Value &x1 = ‘075’ Conditional End If Session 8 - Reserve Words and ConditionalSlide 20

20 Object Type – Conditional Concept: Syntax for If_Then How to use the Object Types,Actions : Conditional,If_Then,End_If If_Then supports these logical operators: <>, >=,, <, = Format/Syntax Conditional.If_Then Enter Condition in Recognition Column. Session 8 - Reserve Words and ConditionalSlide 21

21 Log – Conditional Session 8 - Reserve Words and ConditionalSlide 22

22 Business Usage – Conditional The following are examples of various business cases where the conditional logic has been used in PTF: While hiring a person, on entering his name, if duplicate names are found, then a message pops up which is tackled through conditional logic. While modifying the Job Code in Job Data of a Person, if the Job Code has a Union Code, then other Union fields such as Union Seniority Date are filled. Session 8 - Reserve Words and ConditionalSlide 23

23 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 8 - Reserve Words and ConditionalSlide 24

24 Q & A and Comments Session 8 - Reserve Words and ConditionalSlide 25


Download ppt "Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2."

Similar presentations


Ads by Google