<?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>Site Testing</title><link>https://community.appian.com/discussions/f/general/25027/site-testing</link><description>An often occuring frustration when testing out an interface is that it will work fine within the interface editor, but once we throw it on a site, something goes wrong. That wouldn&amp;#39;t be too big a deal as it&amp;#39;s all part of development, but whenever we test</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96936?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:53:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7876a595-ace3-428b-a0b8-bd5175981321</guid><dc:creator>Marco</dc:creator><description>&lt;p&gt;These sound like awesome ideas. I just need to go in and rejigger everyone else&amp;#39;s interfaces for it &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the tips&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96932?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:46:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3732be81-1db7-40cb-8de6-58c5d443b3ba</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;As an advanced tactic, in some interfaces I define &amp;quot;local!currentUser&amp;quot; like this, to enable myself to throw in an arbitrary username as needed, and switch to it instantly just by commenting out the line with &amp;quot;loggedInUser()&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;local!currentUser: a!refreshVariable(
    value: {
      loggedInUser(),
      &amp;quot;throwawayuser823498&amp;quot;
    }[1],
    refreshAlways: true()
  ),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96931?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:45:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f77ebe8c-133c-4e89-bde4-97a95dacef42</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;I&amp;#39;m still confused as to why you think the data used in a Site context is any different from the User Interface that is added to that Site? The top-level UI in a Site cannot have any rule inputs (there&amp;#39;s nowhere to pass values to it from the containing Site). So: the top-level UI must be self-sufficient. So if you open it up in the Site or as the UI its behaviour will be identical.&lt;/p&gt;
&lt;p&gt;Whilst I understand the thrust of adding &amp;quot;debug&amp;quot; to the front-end (which I view as an unnecessary overhead), the whole rationale for having a toolkit like the Appian Designer is to ensure each object is completely and exhaustively tested before it is ever integrated with another object. In the same environment the behaviour of a UI should be identical whether stand-alone or contained in a Site (the only possible difference might be driven by the role of the User doing the testing i.e. difference between a System Admin account and a a Basic user account).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96930?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:45:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00390e71-d1a9-40f4-b901-7eb96456d6e3</guid><dc:creator>Chris</dc:creator><description>[quote userid="50400" url="~/discussions/f/general/25027/site-testing/96927#96927"]I assume you might have some variables / queries that depend on the user viewing the form.&amp;nbsp; A technique I&amp;#39;ve developed gradually is, instead of throwing the loggedInUser() function all over your interface(s), is to capture it &lt;em&gt;only once&lt;/em&gt;&lt;em&gt;&lt;/em&gt; into a local variable and then using that in queries, group membership checks, etc.&amp;nbsp; For debugging purposes, this is a big help because then we can instead temporarily change the &amp;quot;local!currentUser&amp;quot; variable delcaration to refer manually to a username instead of loggedInUser(), and make sure things still work.[/quote]
&lt;p&gt;100% agree, aside from my debugging hide/show, always always have a local!user: loggedinuser() type variable declared at the top of the interface, and reference local!user throughout (passing to child interfaces as well).&amp;nbsp; Being able to change this to a value in one line for debugging such as local!user: touser(&amp;quot;john.doe&amp;quot;), and test, is huge.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My case for loggedinuser() within the debugging only section is so I can throw it on other developers&amp;#39; interfaces that do not have local!user declared for whatever reason.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96929?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:45:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3cc7eca4-0c41-4db1-8bd0-b0252a457949</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The top level interface in a site page will never get any data passed to rule inputs. Loading that interface into the editor should give you full debugging capabilities.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96927?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:41:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0ed81a33-7290-4275-9116-5c7e300476c8</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I assume you might have some variables / queries that depend on the user viewing the form.&amp;nbsp; A technique I&amp;#39;ve developed gradually is, instead of throwing the loggedInUser() function all over your interface(s), is to capture it &lt;em&gt;only once&lt;/em&gt;&lt;em&gt;&lt;/em&gt; into a local variable and then using that in queries, group membership checks, etc.&amp;nbsp; For debugging purposes, this is a big help because then we can instead temporarily change the &amp;quot;local!currentUser&amp;quot; variable delcaration to refer manually to a username instead of loggedInUser(), and make sure things still work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96925?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:31:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:665e00eb-094e-45f7-804c-43f288cb2e5c</guid><dc:creator>Marco</dc:creator><description>&lt;p&gt;1) I do navigate to the relevant ui object, the problem is I don&amp;#39;t know what data the object is getting because opening the object just gives me the test data, not whatever the site is throwing at me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) Yes, but there could be dozens of variables&amp;nbsp;and/or sources of data and narrowing them down without seeing what data I&amp;#39;m getting in the site is burdensome.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96924?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:28:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a19fcd97-3653-4d8e-91dc-b38ce0db78ae</guid><dc:creator>Marco</dc:creator><description>&lt;p&gt;That&amp;#39;s actually a pretty good idea, thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96922?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:26:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:13e9c4fb-4c1f-4438-962b-7f6ea17704f5</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I will put variable values into text or paragraph fields for debugging.&amp;nbsp; Specifically, I use a rule!DEBUG() interface that internally shows a red a!boxLayout with the passed ri!label and ri!value from the primary interface.&amp;nbsp; I have these set to show only in lower environments, and only to system administrators.&amp;nbsp; Works great, you can even leave the code in up to production.&amp;nbsp; rule!isDev() and rule!isTest() check an environmental constant cons!SERVER, which holds DEV, TEST or PROD depending on the server.&amp;nbsp; rule!isDev() returns true for cons!SERVER=&amp;quot;DEV&amp;quot;, etc.&lt;/p&gt;
&lt;p&gt;On occasion for trickier debugging I&amp;#39;ll put a section in that will show for system admins up to production, users report an issue, I can view their task with my debugging info right on the screen, which they cannot see.&lt;/p&gt;
&lt;p&gt;Something like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!boxLayout(
  label: &amp;quot;DEBUG&amp;quot;,
  style: &amp;quot;ERROR&amp;quot;,
  showWhen: and(
    fn!isusersystemadministrator(loggedInUser()),
    or(
      rule!isDev(),
      rule!isTest()
    )
  ),
  contents: {
    a!paragraphField(
      label: ri!label,
      value: ri!value,
      readOnly: true
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96921?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:26:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6f737aa-9ade-4344-a99d-2cc543637ad3</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Sounds to me like there&amp;#39;s 2 things to attend to here:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;when you get issues in the Site you can just navigate to the relevant UI object where the error is actually being thrown and reproduce it&lt;/li&gt;
&lt;li&gt;if it&amp;#39;s data-related then you may need to pay more attention to the data integrity i.e. where the data is actually being authored to ensure it&amp;#39;s correct&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96919?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 15:15:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9dd7ef49-a80d-4ed7-8766-a883eb71ed8a</guid><dc:creator>Marco</dc:creator><description>&lt;p&gt;all sorts, but usually the issue is the data that comes in when testing through a site is different than the data we get when testing through the editor. Unfortunately since we can&amp;#39;t see that data, it makes troubleshooting troublesome.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Site Testing</title><link>https://community.appian.com/thread/96918?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 14:28:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:50ab2d75-2941-4bcf-8db7-6ff17149b884</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;A Site is just a &amp;quot;container&amp;quot; that allows you to expose Interfaces (whether as native UIs or Start forms on process models). The UIs should be fully testable as stand0-alone objects. What sorts of errors are you encountering?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>