zoukankan      html  css  js  c++  java
  • Robot Frame Execution

    1.命令行执行pybot

      当文件夹中存在__init__.robot文件时,使用命令行单独执行一个robot文件,不会执行__init__,需要使用--suite

          cd testScript

      >pybot --suite suite_name folder_name

    2.

    :: set output files

    set CURPATH=%~f0
    set CURPATH=%CURPATH:~0,2%
    %CURPATH%
    cd %${EXECDIR}%
    set pscmdline='powershell Get-Date -Format 'yyyyMMdd_hhmmss''
    for /f %%a in (%pscmdline%) do (set now=%%a)
    set OUTDIR=output esult_%now%

    :: running the test first time
    cmd /c pybot -P ../common/library/ -v "Output":%cd% -d %OUTDIR% -x result.xml project estscript
    :: we stop the script here if all the tests were OK
    if errorlevel 1 goto DGTFO
    exit /b
    :: otherwise we go for another round with the failing tests
    :DGTFO
    :: we keep a copy of the first log file
    copy %OUTDIR%log.html %OUTDIR%1st_run_log.html

    :: we launch the tests that failed
    cmd /c pybot -P ../common/library/ -v "Output":%cd% -d %OUTDIR% --nostatusrc --rerunfailed %OUTDIR%/output.xml --output rerun1.xml project estscript
    copy %OUTDIR%log.html %OUTDIR%2nd_run_log.html

    :: Merging output files
    cmd /c rebot --nostatusrc --outputdir %OUTDIR% --output output.xml -x result.xml --merge %OUTDIR%/output.xml %OUTDIR%/rerun1.xml


    :: we stop the script here if all the tests were OK
    if errorlevel 1 goto DGTFO
    :: otherwise we go for another round with the failing tests
    :DGTFO

    :: we launch the tests that failed
    cmd /c pybot -P ../common/library/ -v "Output":%cd% -d %OUTDIR% --nostatusrc --rerunfailed %OUTDIR%/output.xml --output rerun2.xml project estscript
    copy %OUTDIR%log.html %OUTDIR%3rd_run_log.html

    :: Merging output files
    cmd /c rebot --nostatusrc --outputdir %OUTDIR% --output output.xml -x result.xml --merge %OUTDIR%/output.xml %OUTDIR%/rerun2.xml

  • 相关阅读:
    SpringBoot集成MyBatisPlus
    Android 图片混排富文本编辑器控件
    Android 图片压缩器
    python中yield用法
    ubuntu下tesseract 4.0安装及参数使用
    Linux 命令行命令及参数辨异
    一题多解 —— linux 日志文件(log)reload 重新载入
    python中list用法及遍历删除元素
    计算机科学 —— 时间戳(timestamp)
    ubuntu中使用apt-get安装zbar
  • 原文地址:https://www.cnblogs.com/tina-cherish/p/8822287.html
Copyright © 2011-2022 走看看