Package qm :: Package test :: Package classes :: Module command :: Class ShellCommandTest
[hide private]
[frames] | no frames]

Class ShellCommandTest

source code

         object --+                
                  |                
extension.Extension --+            
                      |            
      runnable.Runnable --+        
                          |        
                  test.Test --+    
                              |    
                   ExecTestBase --+
                                  |
                                 ShellCommandTest

Check a shell command's output and exit code.

A 'ShellCommandTest' runs the shell and compares its standard output, standard error, and exit code with expected values. The shell may be provided with command-line arguments and/or standard input.

QMTest determines which shell to use by the following method:

Nested Classes [hide private]

Inherited from test.Test: OutcomeField, TestField

Inherited from runnable.Runnable: ResourceField

Inherited from extension.Extension: Type, __metaclass__

Instance Methods [hide private]
 
Run(self, context, result)
Run the test.
source code

Inherited from ExecTestBase: MakeEnvironment, RunProgram, ValidateOutput

Inherited from test.Test: GetTargetGroup

Inherited from runnable.Runnable: GetAttachments, GetDatabase, GetId, __init__

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  arguments = [qm.fields.TextField(name= "command", title= "Comm...
A list of the arguments to the extension class.

Inherited from test.Test: PREREQUISITES_FIELD_ID, kind

Inherited from runnable.Runnable: EXTRA_DATABASE, EXTRA_ID, RESOURCE_FIELD_ID, resources

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

Run(self, context, result)

source code 

Run the test.

'context' -- A 'Context' giving run-time parameters to the test.

'result' -- A 'Result' object. The outcome will be 'Result.PASS' when this method is called. The 'result' may be modified by this method to indicate outcomes other than 'Result.PASS' or to add annotations.

Overrides: test.Test.Run

Class Variable Details [hide private]

arguments

A list of the arguments to the extension class.

Each element of this list should be an instance of 'Field'. The 'Field' instance describes the argument.

Derived classes may redefine this class variable. However, derived classes should not explicitly include the arguments from base classes; QMTest will automatically combine all the arguments found throughout the class hierarchy.

Value:
[qm.fields.TextField(name= "command", title= "Command", description= "\
""The arguments to the shell.

            This field contains the arguments that are passed to the
            shell.  It should not contain the path to the shell itself\
.

            If this field is left blank, the shell is run without
...