X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=docs%2Ftest_code_guidelines.rst;h=33ac72764f7684c15182b7a9dc44dfdd88f677fc;hp=b455c924c4afa899884cdc16b08be207b466d60a;hb=31fb6cc78ec42a05522f9849210e4f84313e1f88;hpb=bf4685dcf156517f66fe68a825c768bd82a1a12b diff --git a/docs/test_code_guidelines.rst b/docs/test_code_guidelines.rst index b455c924c4..33ac72764f 100644 --- a/docs/test_code_guidelines.rst +++ b/docs/test_code_guidelines.rst @@ -72,30 +72,27 @@ RobotFramework test case files and resource files *** Keywords *** | Local Template | | [Documentation] - | | ... | [Cfg] DUT runs L2 patch config with ${phy_cores} phy - | | ... | core(s). - | | ... | [Ver] Measure MaxReceivedRate for ${framesize}B frames\ - | | ... | using single trial throughput test. + | | ... | [Cfg] DUT runs L2 patch config with ${phy_cores} phy core(s). + | | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ | | ... | | ... | *Arguments:* - | | ... | - framesize - Framesize in Bytes in integer\ - | | ... | or string (IMIX_v4_1). Type: integer, string + | | ... | - frame_size - Framesize in Bytes in integer + | | ... | or string (IMIX_v4_1). Type: integer, string | | ... | - phy_cores - Number of physical cores. Type: integer - | | ... | - rxq - Number of RX queues, default value: ${None}.\ - | | ... | Type: integer + | | ... | - rxq - Number of RX queues, default value: ${None}. + | | ... | Type: integer | | ... - | | [Arguments] | ${framesize} | ${phy_cores} | ${rxq}=${None} + | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} + | | ... + | | Set Test Variable | \${frame_size} | | ... | | Given Add worker threads and rxqueues to all DUTs | | ... | ${phy_cores} | ${rxq} | | And Add PCI devices to all DUTs - | | ${max_rate} | ${jumbo} = | Run Keyword - | | ... | Get Max Rate And Jumbo And Handle Multi Seg - | | ... | ${s_24.5G} | ${framesize} | pps_limit=${s_18.75Mpps} + | | Set Max Rate And Jumbo And Handle Multi Seg | | And Apply startup configuration on all VPP DUTs | | When Initialize L2 patch - | | Then Traffic should pass with maximum rate - | | ... | ${max_rate}pps | ${framesize} | ${traffic_profile} + | | Then Find NDR and PDR intervals using optimized search + Every suite and test case template (or testcase) SHALL contain short documentation. @@ -110,7 +107,7 @@ RobotFramework test case files and resource files to make assigning variables slightly more explicit:: *** Variables *** - | ${traffic_profile}= | trex-sl-2n-ethip4-ip4src254 + | ${traffic_profile}= | trex-stl-2n-ethip4-ip4src254 + Common test case specific settings of the test environment SHALL be done in Test Setup keyword defined in the Setting table. @@ -284,7 +281,7 @@ and unrelated ones such as PAL) if there are any (in addition to library ones). + It is NOT RECOMMENDED to use hard-coded constants (e.g. numbers, paths without any description). It is RECOMMENDED to use - configuration file(s), like /csit/resources/libraries/python/constants.py, + configuration file(s), like /csit/resources/libraries/python/Constants.py, with appropriate comments. + The code SHALL log at the lowest possible level of implementation,