Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The test specification grammar provides a very flexible way to call out which tests to run.  The basic structure is this:

specification ::= unary | binary | compound

unary ::= tags | suite | classMethods | properties

binary ::= (unary | compound) and | or (unary | compound)

compound ::= '(' binary ')'

tags ::= '<' tagName (',' (all | success | fail | error | failError)? '>'

suite ::= '[' suiteName (',' suiteName)* ']'

properties ::= '{' propertyName ':' singleQuotedValue (',' propertyName ':' singleQuotedValue)* '}'

classMethods ::= (('%' packageName)? ('@' className) | qualifiedName) ('#' methodName)? ('$' operationName)?

 

Probably the best way to explain this is with some examples:

SpecificationResult
@classnameRun every method in every class with 'classname' in the name.
%packRun every method in every class with 'pack' in the package name
@classname and %packRun every method which matches both of the previous conditions. This is a compound statement.
<tag>Run the tag named 'tag' using the 'all' set.
<tag, fail>Run the tag named 'tag' using the 'fail' set.
[ aud ]Run every method in every class with the @JoinSuite tag with the name aud.

{ property: 'value' }

 

Run every method in all classes which contain an operation with a parameter named 'property' and the value 'value'

 

All of the selectors have the effect of choosing any test to run that they match.  If an operation is specified (using $), only those operations are executed.  The properties selector will select the entire method is a single operation matches.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.