How do I generate reports from Command Line FitNesse ?
And开发者_运维问答, what types of reports are possible? xml, txt, plain?
Maybe this page didn't exist back in 2010, but there is a command line parameter to run a test and exit:
http://www.fitnesse.org/FitNesse.FullReferenceGuide.UserGuide.AdministeringFitNesse.CommandLineArguments
-c <command>: Run a Rest Command and then exit.
Where the "command" is a REST command just like you could pass to cUrl. This works in Windows or Linux and does not depend on cUrl. The list of REST commands can be found here.
I still cannot find a page that lists all available formats for test/suite output, but there is a page showing the XML Format. The other formats available are "text" (format=text
) and HTML, which is the default.
Best bet is to use cURL or wget and call Fitnesse through its RESTful services.
http://www.fitnesse.org/FitNesse.FullReferenceGuide.UserGuide.AdministeringFitNesse.RestfulServices
XML is the most common format, although I think JSON is available for some actions.
I think the only formats allowed are xml, html plain text end. But the documentation is bad, there's no page about this.. =(
As mentioned before, use cURL or wget.
For example, to run a suite called "MySuite" and get a report in XML, the URL to use is: http://ip:port/MySuite?suite&format=xml
For a single test called "MyTest", the URL changes to: http://ip:port/MyTest?test&format=xml
精彩评论