= WikiOutputStreamPlugin = == Description == Do you love Continuous Integration? Want to better integrate either [http://junit.org/ JUnit], [http://cruisecontrol.sourceforge.net/ CruiseControl] along with [http://trac.edgewall.com/ Trac]? Sometimes you want to either publish your test reports directly into Trac's Wiki (why not?). Perhaps you want to also let you directly hyperlink your Java class names direcly into the source browser, right? If you answered 'yes' to some of the questions, there is an answer right here! WikiOutputStreamPlugin is a !OutputStream for Java which lets you easily publish direcly into Trac as an Wiki Article. It accomplishes this by running trac-admin over an ssh-pki-authenticated-remote-shell-connection. It also contains goodies for hyperlinking class names directly into trac's source browser. == Bugs/Feature Requests == Existing bugs and feature requests for WikiOutputStreamPlugin are [report:9?COMPONENT=WikiOutputStreamPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=WikiOutputStreamPlugin&owner=aldrinleal new ticket]. == Download == Download the zipped source from [download:wikioutputstreamplugin here]. == Source == You can check out WikiOutputStreamPlugin from [http://trac-hacks.org/svn/wikioutputstreamplugin here] using Subversion, or [source:wikioutputstreamplugin browse the source] with Trac. == Example == Suppose you have a testCase/suite you'd like to let you publish results directly into trac. Or perhaps you want to create a [http://loggging.apache.org/log4j/ Log4J] Logging Module publish their results into trac. WikiOutputStreamPlugin usage is fairly simple: once you configure it (by creating a simple 'trac.properties' file in your classpath, or by doing the hardcoded-way), you can easily create a new and start using: {{{ #!java import junit.framework.TestCase; import br.eng.leal.trac.WikiPageOutputStream; public class MyTestCaseWhichReportsAsAWiki extends TestCase { private PrintStream printStream; /** * Try to setup an WikiOutputStream, resorting do System.out as a fallback measure */ protected void setUp() { try { this.printStream = new PrintStream(new WikiPageOutputStream(this.getName().substring("test".length()), true); } catch (Exception exc) { this.printStream = System.out; } } /** * Somewhere later... */ protected void tearDown() { this.printStream.close(); } /** * On Sucessfull connection, this must create a page named "Something" over on trac's Wiki */ public void testSomething() { this.printStream("[[br]]Hello, Trac![[br]]"); } } }}} == Recent Changes == [[ChangeLog(wikioutputstreamplugin, 3)]] == Author/Contributors == '''Author:''' [wiki:aldrinleal] [[BR]] '''Contributors:'''