qacafe - ip test solutions
Knowledge Base > Test Execution > What is the difference between the test case execution number and test case name?

What is the difference between the test case execution number and test case name?

Within CDRouter a single test case can be identified by its test name or by its test execution number.

Test names

Individual CDRouter test cases are grouped into test modules. A test module is a group of test cases which are designed to test a specific protocol or type of functionality (i.e. the dns.tcl module or the rip.tcl module). Within each test module, individual test cases are given a unique name which is fixed from release to release. The test name includes a test number which is relative to the test module.

For example, the first test case in the nat.tcl module is named cdrouter_nat_1. Likewise, the first test case in the icmp.tcl module is named cdrouter_icmp_1.

Test execution numbers

CDRouter also arbitrarily assigns a test execution number for each individual test case. Test execution numbers are relative to the total number of available test cases in the installed version of CDRouter. As a result, the test execution numbers are not fixed and may vary from release to release as new test cases are added. Test execution numbers can also change if CDRouter add-on modules are added or removed from an installation.

Test execution numbers for a specific version of CDRouter can be obtained by running the command buddy -summary as root. This will display the test execution number, associated module, and test name for all available test cases on the system.

The test execution numbers for a specific module can be obtained by including the -module option:

  # buddy -summary -module firewall.tcl

The test case name can be determined from the test execution number using the following command:

  # buddy -summary -execute n

Where n is the test execution number.

Running individual test cases

CDRouter allows you to specify particular tests to run using the -execute option. The -execute option takes either a test case name or test execution number as an argument:

  # buddy -execute n

Where n is the test name or test execution number. For more information on running tests with the -execute option, please see this Knowledge Base article.

Because the test execution number is dynamic and the name is not, we recommend using the test name when writing automated test scripts or otherwise referring to individual test cases.