In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1. Common ways to execute test cases using pybot
1. Execute all use cases under the entire project: pybot project path. For example: pybot D:\ robot
2. Execute all use cases in a suit: pybot project path\ suit file name. For example: pybot D:\ robot\ test.txt
3. Use case that executes a specific use case: pybot-- test use case name project path\ suit file name. For example: pybot-- test case_1_user log in D:\ robot\ test.txt
4. Execute the case of the specified tag in the project: pybot-- include tagName C:\ TF-Test
2. Detailed explanation of pybot parameters
-M-metadata name:value sets metadata for top-level test suites (mainly reflected in test reports) a) example:-metadata version:1.2-G-gettag tag * tag-t-test name given for all executed test case settings * choose to run according to the name of the test case or overall. A) the name is case-insensitive and space-insensitive, and you can also match all case with *. Can match any character b) if you use * and? Run, there is a problem on the console, please check the-escape and-argumentfile parameters-s-suite name * run the test suite according to the selected case name. Only if the test case is in the corresponding test suite and meets the filtering criteria can it be used with-test,-include or-exclude at the same time. The name parameter is similar to the name parameter of-test. You can also use "." This symbol is used as a delimiter for the parent node name: a) for example:-s X.Y Select the Y test suite where the parent node is X. -I-include tag chooses to run the test case based on the given tag name. The name parameter is similar to the parameter of-test. Tag is case-insensitive and space-insensitive, it can use "and"? As a wildcard. Tags and patterns can be concatenated with the AND, OR, and NOT keywords: a) for example:-include foo-include bar*b)-include fooANDbar*-e-exclude tag * does not run these labeled cases. The rest of the rules are the same as-include-R-rerunfailed output selects failed cases from the previously failed output file to re-execute. A) it is considered important to use the same case separately-test parameter-runfailed output (RF version 2.8.4 has been replaced by-rerunfailed since version 2.8.4)-c-critical tag * case to Tag. If no important label is set, then all cases are considered important. Tag can give a pattern such as-include-n-noncritical tag a case where Tag is assigned, which is considered unimportant, even if it is tagged as critical. Tag can be expressed in patterns such as:-include test-v-variable name:value * sets variables in test data. Only scalar variables are supported, and variable names do not need to be marked with''. Please refer to the-escape parameter to use special characters and the-variablefile parameter to set more functional variables, as well as the list variable. − a) for example:-variablestr:Hello= >'. Please refer to the-escape parameter to use special characters and the-variablefile parameter to set more functional variables, as well as the list variable. − a) for example:-variablestr:Hello= > {str} = 'Hello'b)-v str:HelloWorld-E space: = > str='HelloWorld' − c) − vx: − vy:42= > str='HelloWorld' − c) − vx: − vy:42= > {x} =', ${y} = '42The path of the color V-variablefile path * variable file: a) sample file:
I.b) is equivalent to:
I. Murd-outputdir dir the path where the output file is stored. The default directory is the directory where the test case executes, and the directory given is also relative to the case execution directory, unless the set directory is an absolute path. -o-output file XML output file, giving the path, and-log,-report,-xunit, and-debugfile, similar, directory based on-outputdir, unless the absolute path is given. The other output files are generated based on the xml output file after the case execution. The XML output file can also provide data for future robot tools. NONE strings can be given to disable this feature, as well as log (logging) and report (reporting) functions. -l-log file HTML log file. You can give NONE forbidden output, default output log.htmla) for example:-log mylog.htmlb)-l NONE-r-report file HTML report file. NONE can be assigned to disable output, the default output: report.html. Similar to the-log parameter. -x-xunit file xUnite compatibility test file. It will not be created unless otherwise stated. A)-unitfile file (replaced by-xunit) b)-xunitskipnoncritical tag non-important cases are skipped in the xUnit output. The debug file during the run of-b-debugfile file is not created unless otherwise stated. -T-timestampoutputs when this parameter is used, the timestamp format 'YYYYMMDD-hhmmss' will be applied between the base name and extension of all output file names. A) for example: t-o ouputxml-r report.html-l noneb) create files: ouput-20161023-121011.xml and report-20161023-121012.xmlc)-splitlog split the log file into small files and open it with a browser for clearer d)-logtitle title to generate the title of the log. The default title is the name of the test suite. The underscores in all test headings are converted to spaces. E)-background settings for reportbackgroud colors test reports. I. 'all_passed:critical_passed:failed'' or 'passed:failed'' colors and codes are fine. For example:-reportbackgroud green:yellow:red-reportbackgroud # 00E:#E00-L-loglevel level sets the log level. Available level: TRACE,DEBUG,INFO (default level). WARN,NONE (no loging). Use syntax: LOGLEVEL:DEFAULTa) example:-loglevel DEBUGb)-how many layers does loglevel DEBUG:INFO-suitestatleve level show in logs and test reports. All layers are shown by default. A) example:-suitestatlevel 3-tagstatinclude tag * shows matching TAG only in test suite statistics and test details in logs and reports. Tag is displayed by default in all test cases. The given Tag can be written as a simple pattern (see-test example)-tagstatexclude tag * does not show matching TAG only in log and test reports by test suite statistics and test details. This option cannot be used with-tagstatinclude, similar to-exclude and-include. -tagstatcombine tags:name * create comprehensive statistics based on tag, which will be added to the test case details by TAG series and matching. If the optional name is not given, the name of the comprehensive statistics will be obtained from the specified tags. Tags will be used in conjunction with the rules given by-include. A) example:-tagstatcombine requrement-*b)-tagstatcombine tag1ANDtag2:My_name-tagdoc pattern:doc adds documentation for eligible tag. The document is displayed in the test details, as well as in the form of a tooltip in the 'Statistics by Tag'. The pattern can contain matching all, and'?' Matches any single character. Documents can contain formatting, similar to the-doc option. A) example:-tagdoc mytag:My_documentationb)-tagdoc regression:See_ http://info.htmlc)-tagdoc owner-*:Original_author-tagstatlink pattern:link:title adds additional connection addresses to the per-tag statistics. Pattern can contain matching all and? Matches any character. String wildcard expressions can be applied to connections and headings using the syntax of% N. Where does N start to match? An underscore in the title is automatically converted to a space. A) example:-tagstatlink mytag: http://my.domain:Linkb)-tagstatlink bug-*:http:/tracker/id=%1:Bug_Tracker-removekeywords all | passed | for | wuks | name: * remove keyword data from the generated log file. Keys that contain warnings will not be removed unless the option parameter is all. A) all: remove data from all keywords b) passed: remove keyword data from successful test cases and suites. C) for: removes keyword data from the successful iteration of the for loop. D) wuks: remove all keywords that failed in the end, including in 'BuiltIn.Wait Until Keyword Succeds'e) name:: to remove data from keywords that match the pattern. The pattern makes a full match for keywords. i. For example: 'MyLib.Keyword','resource.Secdon Keyword'f) case, spaces, underscores are not sensitive, can contain * and? As a wildcard. i. Example:-removekeywords name:Lib.HugeKwii. -removekeywords name:myresource.*-flattenkeywords for | foritem | name: * Flattens matching keywords in the generated log file. Matching keywords get all log messages from their child keywords and children are discarded otherwise.a) for: flatten for loops fullyb) foritem: flatten individual for loop iterationsc) name:: flatten matched keywords using same matching rules as withi. '- removekeywords name:'-listener class * A class used to monitor test execution. Get an example of a notification when a test case starts and ends. The parameters of the listener class can be followed by the class name, with':'as the delimiter. A) for example:-listener MyListenerClass:arg1:arg2-warnonskippedfiles if this option is used, skipped test data files will generate a visible warning message in the console and log files. The default skipped file produces only one basic Syslog information. -nostatusrc sets the return code to 0 regardless of the failure in the test case. The error code returns normally. -runemptysuite is also executed if the top-level test suite is empty. This scenario is useful if it is used with-include/-exclude and there are no matching test cases. -dryrun validates the test data and executes the test so that the test library keyword is not executed. -exitonfailure any basic case of critical failed, stop testing. -exitonerror stops testing when any error occurs.-skipteardownonexit skips teardown exit if test execution is paused. -randomize all | suites | tests | none random execution. A) all: randomly execute test suites and test cases. B) suites: randomly execute test suites c) tests: randomly execute test cases. D) none: no random execution, default. E) use the syntax 'VALUE:SEED' to give a user a random seed, which must be an integer. I.-randomize allii. The version of-randomize tesets:1234-runmode mode * 2.8is obsolete. Please use the-dryrun,-exitonfailure,-skipteardownonexit, or-randomize options separately. The output width of the W-monitorwidth chars monitor. The default is 78Musi C-monitorcolors auto | on | ansi | off uses color output in the console. A) auto: use color output when the output is not redirected. B) on: always use colors. C) ansi: same as the on parameter, but use the ANSI color in windows. D) off: forbid colors e) Note that Jpython does not display colors in windows. -K-monitormarkers auto | on | off displays'.'on the console when the top-level keyword ends in the test case. Success or'F' failure. The use of the and-monitorcolors parameters has always been. -P-pythonpath path * add extra directories,ZIPs,JARs to search for test libraries when they are imported. Multiple paths can be used as delimiters. A) example:-pythonpath libs/b)-pythonpath / opt/testlibs:mylibs.zip:yourlibc)-E star:STAR-P lib/STAR.jra-P mylib.jar-E-escape what:with * defective transfer characters in the console. A) what stands for the name of the transfer character, and with is the character to be transferred to b) the transfer character needs to be carefully selected and used. C) amp, apos
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Types and methods of software testing
© 2024 shulou.com SLNews company. All rights reserved.