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

  • 相关阅读:
    微服务网关常用限流算法
    微服务网关zuul介绍
    Nginx实现微服务网关的简单介绍
    11.9-编写操作者
    11.5-编写程序
    11.3-学习操作者文档
    11.2-LV面向对象编程视频学习及周五与老师交流总结
    10.29-基于LabVIEW的分布式集群机器人控制系统
    10.27-运用操作者框架架设控制中心软件架构
    5.24-29离线解析问题
  • 原文地址:https://www.cnblogs.com/tina-cherish/p/8822287.html
Copyright © 2011-2022 走看看