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

  • 相关阅读:
    python 函数嵌套
    python 函数对象
    python 函数参数
    python 连接MySQL报错及解决方案
    解决 No module named pip
    python 文件处理
    python
    python 元祖
    python 读取域名信息
    ubuntu 配置网卡,DNS, iptables
  • 原文地址:https://www.cnblogs.com/tina-cherish/p/8822287.html
Copyright © 2011-2022 走看看