<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unit testing server side javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305841#M258971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ideally I'd like to find a framework to streamline writing lots of tests. Similar to Jasmine/PhantomJS framework. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 May 2013 23:49:51 GMT</pubDate>
    <dc:creator>akoudrin</dc:creator>
    <dc:date>2013-05-06T23:49:51Z</dc:date>
    <item>
      <title>Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305837#M258967</link>
      <description>I'm about to start development on Alfresco 4.2.c using the existing Maven setup. I anticipate mostly working with Share. Furthermore, I anticipate most of development to be on javascript, both server and client side.I'm currently looking at unit testing javascript. On client side, I've found Jasmine</description>
      <pubDate>Mon, 06 May 2013 04:39:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305837#M258967</guid>
      <dc:creator>akoudrin</dc:creator>
      <dc:date>2013-05-06T04:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305838#M258968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For what it's worth, the furthest that I've got to is, I've built tests for my RESTful backend interfaces - just calling the POST/PUT/GET/DELETE/GET on my scripts and checking if everything is working as expected. I don't see how unit testing could be implemented, but please post back here if you find a way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 16:08:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305838#M258968</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-05-06T16:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305839#M258969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, that's one of the possibilities for integration testing. What we really want, with so much server side javascript, is to have lots of unit tests to cover our code close to 100%.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 20:12:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305839#M258969</guid>
      <dc:creator>akoudrin</dc:creator>
      <dc:date>2013-05-06T20:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305840#M258970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm. I usually wrap everything in the controller in at least a "main" method. You could, perhaps, separate most of the controller code to a *.lib.js file, define some of your own global vars and include the lib.js file in a test version?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So your testController.js file looks like this (and you call it via that command servlet, not as a web script).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;javascript&amp;gt;&amp;lt;import resource="classpath:ctrl.lib.js"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var companyhome = "fakecompanyhomeobject"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var document = fakedocument;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var args = { site: "fakeSite", nodeRef: "fakeNodeRef"};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;main();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And your regular controller just holds the import statement and main().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now that I've written it, it sounds kind of clumsy, but at least it's a start, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 21:12:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305840#M258970</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-05-06T21:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305841#M258971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ideally I'd like to find a framework to streamline writing lots of tests. Similar to Jasmine/PhantomJS framework. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 23:49:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305841#M258971</guid>
      <dc:creator>akoudrin</dc:creator>
      <dc:date>2013-05-06T23:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305842#M258972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Let us know when you do &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 17:09:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305842#M258972</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-05-07T17:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305843#M258973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm, can you find something useful here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.springsurf.org/sites/1.0.0.CI-SNAPSHOT/testapidocs/org/springframework/extensions/webscripts/package-tree.html" rel="nofollow noopener noreferrer"&gt;http://www.springsurf.org/sites/1.0.0.CI-SNAPSHOT/testapidocs/org/springframework/extensions/webscripts/package-tree.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alfresco webscripts are done on springframework webscripts package.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 17:12:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305843#M258973</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2013-05-07T17:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305844#M258974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So do Alfresco Share developers look at this forum? Rather than trying to guess I'd actually like to get their answer to this. Or perhaps some could point me to the more appropriate forum?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 20:06:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305844#M258974</guid>
      <dc:creator>akoudrin</dc:creator>
      <dc:date>2013-05-07T20:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305845#M258975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm probably one of the very few Share developers to actually look at the Spring Surf forums, and I mostly just respond telling them to directly questions to the Alfresco forum. The honest answer is that up until now we haven't done a great deal of automated unit testing on Alfresco Share. There is an automated FVT suite within Surf that is based around TestNG but that is just for testing the basic Surf functionality. We are now starting to make a more concerted effort to automate the testing of Share but that does not really involve JavaScript unit tests but rather a more functional test approach. We do have Dojo DOH based unit testing on the new widget suite that we are developing though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 07:26:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305845#M258975</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-05-08T07:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing server side javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305846#M258976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great. Thank you for that honest answer. That's what I gathered in my preliminary web research too. I'll probably stick to our functional end-to-end test idea.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 19:39:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-server-side-javascript/m-p/305846#M258976</guid>
      <dc:creator>akoudrin</dc:creator>
      <dc:date>2013-05-08T19:39:13Z</dc:date>
    </item>
  </channel>
</rss>

