<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Best way to do unit testing</title><link>https://community.appian.com/discussions/f/best-practices/13311/best-way-to-do-unit-testing</link><description>Hello, 
 
 Do we have any best practices documentation around unit testing or can any one explain the best way to do unit testing for appian objects. 
 
 Thanks, 
 Nitesh</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/69489?ContentTypeID=1</link><pubDate>Sun, 22 Sep 2019 04:17:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5b3313ac-4ebe-41d6-90e5-b48d61431258</guid><dc:creator>kunals0003</dc:creator><description>&lt;table width="845"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;" width="845"&gt;Atleast run all the happy scenarios&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Make sure there are no performance issues&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Recode any inefficient code (unecessary database calls, unused variables, merge similar code to a single sub-rule)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Test every time you change something and make sure nothing breaks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Spotted a bug? Fix it and run a test to make sure it doesn&amp;#39;t happen again&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Pass proper arguments to your function and make the test expect the proper return value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Pass a NULL object reference. Do something that generates exceptions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;If you have dependencies which are blocking you then modularize the code to remove them and test independently&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="font-weight:400;"&gt;Unit test according to the acceptance criteria before marking any story as &amp;#39;Done&amp;#39;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/61095?ContentTypeID=1</link><pubDate>Wed, 03 Oct 2018 17:41:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75dc4568-0bdc-4dd4-b9d8-e3a2775a2c71</guid><dc:creator>laurenc20</dc:creator><description>&lt;p&gt;While unit testing within the rule can be good at the time, I agree that creating extra test cases and integrating with Jenkins to run the tests daily is a good way to continuously unit test your rules.&lt;br /&gt; &lt;br /&gt; docs.appian.com/.../Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60510?ContentTypeID=1</link><pubDate>Thu, 20 Sep 2018 16:05:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f45c0006-3e97-4293-801c-8778b99fc4bc</guid><dc:creator>ravir0001</dc:creator><description>Nitesh, I think you may follow the below similar approach how you test plug-in. &lt;br /&gt;
&lt;br /&gt;
1. A local Appian installation&lt;br /&gt;
2. Add &amp;lt;APPIAN_HOME&amp;gt;\\_admin\\_scripts\\classpath.jar to the build path&lt;br /&gt;
3. When initializing the unit testing invoke &lt;br /&gt;
&lt;br /&gt;
ConfigurationLoader.initializeConfigurations();&lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
@Before&lt;br /&gt;
public void setUp() throws Exception {&lt;br /&gt;
ConfigurationLoader.initializeConfigurations();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The below links may help on this :&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://forum.appian.com/suite/help/16.2/Expression_Rules.html"&gt;forum.appian.com/.../Expression_Rules.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://forum.appian.com/suite/help/16.2/Testing_Process_Models.html"&gt;forum.appian.com/.../Testing_Process_Models.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://forum.appian.com/suite/help/16.2/Interface_Designer.html"&gt;forum.appian.com/.../Interface_Designer.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://community.appian.com/w/the-appian-playbook/tags/checklists"&gt;community.appian.com/.../checklists&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60473?ContentTypeID=1</link><pubDate>Thu, 20 Sep 2018 04:43:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a6b5e8f2-c0a8-409c-ae59-23c29feb23e1</guid><dc:creator>ajinkyab277</dc:creator><description>I prefer checking process history to verify process is working as per expectation or not . And for interfaces I add debug field to verify values are coming as per expectation or not&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60443?ContentTypeID=1</link><pubDate>Wed, 19 Sep 2018 03:00:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb07d478-aaf8-40e1-b3a6-90ad7c3ddb5b</guid><dc:creator>Prema Suresh</dc:creator><description>This was very helpful as I was also in need of some guidelines for Unit testing. Thanks!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60351?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 12:03:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c1632d38-6cf8-48f1-a20f-50204434339d</guid><dc:creator>Lokesh Kothari</dc:creator><description>create test cases using fitnesse tool (automation tool) supported by Appian and are easy to create&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60307?ContentTypeID=1</link><pubDate>Fri, 14 Sep 2018 15:57:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de1916bb-f775-4e08-b2e6-f79911634b61</guid><dc:creator>yeswanththiyarir</dc:creator><description>Hi Nithesh,&lt;br /&gt;
It depends on the application you are developing. Best practices suggests to test all the objects at every stage: creationg, using in different object etc.,.&lt;br /&gt;
Thanks,&lt;br /&gt;
Yeswanth.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60261?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 07:37:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7813c4ef-2fbb-496c-8e07-46d066f583e2</guid><dc:creator>Kevin Gajewski</dc:creator><description>@Nitesh you can get more guidance about using the expression rule test cases feature for unit testing here as well: &lt;a href="https://docs.appian.com/suite/help/18.3/Expression_Rule_Testing.html"&gt;docs.appian.com/.../Expression_Rule_Testing.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60231?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 09:56:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f5ca30a-db55-4ad1-ab53-6523b3458b55</guid><dc:creator>Shanmukha</dc:creator><description>Hi Nitesh,&lt;br /&gt;
&lt;br /&gt;
You are saying Appian objects which means you want to test each and every object in Appian? We usually perform unit test as soon the object is created with different inputs 1) Positive results 2) Negative 3) No results. We follow same for process model as well. Once we create a process model we will start testing it with providing dummy values for the input parameters and run the flow. For the interfaces as well you can test in the same way with dummy ri inputs.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60228?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 09:16:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11821046-00dc-4425-9a2c-85b224267a77</guid><dc:creator>Sidhant Behura</dc:creator><description>Best way to do unit testing is completely subjective. However Appian provides various ways to perform testing.&lt;br /&gt;
Please go through them and select the one which best suites your requirement based on your application/project.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.2/Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html"&gt;docs.appian.com/.../Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.2/Automated_Testing_for_Expression_Rules.html"&gt;docs.appian.com/.../Automated_Testing_for_Expression_Rules.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Also apart from these you can use Appian Fitnesse for testing your application flows.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60221?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 05:51:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:840f5e24-dac7-4422-8af1-200e560e3c17</guid><dc:creator>ravalik</dc:creator><description>Hi nitesht,&lt;br /&gt;
&lt;br /&gt;
To unit test your application you can go either of the ways.&lt;br /&gt;
Refer the link given below.It might be helpful.&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/17.1/Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html"&gt;docs.appian.com/.../Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
ravalik&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60220?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 05:33:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3d107d97-2b8a-408d-8d0e-2f1c0587d1a9</guid><dc:creator>Dastagiri Dudekula</dc:creator><description>List out the appian objects created for the given scenario.&lt;br /&gt;
If its independent flow test with required user inputs.&lt;br /&gt;
While testing test both positive and negative scenarios.&lt;br /&gt;
If its dependent flow test from the flow which will trigger created flow&lt;br /&gt;
Check all the requirements mentioned in the acceptance criteria&lt;br /&gt;
For Appian objects notice all of its properties like name, description, display names assigned and are appearing in the flow as expected(in case of dynamic name setup)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60216?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 04:06:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f836e49f-ee82-45f5-8da4-a5508db8211c</guid><dc:creator>sagarl511</dc:creator><description>Appian provides smart service/functions to run unit test cases on all expression rules or only on application&lt;br /&gt;
&lt;br /&gt;
Please refer below links - &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.3/Automated_Testing_for_Expression_Rules.html"&gt;docs.appian.com/.../Automated_Testing_for_Expression_Rules.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.3/Start_Rule_Tests_All_Smart_Service.html"&gt;docs.appian.com/.../Start_Rule_Tests_All_Smart_Service.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.3/Start_Rule_Tests_Applications_Smart_Service.html"&gt;docs.appian.com/.../Start_Rule_Tests_Applications_Smart_Service.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/18.3/Expression_Rule_Testing_Functions.html"&gt;docs.appian.com/.../Expression_Rule_Testing_Functions.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Apart from this you can use Fitnesse for unit testing.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to do unit testing</title><link>https://community.appian.com/thread/60191?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2018 12:52:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0561f841-fc90-4bbf-8dbf-58c80d8f9e1d</guid><dc:creator>harrisont606</dc:creator><description>You can build test cases for all of your expression rules and run them via Jenkins. For workflow testing you can use selenium or fitnesse&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/17.1/Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html"&gt;docs.appian.com/.../Running_Automated_Tests_on_Expression_Rules_with_Jenkins.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>