<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Solution: How to Unit-Test</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test</link><description>&lt;p&gt;Hi there&lt;/p&gt;
&lt;p&gt;I twiddled a bit and found a solution how to unit-test. It is not the fancy graphical way but there is all you need and it is fairly customizable.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new business-process &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Workflow" src="http://s24.postimg.org/58g8l9gn9/Workflow.jpg"&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a execution listener &lt;br&gt;
Download: &lt;a href="http://www.file-upload.net/download-8362431/ExecutionListener.java.html"&gt;ExecutionListener&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create the Testrunner class &lt;br&gt;
Download: &lt;a href="http://www.file-upload.net/download-8362430/UnitTestRunner.java.html"&gt;UnitTestRunner&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;How the result may look like: &lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="http://s8.postimg.org/752yicuph/Output.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Resources:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  [1]: http://s24.postimg.org/58g8l9gn9/Workflow.jpg
  [2]: http://www.file-upload.net/download-8362431/ExecutionListener.java.html
  [3]: http://www.file-upload.net/download-8362430/UnitTestRunner.java.html
  [4]: http://s8.postimg.org/752yicuph/Output.jpg
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/166/solution-how-to-unit-test" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 16 Dec 2016 11:03:38 -0500</lastBuildDate><item><title>Answer by vinh_</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test/2300</link><description>&lt;p&gt;Now I know where the idea of running unit test on Ivy come from. Thank Daniel.&lt;/p&gt;
&lt;p&gt;Here is my very first try out in this topic, hope it will help, it can run Unit test (include Ivy code) in Ivy Designer 6.3 and later.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://discourse.axonivy.io/t/junit-test-with-ivy-environment/240"&gt;https://discourse.axonivy.io/t/junit-test-with-ivy-environment/240&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2019 update: if you are using Ivy 7, you now can use Ivy Test Runner &lt;a href="https://github.com/cavoirom/ivy-test-junit-example" title="https://github.com/cavoirom/ivy-test-junit-example"&gt;https://github.com/cavoirom/ivy-test-junit-example&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">vinh_</dc:creator><pubDate>Fri, 16 Dec 2016 11:03:38 -0500</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test/2300</guid></item><item><title>Comment by Reguel Wermelinger on Daniel Oechslin's question</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#1786</link><description>&lt;p&gt;I've packed your solution into a simple project to simplify the bootstrap. Feel free to try it out : &lt;a href="/upfiles/unitTestIvyContext_51.iar"&gt;unitTestIvyContext_51.iar&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 31 May 2016 12:25:12 -0400</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#1786</guid></item><item><title>Comment by Genzer Hawker on Daniel Oechslin's answer</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#726</link><description></description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Genzer Hawker</dc:creator><pubDate>Fri, 30 May 2014 09:34:35 -0400</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#726</guid></item><item><title>Comment by Genzer Hawker on Daniel Oechslin's question</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#725</link><description></description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Genzer Hawker</dc:creator><pubDate>Fri, 30 May 2014 09:33:41 -0400</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#725</guid></item><item><title>Comment by Daniel Oechslin on Daniel Oechslin's question</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#170</link><description>&lt;p&gt;if someone is interested i can share my code updates as well.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Thu, 05 Dec 2013 13:18:21 -0500</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#170</guid></item><item><title>Comment by Daniel Oechslin on Daniel Oechslin's question</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#169</link><description>&lt;p&gt;added the file and Picture resources.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Wed, 04 Dec 2013 13:06:24 -0500</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#169</guid></item><item><title>Comment by Nikel Weis on Daniel Oechslin's question</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#168</link><description>&lt;p&gt;Cannot see the pictures - can you fix that?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikel Weis</dc:creator><pubDate>Wed, 04 Dec 2013 10:38:11 -0500</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test#168</guid></item><item><title>Answer by Daniel Oechslin</title><link>https://answers.axonivy.com/questions/166/solution-how-to-unit-test/167</link><description>&lt;p&gt;Hope this helps anyone!&lt;/p&gt;
&lt;p&gt;EDIT: Please see the more convenient way with mockups under: &lt;a href="http://answers.xpertivy.ch/questions/617/how-can-junit-access-to-ivy-environment-without-environmentnotavailableexception"&gt;JUnit with Mockups&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Wed, 04 Dec 2013 10:10:05 -0500</pubDate><guid>https://answers.axonivy.com/questions/166/solution-how-to-unit-test/167</guid></item></channel></rss>