Index: docs/megatest.html ================================================================== --- docs/megatest.html +++ docs/megatest.html @@ -2,17 +2,16 @@ - + Megatest
-

Megatest

5/5/2011 @@ -19,54 +18,51 @@

Matt Welland

-

Abstract -

Megatest is a minimalistic tool to help automate and manage the running of a suite of regression tests or other processes and to roll up the results for display on a web page or dashboard. +

+Megatest is a minimalistic tool to help automate and manage the running of a suite of regression tests or other processes and to roll up the results for display on a web page or dashboard.
-
-
- +
+ - +
+
Section 0.3: Reference -
- +
+
Subsection 0.3.1: Environment variables
Subsection 0.3.2: Configuration files -
- +
+
- +
+
Subsection 0.3.3: Writing tests -
- +
+
Subsubsection 0.3.3.1: testconfig file -
+ + +
+Subsection 0.3.4: Command line +
-

0.1 About Megatest

@@ -286,123 +285,132 @@

0.3.1 Environment variables

- - - + - + - + - + - + - + - + + + + + + + + +
Variable Purpose Default value/Comment
MT_CMDINFO Conveys test variables to the megatest test runner. Not for use by the end user
MT_TEST_RUN_DIR Directory assigned by megatest for the test to run. Tests can consider this their “home” directory
MT_TEST_NAME Name of the test, corrosponds to the directory name under tests.
MT_ITEM_INFO Iterated tests will set this to a sequence of key/values ((KEY val) ...)
MT_RUN_AREA_HOME Directory where megatest was launched from and where the tests code can be found
MT_RUNNAME Name of this run as set by the :runname parameter
+MT_MEGATEST + +Path/Filename to megatest executable. Found either from called path or but using the “exectuable” keyword in the [setup] section. + +
<field1> .... The field values as set on the megatest -runall command line (e.g. :field1 abc) Planning ahead your field names is important so as to avoid collisions with other environment variables
+

0.3.2 Configuration files

0.3.2.1 megatest.config

- - - + - + - + - + - + - + - + - + - + +
section variable @@ -414,13 +422,13 @@ required comment
[setup] max_concurrent_jobs @@ -432,13 +440,13 @@ no
executable @@ -450,13 +458,13 @@ no Use only if necessary, megatest will extract the location from where it used to launch and add append that to the PATH for test runs.
runsdir @@ -468,13 +476,13 @@ no Because your runs may be spread out over several disk partitions a central link tree is created to make finding all the runs easy.
[fields] string of letters, numbers and underscore @@ -486,13 +494,13 @@ at least one
[jobtools] launcher @@ -504,13 +512,13 @@ no
workhosts @@ -522,13 +530,13 @@ n/a
[env-override] string of letters, numbers and underscore @@ -540,13 +548,13 @@ no These are set on the test launching machine, not the test running machine. Typical usage is to control the host or run queue for launching tests. These values will not be seen by the test when it runs.
[disks] string of letters, numbers and underscore @@ -558,22 +566,22 @@ yes The disk usage balancing algorithm is to choose the disk with the least space for each test run.
+

0.3.2.2 runconfigs.config file

- - - + - + - + +
section variable @@ -585,13 +593,13 @@ required? comment
[default] string of letters, numbers and underscore @@ -603,13 +611,13 @@ no variables set in this section will be available for all runs, defining the same variable in another section will override the value from the default section
[field1value/field2value...] string of letters, numbers and underscore @@ -621,12 +629,15 @@ no the values in this section will be set for any run where field1 is field1value, field2 is field2value and fieldN is fieldNvalue.
+
Example: a test suite that checks that a piece of software works correctly for different customer configurations and locations each of which is done as a separate release regression run. The fields, CUSTOMER and LOCATION were chosen. The following runconfigs.config file would set some variables specific to runs for megacorp in India and femtocorp in the Cook Islands and New Zealand:
@@ -664,17 +675,17 @@
TESTPATH /nfs/testing/megacorp_runs
-Running megatest like this: +Running megatest like this:
megatest :CUSTOMER megacorp :LOCATION new_zealand :runname week12_2011_run1 -runall
-Would set: +Would set:
ENCRYPTION true
@@ -685,15 +696,12 @@

0.3.3.1 testconfig file

- - - + - + - + - + + + +
section variable @@ -705,13 +713,13 @@ required? comments
[setup] runscript @@ -723,13 +731,13 @@ yes The script must be executable and either provide the full path or put a copy at the top of your test directory
[requirements] waiton @@ -741,13 +749,13 @@ no This test will not run until the named tests are state completed and status PASS
[items] any valid @@ -759,14 +767,358 @@ no The test will be repeated once for each item with the variable name set to the value. If there is more than one variable then the test will be run against all unique combinations of the values
+ +
+

+0.3.4 Command line +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+switch or param + +parameter + +purpose + +comments +
+-h + + + +brief help + + +
+-runall + + + +run all tests + + +
+-runtests + +test1,test2,... + +run one or more tests + + +
+-step + +stepname + +record a step + +requires :state and :status +
+-test-status + + + +record the test status + +requires :state and :status +
+-setlog + +logfilename + +set the logfile name for a test + +path is assumed to be relative to the test run directory +
+-set-toplog + +logfilename + +set the logfile name for the top test in an iterated test run + +each sub test can have its own logfile set +
+-m + +“comment” + +sets a comment for the step, test or run + + +
+:runname + + + + + + +
+:state + + + + + + +
+:status + + + + + + +
+-list-runs + + + + + + +
+-testpatt + + + + + + +
+-itempatt + + + + + + +
+-showkeys + + + + + + +
+-force + + + + + + +
+-xterm + + + + + + +
+-remove-runs + + + + + + +
+Test helpers + + + + + + +
+-runstep + + + + + + +
+-logpro + + + + + + +
+
-
-

Copyright (C) 2011 Matt Welland

+ +
Index: docs/megatest.lyx ================================================================== --- docs/megatest.lyx +++ docs/megatest.lyx @@ -1,45 +1,63 @@ -#LyX 1.6.5 created this file. For more info see http://www.lyx.org/ -\lyxformat 345 +#LyX 2.0 created this file. For more info see http://www.lyx.org/ +\lyxformat 413 \begin_document \begin_header \textclass docbook-book \use_default_options false +\maintain_unincluded_children false \language english +\language_package default \inputencoding auto +\fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default +\use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry false \use_amsmath 0 \use_esint 0 +\use_mhchem 1 +\use_mathdots 1 \cite_engine basic \use_bibtopic false +\use_indices false \paperorientation portrait +\suppress_date false +\use_refstyle 0 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent -\defskip medskip +\paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false -\author "" -\author "" +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false \end_header \begin_body \begin_layout Title @@ -338,12 +356,12 @@ Environment variables \end_layout \begin_layout Standard \begin_inset Tabular - - + + @@ -558,10 +576,48 @@ \begin_inset Text + +\begin_layout Plain Layout +MT_MEGATEST +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Path/Filename to megatest executable. + Found either from called path or but using the +\begin_inset Quotes eld +\end_inset + +exectuable +\begin_inset Quotes erd +\end_inset + + keyword in the [setup] section. +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text \begin_layout Plain Layout .... \end_layout @@ -604,11 +660,11 @@ \end_layout \begin_layout Standard \begin_inset Tabular - + @@ -1054,11 +1110,11 @@ \end_layout \begin_layout Standard \begin_inset Tabular - + @@ -1301,11 +1357,11 @@ \end_layout \begin_layout Standard \begin_inset Tabular - + @@ -1495,10 +1551,874 @@ \begin_layout Plain Layout The test will be repeated once for each item with the variable name set to the value. If there is more than one variable then the test will be run against all unique combinations of the values +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Subsection +Command line +\end_layout + +\begin_layout Standard +\begin_inset Tabular + + + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +switch or param +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +purpose +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +comments +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-h +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +brief help +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-runall +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +run all tests +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-runtests +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +test1,test2,... +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +run one or more tests +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-step +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +stepname +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +record a step +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +requires :state and :status +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-test-status +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +record the test status +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +requires :state and :status +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-setlog +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +logfilename +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +set the logfile name for a test +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +path is assumed to be relative to the test run directory +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-set-toplog +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +logfilename +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +set the logfile name for the top test in an iterated test run +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +each sub test can have its own logfile set +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-m +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Quotes eld +\end_inset + +comment +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +sets a comment for the step, test or run +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +:runname +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +:state +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +:status +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-list-runs +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-testpatt +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-itempatt +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-showkeys +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-force +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-xterm +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-remove-runs +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape italic +Test helpers +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-runstep +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +-logpro +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + \end_layout \end_inset Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -6,11 +6,11 @@ ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. (include "common.scm") -(define megatest-version 1.05) +(define megatest-version 1.06) (define help (conc " Megatest, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " license GPL, Copyright Matt Welland 2006-2011