This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/02-Keyword/common/Test_Util.robot
2020-12-15 19:58:08 +08:00

74 lines
2.2 KiB
Plaintext

*** Settings ***
Resource ../../03-Variable/BifangApiVariable.txt
Resource Util.robot
Variables ../../05-Other/variable/my3.py
Variables ../../05-Other/variable/my.py
Variables ../../05-Other/variable/my1.py
Variables ../../05-Other/variable/my2.py
*** Variables ***
@{list1} a b c d
&{dict} name=cary age=21
@{list2} ${1} e ${3.14}
*** Test Cases ***
Test-GetLastLastNTimeSEndTime
[Tags] test
${startime} ${endtime} GetLastNTimeSEndTime 3
log ${startime}
log ${endtime}
Test-SystemCommandReturnCompare
[Tags] test
${rescode} SystemCommandReturnCompare ipconfig ${EMPTY} ${EMPTY}
Should Be Equal As Strings ${rescode} 200
${instring} create list 子网掩码 255.255.252.0 IPv4 地址 192.168.32.18
${notinstring} create list 255.255.252.11 192.168.32.19
${rescode} SystemCommandReturnCompare ipconfig ${instring} ${notinstring}
Should Be Equal As Strings ${rescode} 200
${instring} create list IPv4 地址 . . . . . . . . . . . . : 192.168.32.18
#子网掩码 . . . . . . . . . . . . : 255.255.252.0
${notinstring} create list 子网掩码 . . . . . . . . . . . . : 255.255.252.0 IPv4 地址 . . . . . . . . . . . . : 192.168.32.18
${rescode} SystemCommandReturnCompare ipconfig ${instring} ${notinstring}
Should Be Equal As Strings ${rescode} 200
Test-GetRandomIP
[Tags] test
${ip} GetRandomIP ipv4
log ${ip}
${ip} GetRandomIP ipv6
log ${ip}
Test-Variable
[Tags] test
log ${myname}
log ${MY_VAR}
log ${VARIABLE}
log ${ANOTHER_VARIABLE}
log ${INTEGER}
log ${STRINGS}
log ${NUMBERS}
log ${MAPPING}
log pass
log ${list1}
log ${dict}
log ${list2}
Test-my
log ${AREA1}
log ${AREA2}
log ${get_area}
log ${RANDOM_INT}
Test-my3
log PASsssssssssssssssssssss
log ${VARIABLE}
log ${ANOTHER VARIABLE}
log ${INTEGER}
log ${STRINGS}
log ${NUMBERS}
log ${MAPPING}
log ${DXY}