diff --git a/Criterion.hs b/Criterion.hs
--- a/Criterion.hs
+++ b/Criterion.hs
@@ -138,7 +138,9 @@
     Just compareFile -> do
       liftIO $ writeFile compareFile $ resultForestToCSV rts
 
-  plotAll $ flatten rts
+  let rs = flatten rts
+  plotAll rs
+  junit rs
 
   where go :: String -> Benchmark -> Criterion ResultForest
         go pfx (Benchmark desc b)
@@ -201,3 +203,27 @@
       meanR   = mean r
 
       mean = estPoint . anMean . sampleAnalysis
+
+-- | Write summary JUnit file (if applicable)
+junit :: [Result] -> Criterion ()
+junit rs
+  = do junitOpt <- getConfigItem (getLast . cfgJUnitFile)
+       case junitOpt of
+         Just fn -> liftIO $ writeFile fn msg
+         Nothing -> return ()
+  where
+    msg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ++
+          printf "<testsuite name=\"Criterion benchmarks\" tests=\"%d\">\n"
+          (length rs) ++
+          concatMap single rs ++
+          "</testsuite>\n"
+    single r = printf "  <testcase name=\"%s\" time=\"%f\" />\n"
+               (attrEsc $ description r) (estPoint $ anMean $ sampleAnalysis r)
+    attrEsc = concatMap esc
+      where
+        esc '\'' = "&apos;"
+        esc '"'  = "&quot;"
+        esc '<'  = "&lt;"
+        esc '>'  = "&gt;"
+        esc '&'  = "&amp;"
+        esc c    = [c]
diff --git a/Criterion/Config.hs b/Criterion/Config.hs
--- a/Criterion/Config.hs
+++ b/Criterion/Config.hs
@@ -56,6 +56,7 @@
     , cfgCompareFile  :: Last FilePath -- ^ Filename of the comparison CSV.
     , cfgTemplate     :: Last FilePath -- ^ Filename of report template.
     , cfgVerbosity    :: Last Verbosity -- ^ Whether to run verbosely.
+    , cfgJUnitFile    :: Last FilePath -- ^ Filename of JUnit report.
     } deriving (Eq, Read, Show, Typeable)
 
 instance Monoid Config where
@@ -76,6 +77,7 @@
                 , cfgCompareFile  = mempty
                 , cfgTemplate     = ljust "report.tpl"
                 , cfgVerbosity    = ljust Normal
+                , cfgJUnitFile    = mempty
                 }
 
 -- | Constructor for 'Last' values.
@@ -103,6 +105,7 @@
               , cfgCompareFile  = mempty
               , cfgTemplate     = mempty
               , cfgVerbosity    = mempty
+              , cfgJUnitFile    = mempty
               }
 
 appendConfig :: Config -> Config -> Config
@@ -119,5 +122,6 @@
     , cfgCompareFile  = app cfgCompareFile a b
     , cfgTemplate     = app cfgTemplate a b
     , cfgVerbosity    = app cfgVerbosity a b
+    , cfgJUnitFile    = app cfgJUnitFile a b
     }
   where app f = mappend `on` f
diff --git a/Criterion/Main.hs b/Criterion/Main.hs
--- a/Criterion/Main.hs
+++ b/Criterion/Main.hs
@@ -118,6 +118,8 @@
           "display version, then exit"
  , Option ['v'] ["verbose"] (noArg mempty { cfgVerbosity = ljust Verbose })
           "print more output"
+ , Option [] ["junit"] (ReqArg (\s -> return $ mempty { cfgJUnitFile = ljust s }) "FILENAME")
+          "produce a JUnit report file of all results"
  ]
 
 printBanner :: Config -> IO ()
diff --git a/criterion.cabal b/criterion.cabal
--- a/criterion.cabal
+++ b/criterion.cabal
@@ -1,5 +1,5 @@
 name:           criterion
-version:        0.6.1.1
+version:        0.6.2.0
 synopsis:       Robust, reliable performance measurement and analysis
 license:        BSD3
 license-file:   LICENSE
