Automated Test Frame RRAFS --- Saftware Automation Framework Support - 6

zhaozj2021-02-16  58

three. Component command processing

Example: t loginwindow loginwindow verfyproperty caption ^ Title

1) Open the stepdriver.sbl file

2) Position to the SDSTepdriver function, call the SDProcessTeStrecord function processing according to the record type

Function pieces:

Select Case Recordtype

Case DDU_Driver_Command, DDU_Driver_command_failok, DDU_Driver_command_warnok

Result = DDEDRIVERCOMMAND (Stepdrivertestinfo, StepdriverInfo)

Case DDU_SKIP_TEST_STEP

Result = ddeskippedRecord (StepdrivertestInfo, StepdriverInfo)

Case DDU_TEST_STEP, DDU_TEST_STEP_FAILOK, DDU_TEST_STEP_WARNOK

Result = SDPROCESSTSTRECORD ()

Case DDU_BLOCKID

Result = DDEPROCESSBLOCKID (StepdrivertestInfo, StepdriverInfo)

Case DDU_BREAKPOINT

IF DDU_BREAKPOINTS_ENABLED THEN

DDU_BREAKPOINTS_MODE = 1

Log Message "Breakpoint At Line" & STR $ (StepdriverInfo.Linecount) & "in" & FileName, FAC

END IF

Goto Mainloop

'Implied Script? Or unknown record Type

Case Else

Result = DDEIMPLIEDCALLScript (RecordType, Stepdrivertestinfo, StepdriverInfo)

End SELECT

3) Depending on the component type call processing command (SDPROCESSTSTRECORD code snippet)

SELECT CASE UCase $ (. CompType)

Case "window"

WindowFunctions

Case "generic"

'Process by class?

IF strcomp (.compclass, "sstree", 1) = 0 THEN

SSTreeFunctions

Elseif Strcomp (.COMPCLASS, "VSFLEXGRID", 1) = 0 THEN

VSFlexGridFunctions

Else

GenericObjectFunctions

END IF

Case "Checkbox"

Xxxxxxxxxxx

Case "other"

'Process by class?

WindowFunctions

Case Else

'Default to WindowFunctions?

GenericObjectFunctions

End SELECT

4) Call the main function in the WindowFunctions.sbl file, because the Window does not process verifyproperty, then call HandleGenericCommand function processing

5) Open genericObjectFunctions.sbl to find the function handlenergy, where VerifyProperty is not processed, he calls genericunimplementCommand6) Open genericmasterfunctions.sbl, find genericunimplementCommand

7) Locate the place to handle generic_verify_property_command

8) Open genericmasterfunctions.sbl positioning to the processing function GenericverIfyProperty

Summary: SDSTepdriver-> SDProcessTeSTRecord-> Processing Function (WindowFunctions)

Summary: Through the above example we have a rough impression of the running process of the test framework. Run trend, process process. The analysis of the upper process is to better master the test automation framework, let everyone develop a test automation framework that meets their own companies to test software. I will also gradually introduce and the actual examples in the back.

转载请注明原文地址:https://www.9cbs.com/read-23762.html

New Post(0)