Long Command Lines

Coverage Validator can be controlled from the command line prompt.

This tutorial describes in detail how to deal with command lines that are too long for Windows to handle.

When you have a lot of options to put on the command line and long file paths it’s possible to exceed the max length limit for a Window command line. The length limit varies according to operating system. In addition to mitigating the command line length limit, the techniques discussed here allow for easier management of command lines.

Example command line:

coverageValidator.exe -commandFile "c:\test results\test101.cf"

The above command line can be broken into its constituent items:

  • Specify the command file which contains the actual command line to execute. -commandFile “c:\test results\test101.cf”

This command line loads the command file c:\test results\test101.cf, then executes the command line options found in the command file.

Example command file:

-program c:\dev\branchB\release\testbed.exe 
-directory c:\dev\branchB\release
-arg -toys
-arg -catchphrase
-arg "weebles wobble but they don't fall down"
-arg -dataFile
-arg "c:\tests\test101\lexicographer48.dat"
-saveSession "c:\test results\test101.cvm"
-hideUI

This command file runs the program c:\dev\branchB\release\testbed.exe in directory c:\dev\branchB\release with the arguments -toys -catchphrase “weebles wobble but they don’t fall down” -dataFile “c:\tests\test101\lexicographer48.dat”. The test is run with the Coverage Validator user interface hidden. When the test completes a code coverage session is saved in “c:\test results\test101.cvm” and Coverage Validator is closed. Command files allow the command line to be simplified to one command, all the details of the command line to be contained in one place. This allows for easier management of test command lines.

Fully functional, free for 30 days