6

Functional tests come in all shapes and sizes. Is there a class of lightweight, simple to use, tools that will discover, run and report on all tests found in a directory? I'm looking for something like nose, py.test but for arbitrary test programs.

Requirements

  • finds and runs any executable file in a directory
  • pass/fail based on non-zero exit status of script/program
  • results displayed in console
  • no database, http server or network access required
  • runs on Linux
  • optional configuration using a plain text file

Optional/Nice Extras

  • fail if anything is written to stderr
  • output junit xml reports
  • organize using suites/tags
  • works on Windows/MacOS
  • supports debuggers on failure

Most test tools seem to focus on management of a test bank and the results. They must have some kind of runner built in. I'm looking for a quick way to start running tests without the overhead of learning and configuring a full suite.

2
  • Can you elaborate on what you mean by "optional confirmation using a plain text file"? Configuration of what, exactly?
    – user246
    Oct 27, 2011 at 16:43
  • By default the tool should run without requiring configuration. If it supports customization it should use a simple text file, more ini than xml like. Some examples of configuration options might be verbosity of output, exclude paths/globs and where to place html/xml reports.
    – Marc
    Oct 27, 2011 at 17:17

3 Answers 3

1

In my experience its better to develop inhouse customized tool which is suitable for the current need. Its difficult (read not possible) to have generalized, jack-of-all tool and still it be lightweight.

1
  • Yeah, based on the requirements in the question it will probably be just as much work configuring an OTS solution as inventing an in-house one. Nov 8, 2011 at 20:21
0

Google is very useful for finding these kinds of things. I recommend a Google search for "shell unit test" and "bash unit test".

2
  • 1
    In this case our good friend google seems to have abandoned me. Nothing in the first two pages of results for your suggested terms meets my requirements. Nor have other terms I've tried been successful.
    – Marc
    Oct 27, 2011 at 16:14
  • @user246 your answer looks like a comment to me.
    – surfmuggle
    Feb 7, 2023 at 16:56
0

If you can't find an existing tool to do what you want then you could write your own.

A script to find and run all the executable files in a directory and display the output status ought to be pretty simple.

1
  • Before writing my own I want to be sure I've exhausted all possibility of finding a full featured, well documented and mature tool.
    – Marc
    Oct 27, 2011 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.