Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a guide for developers, including design, programming, test, and quality assurance roles.

See How to Report a Bug

See Development Workflow

See Getting Started for Developers

 

Running a Single Test in sbt

We have a large number of tests runnable from sbt.

All short-running tests are run by just issuing the command

Code Block
sbt test

But often one will want to run only a single test. Here is the syntax to run one such test.

Code Block
sbt
> cli:test-only  edu.illinois.ncsa.daffodil.CLI.debugger.TestCLIdebugger -- --tests=test_1382_.*

The 'cli:' prefix is only needed for the CLI i.e., tests of the daffodil-cli module.

The class name is optional. It will search (and output lots of noise lines) and find the test anyway.

The value of the --tests option is a regular expression. Keep it simple. But notice this is a ".*" not simply "*". This is not a command line "*" it is a regular expression "*", which must follow something to be matched.

Warning: if you get the class name wrong, it doesn't complain to you. It just iterates its way through all the potential testable modules, saying "No tests to run for ...". Not very helpful for finding out you had a typographical error in the class name.Page content removed (obsolete). See https://cwiki.apache.org/confluence/display/DAFFODIL/For+Contributors