<?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>Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/discussions/f/rules/11712/test-case-in-expression-rule-cdt-input-in-test-case</link><description>Hi All, 
 I am having a requirement of having a test case in expression rule. The expression rule is used to have a CDT type input and the output is also the same CDT type but only with values which have the specified data. 
 When I am making test case</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51745?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 07:05:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:91946f55-761f-4116-b38a-da87d94f699c</guid><dc:creator>sahilb346</dc:creator><description>It was giving error bcs for type cast. Firstly I am using type!CDT_Name() then it is giving the error when I used &amp;#39;type!{cdt namesapce}CDT Name&amp;#39;(). then it is running fine&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51743?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 04:57:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:46de0844-5006-4c11-8464-b3f0a4c247d6</guid><dc:creator>TJ</dc:creator><description>You are welcome. What was the exact issue and what you did to solve it?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51742?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 04:48:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:beb0803e-a2af-4518-975b-b2e47d07fddd</guid><dc:creator>sahilb346</dc:creator><description>Thank you very much that is running fine now :)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51741?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 04:36:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5665ff39-9ac4-4601-a79c-30b6f2598c53</guid><dc:creator>paragk998</dc:creator><description>Hi,&lt;br /&gt;
you can create a rule &amp;quot;child&amp;quot; in which you can create your CDT input as dictionary,(or by type function)&lt;br /&gt;
now call this child in to your parent rule input parameter expression.&lt;br /&gt;
make sure that child rule output is &amp;quot;type of cdt&amp;quot; but not list of variant.&lt;br /&gt;
you can use cast function over child rule output.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51740?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 04:30:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5671d195-c800-4385-8298-b59ffa167a84</guid><dc:creator>sahilb346</dc:creator><description>Thanks for your reply .&lt;br /&gt;
Now I am getting the following error.&lt;br /&gt;
&lt;br /&gt;
The System has Encountered an Error&lt;br /&gt;
&lt;br /&gt;
HTTP CODE: 500&lt;br /&gt;
APNX-1-4198-000&lt;br /&gt;
&lt;br /&gt;
Error Evaluating UI Expression&lt;br /&gt;
Expression Evaluation Error:&lt;br /&gt;
[valid:false,syntaxError:false,value:Expression evaluation error: An error occurred while executing a save: Expression evaluation error at function a!designer_ruleInput_evalWithContext_result[line27]:can&amp;#39;t parse argument number &amp;#39;namespace&amp;#39;]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51738?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2018 04:00:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7066a13-0dea-4cb9-a629-7476532f3dac</guid><dc:creator>TJ</dc:creator><description>&lt;p&gt;I suppose going through following screenshots you will get idea how to do it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/15/TestCase-1.JPG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/TestCase-1.JPG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/15/TestCase-2.JPG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/TestCase-2.JPG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the above I have created sample CDT and forming same CDT with some sample data i.e. returned by the rule&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51734?ContentTypeID=1</link><pubDate>Sun, 14 Jan 2018 23:06:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d98897e3-0bab-4ba8-a945-0be7a3daa963</guid><dc:creator>benjamins</dc:creator><description>Can you provide some code as an example so we can see what you are doing wrong.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test Case In Expression Rule.CDT Input in test Case</title><link>https://community.appian.com/thread/51733?ContentTypeID=1</link><pubDate>Sun, 14 Jan 2018 17:20:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0e43d0df-122b-42e5-ba6b-8f4fe335e213</guid><dc:creator>Justin Watts</dc:creator><description>&lt;p&gt;It would be helpful to know what you are trying to do in your expression rule and also more specifics on what you are defining in your test case. Regardless, generally speaking, if I want to validate a CDT type output in a test case, I do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open Test Cases&lt;/li&gt;
&lt;li&gt;Create New Test Case&lt;/li&gt;
&lt;li&gt;Setup inputs&lt;/li&gt;
&lt;li&gt;Setup the assertion
&lt;ul&gt;
&lt;li&gt;Change test will pass when to &amp;quot;Test output matches the asserted output&amp;quot;&lt;/li&gt;
&lt;li&gt;Set type to &amp;quot;Any Type&amp;quot;&lt;/li&gt;
&lt;li&gt;In the value, define a type constructor, setting applicable field values (e.g. type!myCDT(field1:value1,field2:value2) such that the resulting CDT will match the output CDT from your rule&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>