164 lines
9.2 KiB
Plaintext
164 lines
9.2 KiB
Plaintext
|
*** Settings ***
|
|||
|
Resource ElementPath_XC.robot
|
|||
|
Library SSHLibrary
|
|||
|
Resource ../RE0_Common/KeyWord.robot
|
|||
|
Library String
|
|||
|
|
|||
|
*** Keywords ***
|
|||
|
SequoiaDB备份
|
|||
|
[Arguments] ${SequoiaDB_Agent} ${mds_name} ${encryption_attr} ${compress_attr} ${dedup_attr} ${encryption} ${compress} ${deduped} ${bk_cache} ${slave}
|
|||
|
元素点击 ${Timed_DataProtect} 点击进入定时数据保护页面 定位定时数据保护失败
|
|||
|
${date} Evaluate time.strftime('%Y%m%d%H%M%S',time.localtime()) time
|
|||
|
${random_strategyName}= Catenate SEPARATOR=_ 巨杉 ${date}
|
|||
|
${createpolicy} Catenate SEPARATOR= 新建了策略[ ${random_strategyName} ]
|
|||
|
Set Suite Variable ${random_strategyName}
|
|||
|
Set Suite Variable ${createpolicy}
|
|||
|
元素点击 xpath=//span[text()="${SequoiaDB_Agent}"]/../../td[1] 点击选择集群 定位集群所在位置失败
|
|||
|
元素点击 xpath=//span[text()="${SequoiaDB_Agent}"] 点击选择集群 定位集群所在位置失败
|
|||
|
Sleep 5s
|
|||
|
元素点击 ${Add_clusterPolicy} 点击添加策略按钮 定位添加策略按钮失败
|
|||
|
元素点击 xpath=//i[@class="icon iconfont icon-SequoiaDB"] 点击SequoiaDB组件 定位SequoiaDB组件失败
|
|||
|
sleep 5s
|
|||
|
元素输入 ${Set_PolicyName} ${random_strategyName} 定位策略名输入框失败
|
|||
|
元素点击 ${Sequoia_next_step2} 点击下发策略下一步 定位下发策略下一步失败
|
|||
|
元素点击 ${Sequoia_next_step3} 点击节点类型下一步 定位节点类型下一步失败
|
|||
|
元素点击 ${Sequoia_next_step4} 点击连接凭据下一步 定位下一步按钮失败
|
|||
|
Run Keyword If ${slave}==1 勾选数据节点
|
|||
|
... ELSE IF ${slave}==0 勾选编目节点
|
|||
|
元素点击 ${Sequoia_next_step5} 进入到任务周期页面 定位下一步按钮失败
|
|||
|
元素点击 ${Add_TaskCycle} 点击添加任务周期 定位添加任务周期按钮失败
|
|||
|
元素点击 ${Full_Backup} 勾选完全备份 定位完全备份元素失败
|
|||
|
Sleep 2s
|
|||
|
元素点击 ${Cycle_Once} 设置任务仅执行一次 定位仅执行一次失败
|
|||
|
元素点击 ${Cycle_Confirm} 确定任务周期设置完毕 定位任务周期设置失败
|
|||
|
元素点击 ${Cycle_NextStep} 点击下一步进入备份集存储设置界面 定位下一步失败
|
|||
|
元素点击 ${Manual_ChooseMDS} 点击勾选手动选择介质 定位选择介质失败
|
|||
|
元素点击 ${Select_MDS_DM} 点击介质选择按钮 定位介质选择按钮失败
|
|||
|
元素点击 xpath=//select[@id="dialogues_addCycleStorage_storagePath_selectMedia_selectedMdsIP_select"]/option[@label="${mds_name}"] 点击选择指定介质 定位指定介质失败
|
|||
|
Run Keyword If ${dedup_attr}==1 重删
|
|||
|
... ELSE Log 不勾选重删
|
|||
|
元素点击 ${Storage_NextStep} 点击下一步进入到备份高级选项 定位下一步失败
|
|||
|
log 进入备份高级选项
|
|||
|
Run Keyword If ${encryption_attr}==1 加密
|
|||
|
... ELSE Log 不勾选加密
|
|||
|
Run Keyword If ${compress_attr}==1 压缩
|
|||
|
... ELSE Log 不勾选压缩
|
|||
|
元素点击 ${Change_Cache} 更改缓存 定位更改缓存选项失败
|
|||
|
sleep 5s
|
|||
|
元素输入 ${Cache_Path} /opt 定位缓存路径输入框失败
|
|||
|
元素点击 ${Fin_CachePath} 缓存路径设置完毕 定位缓存路径设置确定按钮失败
|
|||
|
循环点击 ${Complete_Policy_Create_No_Info} ${Success_Confirm}
|
|||
|
sleep 2s
|
|||
|
元素点击 ${Success_Confirm} 确定策略创建成功 策略创建失败
|
|||
|
元素点击 ${BackupSet} 点击进入备份集一栏 定位备份集栏失败
|
|||
|
Sleep 60s
|
|||
|
Wait Until Page Contains Element xpath=//*[@id="backupSetTable"]//tr[2]/td[text()="已完成"] 180s 备份未完成
|
|||
|
Log 备份完成
|
|||
|
sleep 10s
|
|||
|
${View2}= Catenate SEPARATOR= //*[@id="compileBackupViewId ${random_strategyName} "]
|
|||
|
循环点击 ${BackupSet} ${View2}
|
|||
|
sleep 10s
|
|||
|
元素点击 ${View2} 点击进入备份集详情 定位备份集详情失败
|
|||
|
Sleep 10s
|
|||
|
压缩属性校验 ${compress}
|
|||
|
加密属性校验 ${encryption}
|
|||
|
重删属性校验 ${deduped}
|
|||
|
缓存属性校验 ${bk_cache}
|
|||
|
元素点击 ${Attr_Cancel} 点击取消关闭备份集详情弹窗 定位取消按钮失败
|
|||
|
Log 备份集属性确认完毕
|
|||
|
Sleep 2s
|
|||
|
|
|||
|
SequoiaDB恢复
|
|||
|
[Arguments] ${agnet_name} ${SequoiaDB_Agent}
|
|||
|
sleep 5s
|
|||
|
元素点击 xpath=//span[text()="${SequoiaDB_Agent}"] 点击选择集群 定位集群所在位置失败
|
|||
|
元素点击 ${BackupSet} 点击进入备份集一栏 定位备份集栏失败
|
|||
|
循环点击 ${BackupSet} ${Click_recover}
|
|||
|
元素点击 ${Click_recover} 点击恢复 定位恢复按钮成功
|
|||
|
元素点击 xpath=//*[contains(@value, "${SequoiaDB_slave}(")] 点击选择需要恢复的主机 定位点击选择需要恢复的主机
|
|||
|
元素点击 xpath=//dd[contains(text(), "${agnet_name}(")] 点击选择恢复主机 定位点击选择恢复主机
|
|||
|
元素点击 ${Recover_mysqlNextstep} 点击下一步进入到高级选项 恢复目标选项定位失败
|
|||
|
元素点击 ${Recover_Change_Cache} 更改缓存 定位更改缓存选项失败
|
|||
|
元素输入 ${Recover_CachePath} /opt 定位缓存路径输入框失败
|
|||
|
元素点击 ${Fin_Recover_CachePath} 缓存路径设置完毕 定位缓存路径设置确定按钮失败
|
|||
|
Sleep 2s
|
|||
|
元素点击 ${Recover_mysqlfinish} 点击确定 定位确定按钮失败
|
|||
|
Sleep 2s
|
|||
|
元素点击 ${Success_Confirm} 恢复策略确定创建成功 恢复作业创建成功弹窗定位失败
|
|||
|
元素点击 xpath=//span[text()="${agnet_name}"] 点击选择代理 定位代理所在位置失败
|
|||
|
元素点击 ${Policy_Work} 点击进入作业栏 定位作业栏失败
|
|||
|
Sleep 30s
|
|||
|
Wait Until Page Contains Element ${Recover_Success} 180s 恢复失败
|
|||
|
sleep 2s
|
|||
|
Log 恢复成功
|
|||
|
|
|||
|
立即执行备份策略
|
|||
|
[Arguments] ${bk_type} # 立即执行的备份类型
|
|||
|
元素点击 ${dpm_Protection strategy} 切换到定时保护策略栏 定位定时保护策略功能栏失败
|
|||
|
元素点击 ${Complie_execute} 点击策略立即执行 定位立即执行失败
|
|||
|
元素点击 ${Select_Mysql_Style} 点击展开mysql立即执行下拉框 定位立即执行备份类型失败
|
|||
|
Run Keyword If "${bk_type}"=="完全" Click Element ${Now Full_BackupMysql}
|
|||
|
... ELSE IF "${bk_type}"=="增量" Click Element ${Now Add_Backup}
|
|||
|
Log 立即执行${bk_type}备份
|
|||
|
元素点击 ${ExecutePolicy_execute} 点击完成按钮 定位完成元素失败
|
|||
|
元素点击 ${Complie_confirm} 点击确定按钮 定位确定按钮失败
|
|||
|
元素点击 ${BackupSet} 点击进入备份集一栏 定位备份集栏失败
|
|||
|
Sleep 30s
|
|||
|
Wait Until Page Contains Element Xpath=//*[@id="backupSetTable"]/div[2]/table/tbody/tr[2]/td[text()="已完成"] 180s 备份未完成
|
|||
|
Log 备份完成
|
|||
|
Sleep 5s
|
|||
|
|
|||
|
加密
|
|||
|
元素点击 ${Type_encrypt_m} 点击勾选加密选项 定位加密失败
|
|||
|
|
|||
|
压缩
|
|||
|
元素点击 ${Type_compress_m} 点击勾选压缩选项 定位压缩失败
|
|||
|
|
|||
|
重删
|
|||
|
元素点击 ${Type_dedup_m} 勾选重删 定位重删失败
|
|||
|
|
|||
|
备份集属性校验
|
|||
|
[Arguments] ${encryption} ${compress} ${deduped} ${cache}
|
|||
|
sleep 10s
|
|||
|
循环点击 ${BackupSet} ${View}
|
|||
|
sleep 2s
|
|||
|
元素点击 ${View} 点击进入备份集详情 定位备份集详情失败
|
|||
|
Sleep 10s
|
|||
|
加密属性校验 ${encryption}
|
|||
|
压缩属性校验 ${compress}
|
|||
|
重删属性校验 ${deduped}
|
|||
|
缓存属性校验 ${cache}
|
|||
|
元素点击 ${Attr_Cancel} 点击取消关闭备份集详情弹窗 定位取消按钮失败
|
|||
|
Log 备份集属性确认完毕
|
|||
|
Sleep 2s
|
|||
|
|
|||
|
压缩属性校验
|
|||
|
[Arguments] ${compress_m}
|
|||
|
${get_attr}= Get Text ${Compress_Attr}
|
|||
|
Element Text Should Be ${Compress_Attr} ${compress_m}
|
|||
|
Log 压缩属性校验完毕
|
|||
|
|
|||
|
加密属性校验
|
|||
|
[Arguments] ${encryption}
|
|||
|
${get_attr}= Get Text ${Encryption_Attr}
|
|||
|
Element Should Contain ${Encryption_Attr} ${encryption}
|
|||
|
Log 加密属性校验完毕
|
|||
|
|
|||
|
重删属性校验
|
|||
|
[Arguments] ${deduped}
|
|||
|
${get_attr}= Get Text ${Deduped_Attr}
|
|||
|
Element Should Contain ${Deduped_Attr} ${deduped}
|
|||
|
Log 重删属性校验完毕
|
|||
|
|
|||
|
缓存属性校验
|
|||
|
[Arguments] ${bk_cache}
|
|||
|
${get_attr}= Get Text ${cache}
|
|||
|
Element Should Contain ${cache} ${bk_cache}
|
|||
|
Log 缓存属性校验完毕
|
|||
|
|
|||
|
勾选数据节点
|
|||
|
元素点击 ${datagroup} 选择数据节点 定位数据节点失败
|
|||
|
|
|||
|
勾选编目节点
|
|||
|
元素点击 ${SYSCatalogGroup} 选择编目节点 定位编目节点失败
|