<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7061568054540301299</atom:id><lastBuildDate>Thu, 20 Jun 2013 11:17:02 +0000</lastBuildDate><category>NGit</category><category>Spring Framework</category><category>Trillions</category><category>Gamification</category><category>Kernel</category><category>Half-baked Idea</category><category>Mass Assignment</category><category>Security as BRAKES</category><category>Contract Work</category><category>Testing</category><category>FluentSharp</category><category>Code Club</category><category>Live Writer</category><category>NDepend</category><category>O2Platform</category><category>xkcd</category><category>OWASP</category><category>Git</category><category>Down memory lane</category><category>LeanPub</category><category>Jni4Net</category><category>Privacy</category><category>To add to O2</category><category>Video</category><category>WinAPI</category><category>Services</category><category>NUnit</category><category>IBM</category><category>PostSharp</category><category>Karma Points</category><category>CodingLab</category><category>Javascript</category><category>VisualStudio</category><category>OunceLabs</category><category>Learn-to-Code</category><category>Design</category><category>Security Innovation</category><category>WebGoat .NET</category><category>Wish lists</category><category>OWASP MIA</category><category>Development</category><category>JsTestDriver</category><category>Frameworks</category><category>OSx</category><category>ESAPI</category><category>NuGet</category><category>CatNet</category><category>O2 Script</category><category>Education</category><category>WAF</category><category>Sandboxing</category><category>Diagram</category><category>WatiN</category><category>Windows 8</category><category>MVC</category><category>UnitTests</category><category>KarmaJS</category><category>Selenium</category><category>TeamMentor</category><category>Philosophy</category><category>Security</category><category>Fuzzing</category><category>Azure</category><category>ASP.NET MVC</category><category>Unit Tests</category><category>PDFs</category><category>O2 Platform Tool</category><category>Roslyn</category><category>Chrome</category><category>BDD</category><category>FxCop</category><category>Presentation</category><category>AppSensor</category><category>Book</category><category>JustCode</category><category>WebStorm</category><category>PCI</category><category>Visualization</category><category>RazorSharp</category><category>MediaWiki</category><category>Raspberry PI</category><category>SAST</category><category>TeamMentor Security</category><category>ESTAPI</category><category>To Read</category><category>NodeJS</category><category>Java</category><category>O2 Platform</category><category>Google</category><category>Checkmarx</category><category>GitHub</category><category>Security as TAX</category><category>Markdown</category><category>TeamCity</category><category>Linux</category><category>Company Tips</category><category>AngularJS</category><category>O2</category><category>Tools</category><category>Patterns</category><category>Question</category><category>Rant</category><category>Code Cafe</category><category>Simple Microsoft</category><category>WPF</category><category>REPL</category><title>Dinis Cruz Blog</title><description>A personal blog about: transforming Web Application Security into an 'Application Visibility' engine, the OWASP O2 Platform, TeamMentor, Application/Data interoperability and a lot more</description><link>http://blog.diniscruz.com/</link><managingEditor>noreply@blogger.com (diniscruz)</managingEditor><generator>Blogger</generator><openSearch:totalResults>878</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DinisCruzBlog" /><feedburner:info uri="diniscruzblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>DinisCruzBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-5436574315359231479</guid><pubDate>Thu, 20 Jun 2013 11:08:00 +0000</pubDate><atom:updated>2013-06-20T12:17:02.879+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WinAPI</category><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">O2Platform</category><category domain="http://www.blogger.com/atom/ns#">KarmaJS</category><category domain="http://www.blogger.com/atom/ns#">WebStorm</category><title>Adding KarmaJS support to WebStorm to automagically run tests on file changes (and test UI with SublimeText, Chrome and Cmd.exe)</title><description>On the &lt;b&gt;&lt;i&gt;AngularJs&lt;/i&gt; &lt;/b&gt;and&lt;b&gt; &lt;i&gt;KarmaJS&lt;/i&gt;&lt;/b&gt; theme (see &lt;a href="http://blog.diniscruz.com/2013/06/a-small-angularjs-jasmine-test-executed.html"&gt;A small AngularJS Jasmine test executed by KarmaJS&lt;/a&gt;&amp;nbsp;and the related posts linked at the bottom), here is my first attempt at using Karma to test AngularJS code inside &lt;a href="http://teammentor.net/"&gt;TeamMentor&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I’m using WebStorm instead of VisualStudio, since for Javascript coding &lt;a href="http://www.jetbrains.com/webstorm/"&gt;WebStorm&lt;/a&gt; is MUCH better/faster/cleverer, specially since it has good support for AngularJs and Jasmine (with KarmaJS support easily added, as we are about to see).&lt;br /&gt;&lt;br /&gt;Also shown below is a cool tool I created that hijacks windows from SublimeText, Chrome and Cmd.exe windows into the same UI (an O2 Platform .NET Script)&lt;br /&gt;&lt;br /&gt;Here is the directory structure:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-8IonXUmB3sQ/UcHkeFgyywI/AAAAAAAAOQw/Mosvvg3sxuM/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-fQth5w3mC0o/UcHkelgpM2I/AAAAAAAAOQ4/vowangFVO0o/image_thumb.png?imgmax=800" height="248" style="border: 0px; display: inline;" title="image" width="442" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... with &lt;strong&gt;Karma.config.js &lt;/strong&gt;looking like this:&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;module.exports = function(karma)&lt;br /&gt;{&lt;br /&gt;    karma.configure({&lt;br /&gt;        frameworks: [&lt;span style="color: #006080;"&gt;'ng-scenario'&lt;/span&gt;],&lt;br /&gt;&lt;br /&gt;        files:&lt;br /&gt;            [&lt;br /&gt;                &lt;span style="color: #006080;"&gt;'../Tests/**/*.Spec.js'&lt;/span&gt;&lt;br /&gt;            ],&lt;br /&gt;&lt;br /&gt;        urlRoot: &lt;span style="color: #006080;"&gt;'/__karma/'&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;        autoWatch: &lt;span style="color: blue;"&gt;true&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;        proxies: {&lt;br /&gt;            &lt;span style="color: #006080;"&gt;'/'&lt;/span&gt;     : &lt;span style="color: #006080;"&gt;'http://localhost:12120/'&lt;/span&gt;,&lt;br /&gt;            &lt;span style="color: #006080;"&gt;'/Tests'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'http://localhost:12120/AngularJs/Tests/'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        },&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;//browsers: ['Chrome'],&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        reporters: [&lt;span style="color: #006080;"&gt;'dots'&lt;/span&gt;],&lt;br /&gt;        &lt;span style="color: green;"&gt;//reporters: ['progress'],&lt;/span&gt;&lt;br /&gt;        plugins: [&lt;br /&gt;                    &lt;span style="color: #006080;"&gt;'karma-ng-scenario'&lt;/span&gt;,&lt;br /&gt;                    &lt;span style="color: #006080;"&gt;'karma-chrome-launcher'&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: green;"&gt;//,'karma-firefox-launcher'&lt;/span&gt;&lt;br /&gt;                 ]  ,&lt;br /&gt;        &lt;span style="color: green;"&gt;//logLevel: karma.LOG_DEBUG&lt;/span&gt;&lt;br /&gt;        logLevel: karma.LOG_INFO&lt;br /&gt;    });&lt;br /&gt;};&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;… &lt;strong&gt;Simple.html &lt;/strong&gt;like this:&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html xmlns:ng=&lt;span style="color: #006080;"&gt;"http://angularjs.org"&lt;/span&gt; id=&lt;span style="color: #006080;"&gt;"ng-app"&lt;/span&gt; ng-app&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;meta charset=&lt;span style="color: #006080;"&gt;"utf-8"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;meta http-equiv=&lt;span style="color: #006080;"&gt;"X-UA-Compatible"&lt;/span&gt; __content=&lt;span style="color: #006080;"&gt;"IE=EmulateIE9"&lt;/span&gt; /&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;Simple AngularJS page&amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/Javascript/angularJS/1.0.5/angular.min.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;    &amp;lt;label&amp;gt;Name:&amp;lt;/label&amp;gt;&lt;br /&gt;    &amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; ng-model=&lt;span style="color: #006080;"&gt;"yourName"&lt;/span&gt; placeholder=&lt;span style="color: #006080;"&gt;"Enter a name here"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;hr&amp;gt;&lt;br /&gt;    &amp;lt;h1&amp;gt;Hello {{yourName}}!&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;… &lt;strong&gt;Simple.Spec.js&lt;/strong&gt; like this:&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;describe(&lt;span style="color: #006080;"&gt;'Test Angular Simple page'&lt;/span&gt;, function()&lt;br /&gt;    {&lt;br /&gt;        beforeEach(function() &lt;br /&gt;            {            &lt;br /&gt;                browser().navigateTo(&lt;span style="color: #006080;"&gt;'/Tests/AngularJS/Simple.html'&lt;/span&gt;);            &lt;br /&gt;            });&lt;br /&gt;        it(&lt;span style="color: #006080;"&gt;'Open Webpage and check URL'&lt;/span&gt;, function()&lt;br /&gt;            {                &lt;br /&gt;                expect(browser ().window().path()).toBe(&lt;span style="color: #006080;"&gt;"/Tests/AngularJS/Simple.html"&lt;/span&gt;);&lt;br /&gt;                expect(browser ().location().path()).toBe(&lt;span style="color: #006080;"&gt;""&lt;/span&gt;);&lt;br /&gt;                browser().navigateTo(&lt;span style="color: #006080;"&gt;'/Tests/AngularJS/aaa.html'&lt;/span&gt;);&lt;br /&gt;                expect(browser ().window().path()).not().toBe(&lt;span style="color: #006080;"&gt;"/Tests/AngularJS/Simple.html"&lt;/span&gt;);&lt;br /&gt;                expect(browser ().window().path()).toBe(&lt;span style="color: #006080;"&gt;"/Tests/AngularJS/aaa.html"&lt;/span&gt;);&lt;br /&gt;            });&lt;br /&gt;&lt;br /&gt;        it(&lt;span style="color: #006080;"&gt;'Set Field value and check Angular scope update'&lt;/span&gt;, function()&lt;br /&gt;            {&lt;br /&gt;                var testValue = &lt;span style="color: #006080;"&gt;"This is a value"&lt;/span&gt;;&lt;br /&gt;                var expectedValue = &lt;span style="color: #006080;"&gt;"Hello "&lt;/span&gt;  + testValue + &lt;span style="color: #006080;"&gt;"!"&lt;/span&gt;;&lt;br /&gt;                input(&lt;span style="color: #006080;"&gt;'yourName'&lt;/span&gt;).enter(testValue);&lt;br /&gt;                expect(element(&lt;span style="color: #006080;"&gt;'.ng-binding'&lt;/span&gt;).text()).toEqual(expectedValue);&lt;br /&gt;            });&lt;br /&gt;&lt;br /&gt;        it(&lt;span style="color: #006080;"&gt;'get path value manually (using setTimeout)'&lt;/span&gt;,function()&lt;br /&gt;            {&lt;br /&gt;                var path = browser().window().path();&lt;br /&gt;                console.log(&lt;span style="color: #006080;"&gt;"(before timeout) path value = "&lt;/span&gt; + path.&lt;span style="color: blue;"&gt;value&lt;/span&gt; );&lt;br /&gt;                setTimeout(function()&lt;br /&gt;                {&lt;br /&gt;                    console.log(&lt;span style="color: #006080;"&gt;"(after timeout) path value = "&lt;/span&gt; + path.&lt;span style="color: blue;"&gt;value&lt;/span&gt; );&lt;br /&gt;                    &lt;span style="color: green;"&gt;//expect("value").toBe("/123");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                },200);&lt;br /&gt;                sleep(1);&lt;br /&gt;            });&lt;br /&gt;    });&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;… and &lt;strong&gt;MarkDown.Editor.Spec.js&lt;/strong&gt;&amp;nbsp;currently with just&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;describe(&lt;span style="color: #006080;"&gt;'Markdown Editor - View funcionality'&lt;/span&gt;, function()&lt;br /&gt;    {&lt;br /&gt;        it(&lt;span style="color: #006080;"&gt;"Should open"&lt;/span&gt;, function()&lt;br /&gt;            {&lt;br /&gt;                browser().navigateTo(&lt;span style="color: #006080;"&gt;'/Markdown/Editor'&lt;/span&gt;);&lt;br /&gt;                expect(browser ().window().path()).toBe(&lt;span style="color: #006080;"&gt;"/Markdown/Editor"&lt;/span&gt;);&lt;br /&gt;                expect(browser ().location().path()).toBe(&lt;span style="color: #006080;"&gt;""&lt;/span&gt;);&lt;br /&gt;                &lt;span style="color: green;"&gt;//sleep(10);&lt;/span&gt;&lt;br /&gt;            });&lt;br /&gt;    });&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This is how I configured Karma to run on WebStorm:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Mg0MfdgPJVw/UcHkfOqyquI/AAAAAAAAORA/0y_0teZ_e9I/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-WIuEYWWz6L8/UcHkf1s6GlI/AAAAAAAAORI/mYc4CGXNzUQ/image_thumb%25255B4%25255D.png?imgmax=800" height="384" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is KarmaJS execution log:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-dfJJcErA5OE/UcHkgeegeZI/AAAAAAAAORM/wkR2GWNQBf8/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-6fTsDjD0DTw/UcHkgwBx74I/AAAAAAAAORY/G2n_C53kr3Y/image_thumb%25255B3%25255D.png?imgmax=800" height="157" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here are two connected KarmaJS Runners (one in IE and one in Chrome)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-u_tdyMkGw28/UcHkhT_UDzI/AAAAAAAAORc/d-9mfuV7Hlg/s1600-h/image%25255B19%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-5c5_MclmqV8/UcHkh067VNI/AAAAAAAAORo/aCrzVJhcxPs/image_thumb%25255B7%25255D.png?imgmax=800" height="246" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="431" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And finally, here is the (super useful)&amp;nbsp;&lt;b&gt;&lt;i&gt;AngularJS: Scenario Test Runner&lt;/i&gt;&lt;/b&gt; view, in a collapsed state:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-za3w2ooRVLQ/UcHkiROxavI/AAAAAAAAORw/dtxKpXyboGo/s1600-h/image%25255B25%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-HEJfFoXjvIY/UcHkjGK1RRI/AAAAAAAAOR4/RjBmfUeSNFY/image_thumb%25255B9%25255D.png?imgmax=800" height="270" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and in an expanded state:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-NKto0BGvq30/UcHkj0z3tFI/AAAAAAAAOSA/mlHA2ZeX9Uk/s1600-h/image%25255B22%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-2UAhYuUjpmU/UcHkkd9I9TI/AAAAAAAAOSI/X-SbCncVDiI/image_thumb%25255B8%25255D.png?imgmax=800" height="624" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With this set-up KarmaJS is configured to run continuously and to monitor any file changes, which is really powerful, since it allows for continuous development and testing.&lt;br /&gt;&lt;br /&gt;For example (to see the automagically execution in action), here is what the WebStorm UI looks like:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; … with an Javascript error:&lt;/strong&gt; (KarmaJS execution triggered on Save)&amp;nbsp;&lt;strong&gt;:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/--kIGGH7hWn4/UcHklE7w_vI/AAAAAAAAOSQ/BDFKYXI0qE4/s1600-h/image%25255B29%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/--Qt2u1S79XE/UcHkluSK7BI/AAAAAAAAOSY/XTnZfG3utwQ/image_thumb%25255B14%25255D.png?imgmax=800" height="384" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;… without the error:&amp;nbsp;&lt;/strong&gt;&amp;nbsp;(KarmaJS execution triggered on Save)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-SjisI8LisZ4/UcHkmNqibVI/AAAAAAAAOSc/EHrnDpKpKSw/s1600-h/image%25255B37%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-JMOwPdGs_yY/UcHkmgp859I/AAAAAAAAOSo/veKZHZYq4Yo/image_thumb%25255B24%25255D.png?imgmax=800" height="382" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This is a really nice environment to quickly develop AngularJS apps, specially since the tests are super quick to execute and we can control what tests are executed (for example by creating multiple karma.conf.js files)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;O2 Platform Test GUI (created by hijacking 3 processe' windows)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I also created a test GUI using the &lt;a href="http://blog.diniscruz.com/p/owasp-o2-platform.html"&gt;O2 Platform&lt;/a&gt;’s &lt;a href="http://blog.diniscruz.com/search/label/WinAPI"&gt;window-handle Hijack capabilities,&lt;/a&gt; which looked like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-rOs_1mRsHNg/UcHknTklw9I/AAAAAAAAOSw/64bixUvuB-s/s1600-h/image%25255B41%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-5C5TJ047dlM/UcHkoKCBX9I/AAAAAAAAOS4/P9IarataW2A/image_thumb%25255B29%25255D.png?imgmax=800" height="384" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In the image above:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The host process is the O2 Platform &lt;a href="http://blog.diniscruz.com/2012/11/util-win32-window-handle-hijack-4x-host.html"&gt;Util - Win32 Window Handle Hijack (4x host panels ).h2&lt;/a&gt; script/tool (which is a .Net app)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The left-hand side the &lt;a href="http://www.sublimetext.com/"&gt;&lt;b&gt;Sublime Text&lt;/b&gt; editor&lt;/a&gt; (which is a C++, Pyhton app)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The top-right is &lt;b&gt;&lt;i&gt;Chrome&lt;/i&gt;&lt;/b&gt; (which is C++ app)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The bottom-right is &lt;b&gt;cmd.exe&lt;/b&gt; (C++ app)&amp;nbsp;running the command &lt;em&gt;&lt;strong&gt;karma start karma.conf.js &lt;/strong&gt;in the &lt;strong&gt;E:\TeamMentor\TM_Dev Repos\TM_Dev_Dinis\Web Applications\TM_Website\AngularJS\Karma&lt;/strong&gt; folder&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;All in a nice, self-contained process/environment&lt;br /&gt;&lt;br /&gt;Note that there are 4 separate process at play here (O2 Platform, Sublime, Chrome and Cmd.Exe w/ Karma)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Related AngularJS and KarmaJS posts:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/06/a-small-angularjs-jasmine-test-executed.html"&gt;A small AngularJS Jasmine test executed by KarmaJS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/06/karmajs-angularjs-scenario-test-runner.html"&gt;KarmaJS AngularJS Scenario Test Runner execution variations in IE 7,8,9 and 10 when using AngularJS&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/06/debugging-weird-case-of-missing-module.html"&gt;Debugging a weird case of missing module in AngularJS and KarmaJS&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/06/running-karmas-angularjs-example.html"&gt;Running KarmaJS’s AngularJS example test/e2e/angular-scenario (on Chrome)&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/06/angularjs-code-editor-using-ui.html"&gt;AngularJS code editor using UI-Bootstrap and CodeMirror (done without using jQuery)&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/04/hubspot-currentjs-code-includes-jquery.html"&gt;Hubspot current.js code includes JQuery on it&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/04/submitting-tm-users-to-hubspot-via-tbot.html"&gt;Submitting TM users to HubSpot via TBOT interface (using Angular JS)&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/03/using-chrome-inside-native-visualstudio.html"&gt;Using Chrome inside a native VisualStudio pane (using Window Handle Hijacking)&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.diniscruz.com/2013/06/if-angularjs-doesnt-work-on-your-o2.html"&gt;If AngularJS doesn’t work on your O2 Platform IE scripts (the fix is to change browser compatibility mode)&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/Ph2QHzSIcoU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/Ph2QHzSIcoU/adding-karmajs-support-to-webstorm-and.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-fQth5w3mC0o/UcHkelgpM2I/AAAAAAAAOQ4/vowangFVO0o/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/adding-karmajs-support-to-webstorm-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7758010151127487483</guid><pubDate>Thu, 20 Jun 2013 10:51:00 +0000</pubDate><atom:updated>2013-06-20T11:51:40.081+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">O2 Platform</category><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">NodeJS</category><category domain="http://www.blogger.com/atom/ns#">KarmaJS</category><title>A small AngularJS Jasmine test executed by KarmaJS</title><description>When I try to understand how a particular technology works I always like to create a simple test case with a small number of moving parts. &lt;br /&gt;&lt;br /&gt;This post shows such example for an AngularJS page, a Jasmine test, a NodeJS web server and a KarmaJS execution cycle.&lt;br /&gt;&lt;br /&gt;The files used/customised&amp;nbsp;were based on the KarmaJS&amp;nbsp;&lt;a href="https://github.com/karma-runner/karma/tree/master/test/e2e/angular-scenario"&gt;test/e2e/angular-scenario &lt;/a&gt;example:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-yGVoY_fP3nA/Ub889_44XeI/AAAAAAAAOO0/wtk4G_m7xJA/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-trxSd5w_vXI/Ub88-UoEfbI/AAAAAAAAOO8/SDaDBknbi_g/image_thumb%25255B1%25255D.png?imgmax=800" height="216" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="523" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Let's look at each file's contents and what they do&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;1) &lt;strong&gt;angular.min.js&lt;/strong&gt; is the latest version of AngularJS&lt;br /&gt;&lt;br /&gt;2) &lt;strong&gt;index.html&lt;/strong&gt; is a simple AngularJS example:&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html xmlns:ng=&lt;span style="color: #006080;"&gt;"http://angularjs.org"&lt;/span&gt; id=&lt;span style="color: #006080;"&gt;"ng-app"&lt;/span&gt; ng-app&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;meta charset=&lt;span style="color: #006080;"&gt;"utf-8"&lt;/span&gt;&amp;gt;  &lt;br /&gt;  &amp;lt;title&amp;gt;Sample Angular App&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;script src=&lt;span style="color: #006080;"&gt;"angular.min.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;div&amp;gt;&lt;br /&gt;    &amp;lt;label&amp;gt;Name:&amp;lt;/label&amp;gt;&lt;br /&gt;    &amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; ng-model=&lt;span style="color: #006080;"&gt;"yourName"&lt;/span&gt; placeholder=&lt;span style="color: #006080;"&gt;"Enter a name here"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;hr&amp;gt;&lt;br /&gt;    &amp;lt;h1&amp;gt;Hello {{yourName}}!&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;3) &lt;b&gt;karma.conf.js&lt;/b&gt; is a reduced to the normal KarmaJS config file&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;module.exports = function(karma) &lt;br /&gt;    {&lt;br /&gt;        karma.configure(&lt;br /&gt;              {&lt;br /&gt;                  &lt;span style="color: green;"&gt;// generic&lt;/span&gt;&lt;br /&gt;                frameworks    : [&lt;span style="color: #006080;"&gt;'ng-scenario'&lt;/span&gt;],                        &lt;br /&gt;                urlRoot        : &lt;span style="color: #006080;"&gt;'/__karma/'&lt;/span&gt;,        &lt;br /&gt;                autoWatch    : &lt;span style="color: blue;"&gt;true&lt;/span&gt;,                                &lt;br /&gt;                plugins     : [&lt;span style="color: #006080;"&gt;'karma-ng-scenario'&lt;/span&gt;],&lt;br /&gt;                &lt;br /&gt;                &lt;span style="color: green;"&gt;//project specific&lt;/span&gt;&lt;br /&gt;                proxies        : { &lt;span style="color: #006080;"&gt;'/'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'http://localhost:8000/'&lt;/span&gt;},                            &lt;br /&gt;                files        : [&lt;span style="color: #006080;"&gt;'singleTest.js'&lt;/span&gt;],&lt;br /&gt;                &lt;br /&gt;                &lt;span style="color: green;"&gt;//run specific                &lt;/span&gt;&lt;br /&gt;                singleRun : &lt;span style="color: blue;"&gt;true&lt;/span&gt;,                &lt;br /&gt;            });&lt;br /&gt;    };&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;4) &lt;strong&gt;singleTest.js&lt;/strong&gt; checks if AngularJS is working as expected&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;/** A Sample Angular E2E test */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;describe(&lt;span style="color: #006080;"&gt;'SimpleTest'&lt;/span&gt;, function() {&lt;br /&gt;   &lt;br /&gt;  it(&lt;span style="color: #006080;"&gt;'A small Angular Test'&lt;/span&gt;, function() {&lt;br /&gt;    browser().navigateTo(&lt;span style="color: #006080;"&gt;'/index.html'&lt;/span&gt;);&lt;br /&gt;    input(&lt;span style="color: #006080;"&gt;'yourName'&lt;/span&gt;).enter(&lt;span style="color: #006080;"&gt;'A Pirate!'&lt;/span&gt;);&lt;br /&gt;    expect(element(&lt;span style="color: #006080;"&gt;'.ng-binding'&lt;/span&gt;).text()).toEqual(&lt;span style="color: #006080;"&gt;'Hello A Pirate!!'&lt;/span&gt;);&lt;br /&gt;  });    &lt;br /&gt;});&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;5) &lt;b&gt;server.js&lt;/b&gt; is a working Web NodeJS server (also reduced for easier reading):&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;var sys = require(&lt;span style="color: #006080;"&gt;'sys'&lt;/span&gt;),&lt;br /&gt;    http = require(&lt;span style="color: #006080;"&gt;'http'&lt;/span&gt;),&lt;br /&gt;    fs = require(&lt;span style="color: #006080;"&gt;'fs'&lt;/span&gt;),&lt;br /&gt;    url = require(&lt;span style="color: #006080;"&gt;'url'&lt;/span&gt;),&lt;br /&gt;    events = require(&lt;span style="color: #006080;"&gt;'events'&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;var DEFAULT_PORT = 8000;&lt;br /&gt;&lt;br /&gt;function main(argv) {&lt;br /&gt;  &lt;span style="color: blue;"&gt;new&lt;/span&gt; HttpServer({&lt;br /&gt;    &lt;span style="color: #006080;"&gt;'GET'&lt;/span&gt;: createServlet(StaticServlet),&lt;br /&gt;    &lt;span style="color: #006080;"&gt;'HEAD'&lt;/span&gt;: createServlet(StaticServlet)&lt;br /&gt;  }).start(Number(argv[2]) || DEFAULT_PORT);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function escapeHtml(&lt;span style="color: blue;"&gt;value&lt;/span&gt;) {&lt;br /&gt;  &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;value&lt;/span&gt;.toString().&lt;br /&gt;    replace(&lt;span style="color: #006080;"&gt;'&amp;lt;'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'&amp;amp;lt;'&lt;/span&gt;).&lt;br /&gt;    replace(&lt;span style="color: #006080;"&gt;'&amp;gt;'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'&amp;amp;gt'&lt;/span&gt;).&lt;br /&gt;    replace(&lt;span style="color: #006080;"&gt;'"'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'&amp;amp;quot;'&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function createServlet(Class) {&lt;br /&gt;  var servlet = &lt;span style="color: blue;"&gt;new&lt;/span&gt; Class();&lt;br /&gt;  &lt;span style="color: blue;"&gt;return&lt;/span&gt; servlet.handleRequest.bind(servlet);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; * An Http server implementation that uses a map of methods to decide&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; * action routing.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; * @param {Object} Map of method =&amp;gt; Handler function&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; */&lt;/span&gt;&lt;br /&gt;function HttpServer(handlers) {&lt;br /&gt;  &lt;span style="color: blue;"&gt;this&lt;/span&gt;.handlers = handlers;&lt;br /&gt;  &lt;span style="color: blue;"&gt;this&lt;/span&gt;.server = http.createServer(&lt;span style="color: blue;"&gt;this&lt;/span&gt;.handleRequest_.bind(&lt;span style="color: blue;"&gt;this&lt;/span&gt;));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;HttpServer.prototype.start = function(port) {&lt;br /&gt;  &lt;span style="color: blue;"&gt;this&lt;/span&gt;.port = port;&lt;br /&gt;  &lt;span style="color: blue;"&gt;this&lt;/span&gt;.server.listen(port);&lt;br /&gt;  sys.puts(&lt;span style="color: #006080;"&gt;'Http Server running at http://127.0.0.1:'&lt;/span&gt; + port + &lt;span style="color: #006080;"&gt;'/'&lt;/span&gt;);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;HttpServer.prototype.parseUrl_ = function(urlString) {&lt;br /&gt;  var parsed = url.parse(urlString);&lt;br /&gt;  parsed.pathname = url.resolve(&lt;span style="color: #006080;"&gt;'/'&lt;/span&gt;, parsed.pathname);&lt;br /&gt;  &lt;span style="color: blue;"&gt;return&lt;/span&gt; url.parse(url.format(parsed), &lt;span style="color: blue;"&gt;true&lt;/span&gt;);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;HttpServer.prototype.handleRequest_ = function(req, res) {&lt;br /&gt;  var logEntry = req.method + &lt;span style="color: #006080;"&gt;' '&lt;/span&gt; + req.url;&lt;br /&gt;  &lt;span style="color: blue;"&gt;if&lt;/span&gt; (req.headers[&lt;span style="color: #006080;"&gt;'user-agent'&lt;/span&gt;]) {&lt;br /&gt;    logEntry += &lt;span style="color: #006080;"&gt;' '&lt;/span&gt; + req.headers[&lt;span style="color: #006080;"&gt;'user-agent'&lt;/span&gt;];&lt;br /&gt;  }&lt;br /&gt;  sys.puts(logEntry);&lt;br /&gt;  req.url = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.parseUrl_(req.url);&lt;br /&gt;  var handler = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.handlers[req.method];&lt;br /&gt;  &lt;span style="color: blue;"&gt;if&lt;/span&gt; (!handler) {&lt;br /&gt;    res.writeHead(501);&lt;br /&gt;    res.end();&lt;br /&gt;  } &lt;span style="color: blue;"&gt;else&lt;/span&gt; {&lt;br /&gt;    handler.call(&lt;span style="color: blue;"&gt;this&lt;/span&gt;, req, res);&lt;br /&gt;  }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; * Handles static content.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt; */&lt;/span&gt;&lt;br /&gt;function StaticServlet() {}&lt;br /&gt;&lt;br /&gt;StaticServlet.MimeMap = {&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'txt'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'text/plain'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'html'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'text/html'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'css'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'text/css'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'xml'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'application/xml'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'json'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'application/json'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'js'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'application/javascript'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'jpg'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'image/jpeg'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'jpeg'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'image/jpeg'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'gif'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'image/gif'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'png'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'image/png'&lt;/span&gt;,&lt;br /&gt;  &lt;span style="color: #006080;"&gt;'manifest'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'text/cache-manifest'&lt;/span&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;StaticServlet.prototype.handleRequest = function(req, res) {&lt;br /&gt;  var self = &lt;span style="color: blue;"&gt;this&lt;/span&gt;;&lt;br /&gt;  var path = (&lt;span style="color: #006080;"&gt;'./'&lt;/span&gt; + req.url.pathname).replace(&lt;span style="color: #006080;"&gt;'//'&lt;/span&gt;,&lt;span style="color: #006080;"&gt;'/'&lt;/span&gt;).replace(/%(..)/g, function(match, hex){&lt;br /&gt;    &lt;span style="color: blue;"&gt;return&lt;/span&gt; String.fromCharCode(parseInt(hex, 16));&lt;br /&gt;  });&lt;br /&gt;  var parts = path.split(&lt;span style="color: #006080;"&gt;'/'&lt;/span&gt;); &lt;br /&gt;&lt;br /&gt;  fs.stat(path, function(err, stat) {&lt;br /&gt;    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (err)&lt;br /&gt;      &lt;span style="color: blue;"&gt;return&lt;/span&gt; self.sendMissing_(req, res, path);&lt;br /&gt;    &lt;span style="color: blue;"&gt;return&lt;/span&gt; self.sendFile_(req, res, path);&lt;br /&gt;  });&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;StaticServlet.prototype.sendFile_ = function(req, res, path) {&lt;br /&gt;  var self = &lt;span style="color: blue;"&gt;this&lt;/span&gt;;&lt;br /&gt;  var file = fs.createReadStream(path);&lt;br /&gt;  res.writeHead(200, {&lt;br /&gt;    &lt;span style="color: green;"&gt;// CSP headers, uncomment to enable CSP&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;//"X-WebKit-CSP": "default-src 'self';",&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;//"X-Content-Security-Policy": "default-src 'self'",&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #006080;"&gt;'Content-Type'&lt;/span&gt;: StaticServlet.&lt;br /&gt;      MimeMap[path.split(&lt;span style="color: #006080;"&gt;'.'&lt;/span&gt;).pop()] || &lt;span style="color: #006080;"&gt;'text/plain'&lt;/span&gt;&lt;br /&gt;  });&lt;br /&gt;  &lt;span style="color: blue;"&gt;if&lt;/span&gt; (req.method === &lt;span style="color: #006080;"&gt;'HEAD'&lt;/span&gt;) {&lt;br /&gt;    res.end();&lt;br /&gt;  } &lt;span style="color: blue;"&gt;else&lt;/span&gt; {&lt;br /&gt;    file.on(&lt;span style="color: #006080;"&gt;'data'&lt;/span&gt;, res.write.bind(res));&lt;br /&gt;    file.on(&lt;span style="color: #006080;"&gt;'close'&lt;/span&gt;, function() {&lt;br /&gt;      res.end();&lt;br /&gt;    });&lt;br /&gt;    file.on(&lt;span style="color: #006080;"&gt;'error'&lt;/span&gt;, function(error) {&lt;br /&gt;      self.sendError_(req, res, error);&lt;br /&gt;    });&lt;br /&gt;  }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;StaticServlet.prototype.sendError_ = function(req, res, error) {&lt;br /&gt;  res.writeHead(500, {&lt;br /&gt;      &lt;span style="color: #006080;"&gt;'Content-Type'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'text/html'&lt;/span&gt;&lt;br /&gt;  });&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;!doctype html&amp;gt;\n'&lt;/span&gt;);&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;title&amp;gt;Internal Server Error&amp;lt;/title&amp;gt;\n'&lt;/span&gt;);&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;h1&amp;gt;Internal Server Error&amp;lt;/h1&amp;gt;'&lt;/span&gt;);&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;pre&amp;gt;'&lt;/span&gt; + escapeHtml(sys.inspect(error)) + &lt;span style="color: #006080;"&gt;'&amp;lt;/pre&amp;gt;'&lt;/span&gt;);&lt;br /&gt;  sys.puts(&lt;span style="color: #006080;"&gt;'500 Internal Server Error'&lt;/span&gt;);&lt;br /&gt;  sys.puts(sys.inspect(error));&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;StaticServlet.prototype.sendMissing_ = function(req, res, path) {&lt;br /&gt;  path = path.substring(1);&lt;br /&gt;  res.writeHead(404, {&lt;br /&gt;      &lt;span style="color: #006080;"&gt;'Content-Type'&lt;/span&gt;: &lt;span style="color: #006080;"&gt;'text/html'&lt;/span&gt;&lt;br /&gt;  });&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;!doctype html&amp;gt;\n'&lt;/span&gt;);&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;title&amp;gt;404 Not Found&amp;lt;/title&amp;gt;\n'&lt;/span&gt;);&lt;br /&gt;  res.write(&lt;span style="color: #006080;"&gt;'&amp;lt;h1&amp;gt;Not Found&amp;lt;/h1&amp;gt;'&lt;/span&gt;);&lt;br /&gt;  res.write(&lt;br /&gt;    &lt;span style="color: #006080;"&gt;'&amp;lt;p&amp;gt;The requested URL '&lt;/span&gt; +&lt;br /&gt;    escapeHtml(path) +&lt;br /&gt;    &lt;span style="color: #006080;"&gt;' was not found on this server.&amp;lt;/p&amp;gt;'&lt;/span&gt;&lt;br /&gt;  );&lt;br /&gt;  res.end();&lt;br /&gt;  sys.puts(&lt;span style="color: #006080;"&gt;'404 Not Found: '&lt;/span&gt; + path);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;// Must be last,&lt;/span&gt;&lt;br /&gt;main(process.argv);&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To see this in action&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) start the web server&lt;/strong&gt; using&amp;nbsp;&lt;strong&gt;&lt;em&gt;start node server.js&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Kwz3IbT1I6c/Ub88_RECC4I/AAAAAAAAOPE/BflzoFoW4l0/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-pA5xglcFudg/Ub89ALhDEuI/AAAAAAAAOPM/KqGfXr-bTqI/image_thumb%25255B2%25255D.png?imgmax=800" height="298" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) start karm&lt;/strong&gt;a with &lt;strong&gt;&lt;em&gt;karma start karma.confi.js&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-j8PTD4oh4Rk/Ub89A1U57aI/AAAAAAAAOPU/nfwX_XAVFdA/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-jh7oJbldTtk/Ub89Bn_K9RI/AAAAAAAAOPc/uG71ZNcBhqg/image_thumb%25255B3%25255D.png?imgmax=800" height="110" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3) on a local browser open&lt;/strong&gt; &lt;strong&gt;&lt;a href="http://localhost:9876/__karma"&gt;&lt;em&gt;http://localhost:9876/__karma&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;nbsp; &lt;/em&gt;&lt;/strong&gt;which will execute the test&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ucIYxPcdf98/Ub89CjxG1rI/AAAAAAAAOPk/Xo5_COrYThk/s1600-h/image%25255B21%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-OBRpqqiBAHE/Ub89D9WZCYI/AAAAAAAAOPs/H_e3ymZ4mKc/image_thumb%25255B7%25255D.png?imgmax=800" height="476" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="413" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Since we have &lt;b style="font-style: italic;"&gt;singleRun &lt;/b&gt;set to&lt;b style="font-style: italic;"&gt; true &lt;/b&gt;(in &lt;b&gt;&lt;i&gt;karma.conf.js&lt;/i&gt;&lt;/b&gt;), the karma process ends after each execution, which means that the captured browsers will go into a ‘wait state’ (i.e. waiting for another karma server to come back to life)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-AVki_jx0WUc/Ub89E7j6-7I/AAAAAAAAOP0/pwxLY5SKu68/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-XhGGmUDb0b0/Ub89FQyQ8bI/AAAAAAAAOP8/k4vOAHfCAQE/image_thumb%25255B4%25255D.png?imgmax=800" height="273" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="525" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4) notice that back in karma, the tests executed ok:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-uPXcree5vsQ/Ub89GE6Dj3I/AAAAAAAAOQE/Z8e62t18vT0/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-7np0AUlPgu8/Ub89G-B81tI/AAAAAAAAOQM/JY0cgVj4iQY/image_thumb%25255B5%25255D.png?imgmax=800" height="66" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So here it is, a petty small example of a really powerful combination of technologies (and UnitTests workflows)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE: while creating this post, I wrote an O2 Platform C# script to help &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;this script created a nice integrated test UI&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-MIQ2oGrmYVA/Ub89HySxGpI/AAAAAAAAOQU/-wVqQ_FSM-0/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-B2Zu3zDltAs/Ub89I3ulHuI/AAAAAAAAOQc/nWfuM1WvuYg/image_thumb.png?imgmax=800" height="392" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Which allowed me to (in the same window) make changes and see its impact&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;C# script of UI shown above&lt;/strong&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;var topPanel = &lt;span style="color: #006080;"&gt;"PoC - Karma and Angular run"&lt;/span&gt;.popupWindow(1200,700);&lt;br /&gt;&lt;span style="color: green;"&gt;//var topPanel = panel.clear().add_Panel();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//var textBox = topPanel.clear().add_RichTextBox();&lt;/span&gt;&lt;br /&gt;var codeDir  = &lt;span style="color: #006080;"&gt;@"E:\_Code_Tests\AngularJS\angular-scenario"&lt;/span&gt;;&lt;br /&gt;var karma      = &lt;span style="color: #006080;"&gt;@"C:\Users\o2\AppData\Roaming\npm\node_modules\karma\bin\karma"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;var testPage = &lt;span style="color: #006080;"&gt;"http://localhost:8000/index.html"&lt;/span&gt;;            &lt;br /&gt;var testRunner = &lt;span style="color: #006080;"&gt;"http://localhost:9876/__karma/"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;var karmaConfig = codeDir.pathCombine(&lt;span style="color: #006080;"&gt;"karma.conf.js"&lt;/span&gt;);&lt;br /&gt;var serverConfig = codeDir.pathCombine(&lt;span style="color: #006080;"&gt;"server.js"&lt;/span&gt;);&lt;br /&gt;var unitTestFile = codeDir.pathCombine(&lt;span style="color: #006080;"&gt;"e2eSpec.js"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;Process karmaProcess = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;Action startWebServer = &lt;br /&gt;    ()=&amp;gt;{&lt;br /&gt;            Processes.startProcessAndRedirectIO(&lt;span style="color: #006080;"&gt;"node"&lt;/span&gt;, serverConfig,codeDir,(line)=&amp;gt;line.info());            &lt;br /&gt;        };&lt;br /&gt;        &lt;br /&gt;Action runKarma = &lt;br /&gt;    ()=&amp;gt;{&lt;br /&gt;            Action&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; consoleOut = &lt;br /&gt;                (consoleLine)=&amp;gt;  consoleLine.info(); &lt;span style="color: green;"&gt;//textBox.append_Line(consoleLine);&lt;/span&gt;&lt;br /&gt;            &lt;br /&gt;            var command = &lt;span style="color: #006080;"&gt;"start \"{0}\" "&lt;/span&gt;.format(karmaConfig);&lt;br /&gt;            karmaProcess = &lt;span style="color: #006080;"&gt;"node"&lt;/span&gt;.startProcess(&lt;span style="color: #006080;"&gt;"\""&lt;/span&gt; + karma + &lt;span style="color: #006080;"&gt;"\" "&lt;/span&gt; + command, consoleOut);            &lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (testPage.GET().notValid())&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #006080;"&gt;"Staring WebServer"&lt;/span&gt;.info();&lt;br /&gt;    startWebServer();&lt;br /&gt;    1000.wait();&lt;br /&gt;}&lt;br /&gt;var toolStrip           = topPanel.insert_Above_ToolStrip();&lt;br /&gt;var codeEditor_Test   = topPanel.add_SourceCodeEditor();&lt;br /&gt;var ie_UnitTestRunner = codeEditor_Test.insert_Right().add_WebBrowser_with_NavigationBar();&lt;br /&gt;var ie_Site              = ie_UnitTestRunner.insert_Below().add_WebBrowser_with_NavigationBar();&lt;br /&gt;var codeEditor_Config  = codeEditor_Test.insert_Below().add_SourceCodeEditor();&lt;br /&gt;&lt;br /&gt;codeEditor_Test.open(unitTestFile);&lt;br /&gt;codeEditor_Config.open(karmaConfig);&lt;br /&gt;ie_Site.open(testPage);&lt;br /&gt;ie_UnitTestRunner.open(testRunner);&lt;br /&gt;toolStrip.add_Button(&lt;span style="color: #006080;"&gt;"Run"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"btExecuteSelectedMethod_Image"&lt;/span&gt;.formImage(),()=&amp;gt;runKarma());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;runKarma();&lt;br /&gt;&lt;br /&gt;//&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Diagnostics&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/ze0lVMOaKh8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/ze0lVMOaKh8/a-small-angularjs-jasmine-test-executed.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-trxSd5w_vXI/Ub88-UoEfbI/AAAAAAAAOO8/SDaDBknbi_g/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/a-small-angularjs-jasmine-test-executed.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-8268305303536403648</guid><pubDate>Thu, 20 Jun 2013 10:24:00 +0000</pubDate><atom:updated>2013-06-20T11:24:43.472+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">KarmaJS</category><title>KarmaJS AngularJS Scenario Test Runner execution variations in IE 7,8,9 and 10 when using AngularJS</title><description>While trying to get &lt;a href="http://blog.diniscruz.com/2013/06/running-karmas-angularjs-example.html"&gt;Karma JS&lt;/a&gt; to work, I found a number of different&amp;nbsp;behaviours&amp;nbsp;for its AngularJS Scenario Test Runner in IE’s multiple &lt;i&gt;'compatibility modes'.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;TLDR: some of the Jasmine and AngularJS test apis don't work (although Angular does seem to work ok)&lt;br /&gt;&lt;br /&gt;Here is the default web page I was using:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-93ThkNJE4DI/Ub81jzrog2I/AAAAAAAAOL8/_hRYGy_zb18/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-z93Pq1jwvd8/Ub81lKrN6SI/AAAAAAAAOME/ueKqTekBb_I/image_thumb.png?imgmax=800" height="301" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is the test executed&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-l_hkkiE3Cac/Ub81mMBxj6I/AAAAAAAAOMM/gEvzFmFanAU/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-tZ9XwAokXyk/Ub81nklcvtI/AAAAAAAAOMU/Me5JorwtAE4/image_thumb%25255B1%25255D.png?imgmax=800" height="301" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is KarmaJS starting and successfully executing the tests&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-3hS8aotkjSg/Ub81o_Hx67I/AAAAAAAAOMc/jHHjtKt3z40/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-j9BePv9i2ZY/Ub81p_sPuKI/AAAAAAAAOMk/PqiL9_0MUmo/image_thumb%25255B2%25255D.png?imgmax=800" height="217" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... in this captured IE browser session:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-_kiGL1Qm9No/Ub81rPVsAiI/AAAAAAAAOMs/66iCYB0SonU/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-5iaK9nuG0BY/Ub81sK3pj7I/AAAAAAAAOM0/smgzTrxPyGQ/image_thumb%25255B3%25255D.png?imgmax=800" height="378" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Just to confirm that the target page works in the multiple IE configurations, here it is running in:&lt;br /&gt;&lt;br /&gt;IE 10 , IE9, IE 8:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ILYSqhy4UuM/Ub81s4LskEI/AAAAAAAAOM8/8cr0nXJyYeg/s1600-h/image%25255B20%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-HycwNC14UW0/Ub81tnP8ciI/AAAAAAAAONE/E3Jtlm7FUQ0/image_thumb%25255B6%25255D.png?imgmax=800" height="166" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and even in IE 7:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-3pZiPds1sFs/Ub81uVlTK4I/AAAAAAAAONM/oMHRcZduGos/s1600-h/image%25255B23%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-VKlL0XL4FBY/Ub81vgQdJeI/AAAAAAAAONU/519Al2HLMDM/image_thumb%25255B7%25255D.png?imgmax=800" height="166" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Now lets click on the&amp;nbsp;&lt;em style="font-weight: bold;"&gt;DEBUG &lt;/em&gt;button&amp;nbsp;to open the KarmaJS's&lt;b&gt;&lt;i&gt; AngularJS Scenario Test Runner&lt;/i&gt;&lt;/b&gt;&amp;nbsp;view and see what happens in multiple IE compatibility modes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IE 10 Works:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-Ggd7FrQ61IE/Ub81wlkLNSI/AAAAAAAAONc/1-OHpIkxBWA/s1600-h/image%25255B26%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/--XzIqKrhQzc/Ub81xZpuejI/AAAAAAAAONk/V6It0YZKbKo/image_thumb%25255B8%25255D.png?imgmax=800" height="233" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;IE 10 Compatibility View&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-Hx5y-Yidxqs/Ub81yPjMzCI/AAAAAAAAONs/ZBU-7gTzVGQ/s1600-h/image%25255B29%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-4Fx1Z9GwPy8/Ub81zTfPUdI/AAAAAAAAON0/tV3K2qP0g90/image_thumb%25255B9%25255D.png?imgmax=800" height="307" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;IE 9 Fails:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-QIAZgBjq96M/Ub810sY6ZaI/AAAAAAAAON8/WfDpOZ9H7Fc/s1600-h/image%25255B35%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-kLigYvVV_Bc/Ub811lXeJ1I/AAAAAAAAOOE/4fTnymvFo14/image_thumb%25255B11%25255D.png?imgmax=800" height="307" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;IE 8 Works (WTF!!)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-ewDXhdyCBxw/Ub812v9KfiI/AAAAAAAAOOM/vOuJYJeVFi8/s1600-h/image%25255B38%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-pWotepAtwvs/Ub814FhFe5I/AAAAAAAAOOU/e8MB73pQ4KY/image_thumb%25255B12%25255D.png?imgmax=800" height="307" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;IE 7 Fails&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-k17ocI47gew/Ub815K35k1I/AAAAAAAAOOc/5f11NDK9Gjc/s1600-h/image%25255B41%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-4U49TetkFMA/Ub8154sMNeI/AAAAAAAAOOk/5omRrQkbY2Y/image_thumb%25255B13%25255D.png?imgmax=800" height="307" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So unfortunately it looks like this technique can't be used to run e2e (end-to-end) tests on AngularJS apps using KarmaJS&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/Gio5Tptfybc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/Gio5Tptfybc/karmajs-angularjs-scenario-test-runner.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-z93Pq1jwvd8/Ub81lKrN6SI/AAAAAAAAOME/ueKqTekBb_I/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/karmajs-angularjs-scenario-test-runner.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-781450866299092121</guid><pubDate>Thu, 20 Jun 2013 10:16:00 +0000</pubDate><atom:updated>2013-06-20T11:16:13.698+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">O2Platform</category><title>If AngularJS doesn’t work on your O2 Platform IE scripts (the fix is to change browser compatibility mode)</title><description>If when trying to open an AngularJS page inside an O2 Platform script, you see:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-lNE5uz7QTIg/Ub8npGeqrEI/AAAAAAAAOK0/HARDf3JJI5g/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-NRgCdx14wb0/Ub8np11GLCI/AAAAAAAAOK8/wexVXjfWYxQ/image_thumb.png?imgmax=800" height="165" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... this means that the IE browser&amp;nbsp;embedded&amp;nbsp;in that .NET process is set to run under IE 7&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;To confirm it, try opening the &lt;a href="http://www.whatismybrowser.com/"&gt;http://www.whatismybrowser.com&lt;/a&gt; and you should see something like:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-2ugmEDo0ToQ/Ub8nrMhHa1I/AAAAAAAAOLE/Um-XiU2fEJs/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-4XGnRUZyLI0/Ub8nsI-lN6I/AAAAAAAAOLM/wS9vf-DsMTI/image_thumb%25255B1%25255D.png?imgmax=800" height="337" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;As mentioned in the s&lt;a href="http://o2platform.wordpress.com/2012/04/17/set-net-webbrowser-control-to-use-latest-version-of-ie/"&gt;et .NET WebBrowser Control to use latest version of IE&lt;/a&gt;&amp;nbsp; post to. change it on your system, run this script&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles26B705B/image[37].png"&gt;&lt;img alt="image_thumb[23]" border="0" src="http://lh4.ggpht.com/-nu5TjUI2PNU/Ub8nswc9-5I/AAAAAAAAOLU/e_apNiSn95k/image_thumb%25255B23%25255D%25255B2%25255D.png?imgmax=800" height="160" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[23]" width="315" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... as admin with no UAC&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles26B705B/image[40].png"&gt;&lt;img alt="image_thumb[24]" border="0" src="http://lh5.ggpht.com/-qBeQSMrSCN8/Ub8nuG0BI2I/AAAAAAAAOLc/zz8FCCluOX8/image_thumb%25255B24%25255D%25255B2%25255D.png?imgmax=800" height="142" style="border: 0px; display: inline;" title="image_thumb[24]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...and now after restarting the O2 Platform process, IE should be on Internet &lt;strong&gt;Explorer 9 compatibility mode&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles26B705B/image[43].png"&gt;&lt;img alt="image_thumb[25]" border="0" src="http://lh3.ggpht.com/-ZIIL_ikZnaM/Ub8nvHTHsKI/AAAAAAAAOLk/incoz7yPu0A/image_thumb%25255B25%25255D%25255B2%25255D.png?imgmax=800" height="391" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[25]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and AngularJS should work:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles26B705B/image[46].png"&gt;&lt;img alt="image_thumb[26]" border="0" src="http://lh5.ggpht.com/-NlKMg0GOhb4/Ub8nv1R-OcI/AAAAAAAAOLs/SDJ5XFcTlAc/image_thumb%25255B26%25255D%25255B2%25255D.png?imgmax=800" height="276" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[26]" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles26B705B/image[46].png"&gt;&lt;br /&gt;&lt;/a&gt;&lt;b&gt;Note 1: &lt;/b&gt;if you control the site you are testing, you can also add this also works to make it work (with the advantage that it is not exe specific)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /&amp;gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles26B705B/image[46].png"&gt;&lt;/a&gt;&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/5UGj9N7NGsE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/5UGj9N7NGsE/if-angularjs-doesnt-work-on-your-o2.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-NRgCdx14wb0/Ub8np11GLCI/AAAAAAAAOK8/wexVXjfWYxQ/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/if-angularjs-doesnt-work-on-your-o2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-4114522169603967755</guid><pubDate>Wed, 19 Jun 2013 17:48:00 +0000</pubDate><atom:updated>2013-06-20T11:26:00.987+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">NodeJS</category><category domain="http://www.blogger.com/atom/ns#">KarmaJS</category><title>Debugging a weird case of missing module in AngularJS and KarmaJS</title><description>When I was trying the &amp;nbsp;&lt;a href="http://blog.diniscruz.com/2013/06/running-karmas-angularjs-example.html"&gt;Running KarmaJS’s AngularJS example test/e2e/angular-scenario (on Chrome)&lt;/a&gt;&amp;nbsp;I hit on the the following&amp;nbsp;weird behaviour.&lt;br /&gt;&lt;br /&gt;TLDR; the solution was to run&amp;nbsp;&lt;strong&gt;&lt;em&gt;npm install –g&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;karma@canary&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Setup&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Chrome window opened in:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-gOnNRpYO97k/Ub8e8uhBqbI/AAAAAAAAOGU/wPWUvIoVA6Q/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-KzxD5scrAs8/Ub8e9ZIilFI/AAAAAAAAOGc/h3HWRINnewk/image_thumb%25255B4%25255D.png?imgmax=800" height="234" style="border: 0px; display: inline;" title="image" width="304" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... a local website at port 8000:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-_laPjPIUgSc/Ub8e-HRG1KI/AAAAAAAAOGk/abj6VBYsgg8/s1600-h/image%25255B9%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-Ve4Sobc4-Is/Ub8lKuDDBII/AAAAAAAAOG0/OinlX5Y4e4s/image_thumb%25255B5%25255D.png?imgmax=800" height="239" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="304" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… which is a nodeJS powered website, started using &lt;strong&gt;&lt;em&gt;node server.js&lt;/em&gt;&lt;/strong&gt; (below)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-VDWxVtk_FMc/Ub8lLdqcs_I/AAAAAAAAOG8/XdCk6fuvPsE/s1600-h/image%25255B23%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-185an0g2Q9Y/Ub8lMMrklKI/AAAAAAAAOHE/BBAp6fzLbfg/image_thumb%25255B13%25255D.png?imgmax=800" height="193" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="434" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A simple (as I could make it)&lt;b&gt;&lt;i&gt;&amp;nbsp;Karma.config.js &lt;/i&gt;&lt;/b&gt;file&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-2TqzSiJwIG4/Ub8lMxUbfuI/AAAAAAAAOHM/x3X6BK4evXM/s1600-h/image%25255B24%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/--LLnqW-uWco/Ub8lNlLlbTI/AAAAAAAAOHU/m44xMHM3Lpk/image_thumb%25255B14%25255D.png?imgmax=800" height="252" style="border: 0px; display: inline;" title="image" width="434" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;.... and&amp;nbsp;AngularJS test&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-VbIgWhcnL_0/Ub8lOOI808I/AAAAAAAAOHc/JGgfCLYAUJY/s1600-h/image%25255B25%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-ewlW-7MR_c4/Ub8lPYhBAAI/AAAAAAAAOHk/5zyvjvkNHAA/image_thumb%25255B15%25255D.png?imgmax=800" height="114" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="434" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Scenario A) Running from folder with karma clone (and npm install)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;karma start ..\angular-scenario\karma.conf.js &lt;/em&gt;&lt;/strong&gt;works OK&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-EjSAz4pB2MI/Ub8lQTn_mdI/AAAAAAAAOHs/vMJIFUb_XWk/s1600-h/image%25255B28%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-AHU4r0ZWnkY/Ub8lROxsC_I/AAAAAAAAOH0/4Gq3f5q2-L0/image_thumb%25255B16%25255D.png?imgmax=800" height="191" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Scenario B) running from parent folder&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;karma start angular-scenario\karma.conf.js &lt;/em&gt;&lt;/strong&gt;fails with a &lt;strong&gt;&lt;em&gt;module is not defined error&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-4sk8_OwZxfQ/Ub8lR1hpwUI/AAAAAAAAOH8/TsUYoGn2_Fg/s1600-h/image%25255B31%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Ua3UDTrgytc/Ub8lSxAv20I/AAAAAAAAOIE/OI2ONj3FrrI/image_thumb%25255B17%25255D.png?imgmax=800" height="167" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So what I think is happening is that because I run&lt;strong&gt;&lt;em&gt; npm install&lt;/em&gt;&lt;/strong&gt; on the karma folder (the one I got from a GitHub clone), there are more modules in there than in the global karma (which I got when I installed karma using &lt;strong&gt;&lt;em&gt;npm install –g karma&lt;/em&gt;&lt;/strong&gt;)&lt;br /&gt;&lt;br /&gt;At the moment there are 49 modules in the GitHub karma:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-28mDTv7SVXQ/Ub8lTuoBekI/AAAAAAAAOIM/8eeRbliwhew/s1600-h/image%25255B39%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-RqYVaYgIitI/Ub8lUsSrPhI/AAAAAAAAOIU/xmqkXSXH3DU/image_thumb%25255B21%25255D.png?imgmax=800" height="396" style="border: 0px; display: inline;" title="image" width="401" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And 20 modules in the global karma install&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ZGmAOXdwQYg/Ub8lWF0PsVI/AAAAAAAAOIc/nSwuLOG3g68/s1600-h/image%25255B35%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/--Qk3ipTs7Pc/Ub8lXMniJCI/AAAAAAAAOIk/rqEfCgnCD50/image_thumb%25255B19%25255D.png?imgmax=800" height="345" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="397" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So let’s try running npm install on this folder&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-1L0omjoPhVI/Ub8lXzGaffI/AAAAAAAAOIs/EaEWLKnBQmY/s1600-h/image%25255B45%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-sFthkJLHou0/Ub8lYvJqJoI/AAAAAAAAOI0/nDJX6KzOvKo/image_thumb%25255B23%25255D.png?imgmax=800" height="174" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-6cZkFSSrISg/Ub8lZrebu7I/AAAAAAAAOI8/-I9lM-y0_MQ/s1600-h/image%25255B42%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-xwmaiQvN-OE/Ub8laoLW0BI/AAAAAAAAOJE/Oee37wc-e0w/image_thumb%25255B22%25255D.png?imgmax=800" height="465" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And now there are 33 modules installed:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-dmT-kK7bi94/Ub8lcMQF2cI/AAAAAAAAOJM/1Rbx-sk-YN0/s1600-h/image%25255B49%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-qUkOEBrfHDU/Ub8ldB2mHMI/AAAAAAAAOJU/GRxoJa6TTE8/image_thumb%25255B25%25255D.png?imgmax=800" height="383" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="367" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;but that still didn’t work :(&lt;br /&gt;&lt;br /&gt;At this stage I remembered reading something about installing the latest version of karma (globally), which is probably what I’m getting from the github clone, and that could explain the different number of modules.&lt;br /&gt;&lt;br /&gt;So I executed &lt;strong&gt;&lt;em&gt;npm install –g &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;karma@canary&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-1QDfSXVYr_s/Ub8ld7S8EKI/AAAAAAAAOJc/7XCb__VPQKU/s1600-h/image%25255B52%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-EvhGXMj74Wc/Ub8legTHIoI/AAAAAAAAOJk/H1O7Qp2HYZI/image_thumb%25255B26%25255D.png?imgmax=800" height="201" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="609" /&gt;&lt;/a&gt; &lt;br /&gt;which installed ok:&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-hYAyB6Quuao/Ub8lfEe43EI/AAAAAAAAOJs/JtTiuWywdTs/s1600-h/image%25255B55%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-i2xZ2YVhsi4/Ub8lf95IZrI/AAAAAAAAOJ0/D33-TqoXN88/image_thumb%25255B27%25255D.png?imgmax=800" height="187" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Now runnig the &lt;b style="font-style: italic;"&gt;scenario B) &lt;/b&gt;case throws a different error:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-mYjlJalc3RI/Ub8lgoduTFI/AAAAAAAAOJ8/fZ5TBB2dbBk/s1600-h/image%25255B58%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-oQhOxVVMNV0/Ub8lhZoO1kI/AAAAAAAAOKE/PE1lIiKWuLc/image_thumb%25255B28%25255D.png?imgmax=800" height="139" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;It looks that we also need install the &lt;strong&gt;&lt;em&gt;karma-ng-scenario&lt;/em&gt;&lt;/strong&gt; module&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-LwklqvPhnMw/Ub8ljIs8UBI/AAAAAAAAOKM/dj8uDDeafcw/s1600-h/image%25255B61%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-cPpgSVopXGE/Ub8lj446T_I/AAAAAAAAOKU/zX4RZVUuFvM/image_thumb%25255B29%25255D.png?imgmax=800" height="115" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And now it works :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-55OmX_u74ng/Ub8lkhtb1GI/AAAAAAAAOKc/fa9DtFGR_2w/s1600-h/image%25255B64%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-ZSgZ6uw4t8Y/Ub8llZutaPI/AAAAAAAAOKk/t7Q5WweUnBA/image_thumb%25255B30%25255D.png?imgmax=800" height="199" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/4_Wy_6BCBCY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/4_Wy_6BCBCY/debugging-weird-case-of-missing-module.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-KzxD5scrAs8/Ub8e9ZIilFI/AAAAAAAAOGc/h3HWRINnewk/s72-c/image_thumb%25255B4%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/debugging-weird-case-of-missing-module.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-5247080871370930904</guid><pubDate>Wed, 19 Jun 2013 17:43:00 +0000</pubDate><atom:updated>2013-06-20T11:26:54.403+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">KarmaJS</category><title>Running KarmaJS’s AngularJS example test/e2e/angular-scenario (on Chrome)</title><description>To learn and get an idea of how &lt;a href="http://karma-runner.github.io/0.8/index.html"&gt;Karma&lt;/a&gt;&amp;nbsp;(the &lt;i&gt;'Spectacular Test Runner for JavaScript'&lt;/i&gt;)&amp;nbsp;works, and how it can be used to create browser automations tests, here are the steps I took to get the &lt;a href="https://github.com/karma-runner/karma/tree/master/test/e2e/angular-scenario"&gt;test/e2e/angular-scenario&lt;/a&gt; example to work.&lt;br /&gt;&lt;br /&gt;It all started with a clone of: &lt;a href="mailto:git@github.com:karma-runner/karma.git"&gt;git@github.com:karma-runner/karma.git&lt;/a&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="mailto:git@github.com:karma-runner/karma.git"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-Su0zh4YfFKQ/Ub8MwggUbUI/AAAAAAAAN-w/wdpY1GnT1Mo/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-SHo0f7RD1xY/Ub8MxfcnnTI/AAAAAAAAN-4/Oo5qhU4wPUs/image_thumb.png?imgmax=800" height="297" style="border: 0px; display: inline;" title="image" width="621" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With this KarmaJS test example (see below), being the one that we are going to use:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-CpJ4aM01XIk/Ub8MyM192yI/AAAAAAAAN_A/gjXbkFMGGuM/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-rqLeRqcigWk/Ub8My9oGZHI/AAAAAAAAN_I/1d-36dO91_o/image_thumb%25255B1%25255D.png?imgmax=800" height="228" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="622" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I then opened an nodejs command prompt and navigated to the folder shown above:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/--sFgDmhkGqc/Ub8Mzv7j1mI/AAAAAAAAN_Q/HJSFWoiZBjI/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-kxn4nIiGz70/Ub8M0nIetBI/AAAAAAAAN_Y/Nh6ZFUI_GiA/image_thumb%25255B2%25255D.png?imgmax=800" height="165" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="587" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... used &lt;strong&gt;&lt;em&gt;node server.js &lt;/em&gt;&lt;/strong&gt;to start a local webserver&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-DzTU1R-VIBo/Ub8M1TxNFmI/AAAAAAAAN_g/Se4kHQ1sHzA/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-DJSPm-qkBFI/Ub8M18Kz5AI/AAAAAAAAN_o/vhIFAJ1WXgo/image_thumb%25255B3%25255D.png?imgmax=800" height="49" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="639" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... on port 8000:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-0hhEE4RZqLE/Ub8M3C_PfkI/AAAAAAAAN_w/H4qlQw3okT8/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-YjdIMTK420k/Ub8M3zGzH4I/AAAAAAAAN_4/m9q_Z0E_Fgg/image_thumb%25255B4%25255D.png?imgmax=800" height="327" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The test case we are using (on KarmaJS's&amp;nbsp;&lt;b&gt;&lt;i&gt;test/e2e/angular-scenario&lt;/i&gt;&lt;/b&gt;) is a simple AngularJS example, which just consumes the angular-min.js file model attribute:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Ox_6hAM76wk/Ub8M5GKWoeI/AAAAAAAAOAA/UJIhBdEqsu4/s1600-h/image%25255B29%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-39CxvijIWyk/Ub8M5yVPR5I/AAAAAAAAOAI/8_Dfgtg8si8/image_thumb%25255B11%25255D.png?imgmax=800" height="241" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="494" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and uses angular to populate the &lt;strong&gt;&lt;em&gt;{{yourName}}&lt;/em&gt;&lt;/strong&gt; value dynamically (wired to the input field via the &lt;b&gt;&lt;i&gt;ng-model="yourName"&lt;/i&gt;&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-BAz-d5U_tTI/Ub8M6t_LKdI/AAAAAAAAOAQ/EsRFbeeY_TU/s1600-h/image%25255B28%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-j0zOUKKL_8I/Ub8M7szvUII/AAAAAAAAOAY/qTU96TSnckM/image_thumb%25255B10%25255D.png?imgmax=800" height="163" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="496" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Next we are going to run this &lt;a href="http://pivotal.github.io/jasmine/"&gt;Jasmine&lt;/a&gt;&amp;nbsp;('&lt;i&gt;Behavior-&lt;b&gt;D&lt;/b&gt;riven &lt;b&gt;D&lt;/b&gt;evelopment framework for testing JavaScript code'&lt;/i&gt;) test using KarmaJS&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-XYKofQfHiw0/Ub8M8re3XBI/AAAAAAAAOAg/jZeMTmiqFdk/s1600-h/image%25255B35%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-EWL7K_bgekk/Ub8M9xwDUBI/AAAAAAAAOAo/dh5_8GfpvU0/image_thumb%25255B13%25255D.png?imgmax=800" height="321" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which &lt;u&gt;should&lt;/u&gt; work with just: &lt;strong&gt;karma start karma.conf.js&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-NXG2elPLdYQ/Ub8M-qumTXI/AAAAAAAAOAw/eS9ba0TN6Hs/s1600-h/image%25255B32%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-NB7qq7EX5FA/Ub8M_V_EUqI/AAAAAAAAOA0/vCM-RlXwlyg/image_thumb%25255B12%25255D.png?imgmax=800" height="148" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... but it didn't&lt;br /&gt;&lt;br /&gt;There is a module dependency missing, which in this case can be resolved by running this command from the root of the karma repository:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-l0rpvw2OZuM/Ub8NAufq0NI/AAAAAAAAOBA/c1F1ltaZcLs/s1600-h/image%25255B38%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-m3R5SoViYbo/Ub8NBus94iI/AAAAAAAAOBI/DAAtdYk6LOw/image_thumb%25255B14%25255D.png?imgmax=800" height="199" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;i&gt;UPDATE: the issue above was caused by the fact that I had an the official released version of karma installed globally which is the one that was running when I tried it on the 'test/e2e/angular-scenario' folder'&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;And now (based on an option from the karma.conf.js) a Chrome window opened up:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-yUvFhlpBFtk/Ub8NC1XyQhI/AAAAAAAAOBQ/0MrOqpoKo_Q/s1600-h/image%25255B47%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Urgj--pEFY8/Ub8NDl4oGZI/AAAAAAAAOBY/OGo6HT73y7U/image_thumb%25255B17%25255D.png?imgmax=800" height="314" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Clicking on the &lt;strong&gt;&lt;em&gt;Debug&lt;/em&gt;&lt;/strong&gt; button:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-OgRKksx-X_U/Ub8NEWxM2zI/AAAAAAAAOBg/ga_XmdUtmFc/s1600-h/image%25255B50%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-foN0xBenqw8/Ub8NFElHYDI/AAAAAAAAOBo/scKVXX__0q0/image_thumb%25255B18%25255D.png?imgmax=800" height="112" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… we can more details on the test that failed:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-qRulQPjwhjQ/Ub8NGJjzE7I/AAAAAAAAOBw/Himm3X0Zq4w/s1600-h/image%25255B53%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-xWvEuw2NCvE/Ub8NGysoPJI/AAAAAAAAOB4/dORUZO7i2FQ/image_thumb%25255B19%25255D.png?imgmax=800" height="257" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In this case the problem is that the ‘proxy mapping’ that karma does is not correct&lt;br /&gt;&lt;br /&gt;If we look at the karma.config.js file&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-PU_L5SrCqSs/Ub8NH5UF3QI/AAAAAAAAOCA/AdZ81gW_Vgo/s1600-h/image%25255B56%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-C8HnXOzzyKI/Ub8NKA3qZEI/AAAAAAAAOCE/7T9fJBNhSN4/image_thumb%25255B20%25255D.png?imgmax=800" height="385" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;.... and the unit test &lt;strong&gt;&lt;em&gt;brower().navigateTo&lt;/em&gt;&lt;/strong&gt; command&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-G2EZ8QC2CoI/Ub8NK45_WDI/AAAAAAAAOCQ/xDlefWvR7-U/s1600-h/image%25255B59%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8UKh2BY6rpE/Ub8NMBuISjI/AAAAAAAAOCY/pIriVqexWQ0/image_thumb%25255B21%25255D.png?imgmax=800" height="183" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... we can see that karma will try to open &lt;strong&gt;&lt;em&gt;/index.html&lt;/em&gt;&lt;/strong&gt; from &lt;em&gt;&lt;strong&gt;http://localhost:8000/test/e2e/angular-scenario/index.html&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;That is not going to work since the page we want it is on &lt;a href="http://localhost:8000/index.html"&gt;http://localhost:8000/index.html&lt;/a&gt; (which happened because we started &lt;strong&gt;&lt;em&gt;node server.js &lt;/em&gt;&lt;/strong&gt;on the&lt;strong&gt; …/test/e2e/angular-scenario &lt;/strong&gt;folder)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-5EyFv12Jiuk/Ub8NNRQHogI/AAAAAAAAOCg/xfgBZsXJCWw/s1600-h/image%25255B62%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-jzBAp6uljrY/Ub8NOBdtPrI/AAAAAAAAOCo/6IbFY6Bjm4o/image_thumb%25255B22%25255D.png?imgmax=800" height="144" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;One way to solved this, is to change the ‘proxies’ mapping to &lt;strong&gt;&lt;em&gt;‘/’ : ‘http://localhost:8000/’&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-82nTLnUjM9k/Ub8NO7ZQ5eI/AAAAAAAAOCw/QqEpcTCbbgA/s1600-h/image%25255B65%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-ZN4m7eoiOI4/Ub8NPmEc8bI/AAAAAAAAOC4/ZtT5TTinNZc/image_thumb%25255B23%25255D.png?imgmax=800" height="302" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and after stopping and starting the karma server:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-ZC62qBcvW24/Ub8NQRX993I/AAAAAAAAODA/M1J_9bEH7CM/s1600-h/image%25255B68%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-PVZaZq2ul4o/Ub8NRK3O08I/AAAAAAAAODI/Mssu4Plgfyk/image_thumb%25255B24%25255D.png?imgmax=800" height="131" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;all tests pass :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-8-fsEC2rI6M/Ub8NR3qXnqI/AAAAAAAAODQ/yimGbonZqnk/s1600-h/image%25255B71%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-E7qJdljbg2U/Ub8NSkrSfHI/AAAAAAAAODY/SqcTV71H9TE/image_thumb%25255B25%25255D.png?imgmax=800" height="142" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Changing and executing tests in real time&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;What is really cool with this set-up is that (as long as the karma process is running), because the &lt;strong&gt;autoWatch&lt;/strong&gt; value (in k&lt;i&gt;&lt;b&gt;arma.config.j&lt;/b&gt;&lt;/i&gt;s) was set to true, if I make a change to the test file:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-FXo-OsOejKk/Ub8NUKfMyPI/AAAAAAAAODg/5hHFD8UcU0w/s1600-h/image%25255B74%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-i5PRh6QP6Z8/Ub8NVB2MmPI/AAAAAAAAODo/CWPyeWkVoms/image_thumb%25255B26%25255D.png?imgmax=800" height="324" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… the karma runner will detect the changes and rerun the tests (note that there are 2 tests executed now)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-MJOGXw9-0Zw/Ub8NWPXgYGI/AAAAAAAAODw/z0WZYZ9djRk/s1600-h/image%25255B77%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-PTr_naR7k6I/Ub8NXEGm45I/AAAAAAAAOD4/hqXwuxVmTk0/image_thumb%25255B27%25255D.png?imgmax=800" height="74" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This 2nd test shows an interesting behaviors since it will make the test wait for 15 seconds (with the browser window opened):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-xG6KcdbXRbQ/Ub8NYLxBbkI/AAAAAAAAOEA/zeNx7EkMnpg/s1600-h/image%25255B80%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-IYT25H8DZBI/Ub8NZs7WoAI/AAAAAAAAOEI/fi33bm3oz5k/image_thumb%25255B28%25255D.png?imgmax=800" height="435" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Note how the time execution time for the 2nd test was ~15 secs&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-F4B1f47KAAE/Ub8NbircN3I/AAAAAAAAOEQ/IIl9uEton6U/s1600-h/image%25255B83%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-T0gNFDqu_nk/Ub8NcdG70BI/AAAAAAAAOEY/Xnn1vpeSPn8/image_thumb%25255B29%25255D.png?imgmax=800" height="344" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And if we modify the 2nd test to:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-gkDEc4WGDes/Ub8NdrPhFtI/AAAAAAAAOEg/PFtlSMVfgSI/s1600-h/image%25255B89%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-zwfxYB7hZpI/Ub8NeZ5gjDI/AAAAAAAAOEo/sr5rDDugfQU/image_thumb%25255B31%25255D.png?imgmax=800" height="143" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... the execution test UI will look like this (note that the execution was triggered when I saved the test file :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-x4k0MDozSsM/Ub8NfUa7O4I/AAAAAAAAOEw/HuXUH2ZSw68/s1600-h/image%25255B86%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-kJJEZCwv53M/Ub8NgjxZBEI/AAAAAAAAOE4/1iZmdtqBQLo/image_thumb%25255B30%25255D.png?imgmax=800" height="370" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;NOTE 1: &lt;/strong&gt;to solve the ENOENT error shown the first screenshot of localhost:8000, we just needed to a favicon.ico file to the &lt;strong&gt;lib/nodeserver &lt;/strong&gt;folder&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-uVb20k9Os0g/Ub8NhXGHylI/AAAAAAAAOFA/CNolCGRIws0/s1600-h/image%25255B20%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-7mvvDW2XPDs/Ub8NiPt_UOI/AAAAAAAAOFI/2y8kZwpBguA/image_thumb%25255B6%25255D.png?imgmax=800" height="207" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="632" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and now the error doesn’t happen anymore&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-E_LS0fXHFAk/Ub8NjF5cXTI/AAAAAAAAOFU/1K08_x-gmYc/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-5SOgm5gfP_E/Ub8NkBv_l6I/AAAAAAAAOFc/vENtd0A1eh4/image_thumb%25255B5%25255D.png?imgmax=800" height="325" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Note 2: &lt;/strong&gt;when trying to run Karma for the first time, I had a prob with grunt where it was failing with an &lt;strong&gt;&lt;em&gt;Error: spawn ENOENT&lt;/em&gt;&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-u5XxRHPIw_k/Ub8Nk2hG9CI/AAAAAAAAOFk/XNqHwo61gNM/s1600-h/image%25255B95%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-R9eF7wIaFy8/Ub8Nl7hfMPI/AAAAAAAAOFs/Huo8DCdAaHY/image_thumb%25255B33%25255D.png?imgmax=800" height="226" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... this was resolved by installed the 32bit version of nodeJS and running &lt;strong&gt;&lt;em&gt;npm install&lt;/em&gt;&lt;/strong&gt; on the karma folder (after cloning it)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-54uYSEboBII/Ub8Nmnsv3gI/AAAAAAAAOF0/xNXP8s-JjB4/s1600-h/image%25255B92%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-iJ5xL_lDZ14/Ub8NoPGitSI/AAAAAAAAOF8/QwIXzMaWEUA/image_thumb%25255B32%25255D.png?imgmax=800" height="452" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/2HcwBBXMaLg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/2HcwBBXMaLg/running-karmas-angularjs-example.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-SHo0f7RD1xY/Ub8MxfcnnTI/AAAAAAAAN-4/Oo5qhU4wPUs/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/running-karmas-angularjs-example.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-5401948525943606542</guid><pubDate>Sun, 16 Jun 2013 16:08:00 +0000</pubDate><atom:updated>2013-06-19T18:44:19.618+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><title>Trying to running HuBot (and being stuck on ‘ERROR XMPP authentication failure’)</title><description>Sitting on a Starbucks in a Saturday morning (after dropping the kids on &lt;a href="http://www.pssa.co.uk/"&gt;PSSA&lt;/a&gt;) it felt like a good time to try &lt;a href="http://hubot.github.com/"&gt;HuBot&lt;/a&gt; (&lt;a href="https://github.com/github/hubot"&gt;repo is here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Since I already had NodeJS installed on my test VM, I stated with the &lt;a href="https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows" title="https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows"&gt;Deploying Hubot onto Windows&lt;/a&gt; instructions:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-BJ70THzYjY4/UbWhvft1_dI/AAAAAAAANAc/bSKNyK3NjY8/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8zr6mqGSWGU/UbWhwNu-aZI/AAAAAAAANAk/DATuFLo16eM/image_thumb%25255B2%25255D.png?imgmax=800" height="513" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Running the installer, downloads a bunch of missing modules:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-kALw2xyD3sU/UbWhwodkb7I/AAAAAAAANAo/ZsEberxPnS4/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-fK6eL82bDVI/UbWhxdiRk-I/AAAAAAAANA0/FzqahLWxLHo/image_thumb%25255B3%25255D.png?imgmax=800" height="219" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Which worked but, but when I started Hubot for the first time I had this error&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-EiO-mGTBE_k/UbWhx_sJpMI/AAAAAAAANA8/CFoVgXPkyA4/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-UXwcUWUDW4E/UbWhyiAG6zI/AAAAAAAANBA/NQ_pOJiA16o/image_thumb%25255B4%25255D.png?imgmax=800" height="259" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I turned out to be because HuBot defaults to port 8080&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-LIwxlfidowg/UbWhzA49FyI/AAAAAAAANBI/6oNNPgQXDqA/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-oD_qUm7UKZs/UbWhz53sJ5I/AAAAAAAANBU/HcIr5z6H378/image_thumb%25255B5%25255D.png?imgmax=800" height="243" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… which I already had a server running there.&lt;br /&gt;&lt;br /&gt;So after stopping that service, HuBot started with no errors&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-lFIkBJlXMCA/UbWh0X-46DI/AAAAAAAANBc/vIP2d8IBysY/s1600-h/image%25255B29%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-ud_yRo2wU3A/UbWh1OtjP9I/AAAAAAAANBk/x1HWj9AaPU0/image_thumb%25255B9%25255D.png?imgmax=800" height="66" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="637" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Since this is the first time I’m running HuBot I don’t really know what to do :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-mi31sayn91k/UbWh1smA9oI/AAAAAAAANBs/lIsGLjCpxDw/s1600-h/image%25255B32%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-IVw22BHb7tg/UbWh2DOGDuI/AAAAAAAANBw/O0nCBtXC6yc/image_thumb%25255B10%25255D.png?imgmax=800" height="86" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="637" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And the browser didn’t help too:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-cePk76eZYEM/UbWh2jq8cSI/AAAAAAAANB8/GBzmwoGP7ek/s1600-h/image%25255B38%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-bxdYxj6M9WA/UbWh3IGPs8I/AAAAAAAANCE/d8P1OS_GtFA/image_thumb%25255B12%25255D.png?imgmax=800" height="86" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="637" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-FJ1KB3BvFu8/UbWh35wmZuI/AAAAAAAANCM/YzVFACqlP0Y/s1600-h/image%25255B41%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-WJEHq1WreE0/UbWh4eSYXbI/AAAAAAAANCU/PtohFoZOy0Q/image_thumb%25255B13%25255D.png?imgmax=800" height="86" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="637" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Weirdly the main HuBot website didn’t had a ‘start here’ article, so I started digging through the documentation and found:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-589FBBtc6fw/UbWh44_NYII/AAAAAAAANCc/IDdtAr6zsdk/s1600-h/image%25255B44%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/--CqtlUk5rDY/UbWh5XUn3kI/AAAAAAAANCk/bTZx8nApdf8/image_thumb%25255B14%25255D.png?imgmax=800" height="347" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which implied that /hubot/version was a valid url, which it was :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-WjZ_Hpd8sNg/UbWh5-Cl-9I/AAAAAAAANCs/5zTbGLEcdkM/s1600-h/image%25255B47%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-5FJ3zpu0lXU/UbWh6ndBjxI/AAAAAAAANC0/zv2mXGUtpiI/image_thumb%25255B15%25255D.png?imgmax=800" height="73" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So we know the HuBot is alive :)&lt;br /&gt;&lt;br /&gt;I googled a bit and found &lt;a href="http://server.dzone.com/articles/installing-and-running-hubot"&gt;http://server.dzone.com/articles/installing-and-running-hubot&lt;/a&gt; which looked like a good place to start:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-87-XeKlbyhk/UbWh7Fz106I/AAAAAAAANC8/AGAlT-bEOVQ/s1600-h/image%25255B50%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Pj-ULnjg3GU/UbWh7uo-AjI/AAAAAAAANDE/hNm8Nrywhow/image_thumb%25255B16%25255D.png?imgmax=800" height="581" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I skipped the installation bit (since we already have HuBot installed) and started here&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-J3R31o-O2yw/UbWh8erZ8FI/AAAAAAAANDI/wxA6q7E4yYg/s1600-h/image%25255B53%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-VpUrIxGDIS8/UbWh8-eWhSI/AAAAAAAANDU/y_Fop5Zd0as/image_thumb%25255B17%25255D.png?imgmax=800" height="190" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...which indicates that we should use the ‘hubot’ prefix to talk with Hubot&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ym3bEX4fbC8/UbWh9ezaYFI/AAAAAAAANDY/KyZiOT3HqfY/s1600-h/image%25255B59%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-tAHmH8OhKwc/UbWh9x6BsDI/AAAAAAAANDk/yrnHPS2jzZo/image_thumb%25255B19%25255D.png?imgmax=800" height="56" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="547" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Good, HuBot is also alive from there :)&lt;br /&gt;&lt;br /&gt;Next step was to install OpenFire and Spark, &lt;a href="http://blog.diniscruz.com/2013/06/installing-ignites-openfire-and-spark.html"&gt;which you can read how I did it here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It this stage I tried to run the &lt;strong&gt;&lt;em&gt;./bin/hubot&lt;/em&gt;&lt;/strong&gt; script, but I was missing &lt;a href="http://coffeescript.org/"&gt;CoffeeScript&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-9pABhGPY9zw/UbWh-RPSQCI/AAAAAAAANDs/OzwJNaoGxqo/s1600-h/image%25255B175%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-YkMzjIQmVco/UbWh-xvIg7I/AAAAAAAAND0/vo5d3TXCIuY/image_thumb%25255B61%25255D.png?imgmax=800" height="249" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="571" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;After installing &lt;strong&gt;&lt;em&gt;coffee-script&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-amWKHO7gN24/UbWh_VK0maI/AAAAAAAAND8/K_rNiceQBVY/s1600-h/image%25255B172%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-3wHW7d3JxdY/UbWh_xDo4pI/AAAAAAAANEE/IOHPIruUIC4/image_thumb%25255B60%25255D.png?imgmax=800" height="113" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… I was able to execute &lt;strong&gt;.bin/hubot&lt;/strong&gt;&amp;nbsp;ok:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/--7PdTkxzjJs/UbWiAqIVYrI/AAAAAAAANEM/dY6oGbbBi6k/s1600-h/image%25255B178%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-9zF3D0ew_ZY/UbWiBFj99SI/AAAAAAAANEU/4lnXdlhehuw/image_thumb%25255B62%25255D.png?imgmax=800" height="40" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="495" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and execute the next instruction from &lt;a href="https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows" title="https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows"&gt;Deploying Hubot onto Windows&lt;/a&gt; which is &lt;strong&gt;&lt;em&gt;hubot –c ./my-bot&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-roCl8SZP23U/UbWiBsmO4XI/AAAAAAAANEc/v1TQ9RlvmMk/s1600-h/image%25255B181%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-LkgSl8T896s/UbWiCHluZ4I/AAAAAAAANEg/mKwR4Ma66C0/image_thumb%25255B63%25255D.png?imgmax=800" height="242" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This created a folder called &lt;strong&gt;my-bot &lt;/strong&gt;in the &lt;strong&gt;.bin&lt;/strong&gt; folder &lt;u&gt;&lt;i&gt;(UPDATE: this should had been done of the folder above (i.e. not inside the .bin folder)&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-EnmK2M3WxQo/UbWiCocDDyI/AAAAAAAANEo/fHXLm3WMjTM/s1600-h/image%25255B191%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-yL_NWerEOgY/UbWiDLQpOsI/AAAAAAAANE0/bWLXQlrjJ3E/image_thumb%25255B69%25255D.png?imgmax=800" height="130" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="472" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... containing what looks like the contents of a Git repo:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-o3lZ4m8pHmM/UbWiD9vrlKI/AAAAAAAANE8/KNUyt6Hldls/s1600-h/image%25255B192%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-PxOwfWSS9TA/UbWiETR4QjI/AAAAAAAANFE/CGyOqKmGTCs/image_thumb%25255B70%25255D.png?imgmax=800" height="204" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="471" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The next steps from&amp;nbsp;&lt;a href="https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows" title="https://github.com/github/hubot/wiki/Deploying-Hubot-onto-Windows"&gt;Deploying Hubot onto Windows&lt;/a&gt;&amp;nbsp; are to:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-h2Qga_6dOD0/UbWiFP9RDlI/AAAAAAAANFM/zLArL--qoPc/s1600-h/image%25255B198%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-WRaRfKLbj-s/UbWiFmbA-2I/AAAAAAAANFU/37r3yxKwXdE/image_thumb%25255B72%25255D.png?imgmax=800" height="471" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;After making the config changes I executed &lt;strong&gt;&lt;em&gt;npm install&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-hJRoIY1wToQ/UbWiGSySteI/AAAAAAAANFc/egzaljApZuU/s1600-h/image%25255B201%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-Fh77NnVftTw/UbWiGzTLPiI/AAAAAAAANFk/F48UAMcxjCE/image_thumb%25255B73%25255D.png?imgmax=800" height="197" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which failed because of this error:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-hT7LizJI2cw/UbWiHv5u8UI/AAAAAAAANFs/Q8bOurgn2w4/s1600-h/image%25255B204%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-toYvb0tuYD8/UbWiIBt2U7I/AAAAAAAANFw/Y0xaCUozTxU/image_thumb%25255B74%25255D.png?imgmax=800" height="156" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... caused by the lack of python:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-5a9EmtJTFM4/UbWiIhJqMaI/AAAAAAAANF8/1gldu4pX-Ww/s1600-h/image%25255B210%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-xqqNmIcRmU4/UbWiJLSx4PI/AAAAAAAANGA/hh8FuDiqUR4/image_thumb%25255B76%25255D.png?imgmax=800" height="46" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is the script I used to install python 3.3.2:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-3l1RbLh_pvA/UbWiJjpJzZI/AAAAAAAANGM/XbEhBGcmPA8/s1600-h/image%25255B213%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-11OraBLh_cM/UbWiKTkoRjI/AAAAAAAANGU/TtOF_DxQS7A/image_thumb%25255B77%25255D.png?imgmax=800" height="279" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is the python shell being automatically picked up from the command line (which was not the default option in python install (you will need to manually check the box to add Python to system path)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-bWr990n5Jww/UbWiK0_AXPI/AAAAAAAANGc/e3-N-m7DPWU/s1600-h/image%25255B219%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-SFXrGU9mTZE/UbWiLfZLz-I/AAAAAAAANGk/iYYTn7bWxNM/image_thumb%25255B79%25255D.png?imgmax=800" height="83" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="540" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;But running &lt;strong&gt;&lt;em&gt;npm install &lt;/em&gt;&lt;/strong&gt;still fails because it doesn’t like the python 3.3.2&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-7eRwc1tjx4A/UbWiL5LB5DI/AAAAAAAANGs/lnQgfdEsusc/s1600-h/image%25255B222%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-E-9IFFtgZsk/UbWiMaE4NbI/AAAAAAAANGw/mT6x0yfcOMc/image_thumb%25255B80%25255D.png?imgmax=800" height="153" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So I installed Python 2.7 with this script:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ptvJKIgPISY/UbWiM0wMI8I/AAAAAAAANG4/C0CkyOPpbmA/s1600-h/image%25255B227%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-xaLFgu0s_4k/UbWiNrWzQSI/AAAAAAAANHE/RMzh9BVIOms/image_thumb%25255B83%25255D.png?imgmax=800" height="247" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="507" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;After the install I set the PYTHON environment variable to:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-qcG6edq3X2g/UbWiN2-40-I/AAAAAAAANHM/JIxu5FwPFh4/s1600-h/image%25255B230%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-WvyravpwEfM/UbWiORVNY9I/AAAAAAAANHU/VwIOzT5BrsU/image_thumb%25255B84%25255D.png?imgmax=800" height="24" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And now the &lt;strong&gt;&lt;em&gt;npm install&lt;/em&gt;&lt;/strong&gt; worked with just a couple warnings (note: I had to clear the node-gyp compilation cache before):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-tcMRbAgfGB0/UbWiPGvHpeI/AAAAAAAANHc/9jLFja3O7UE/s1600-h/image%25255B233%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-vLs0o7u-VCw/UbWiPjbL05I/AAAAAAAANHk/x2B54DJTRkk/image_thumb%25255B85%25255D.png?imgmax=800" height="440" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Trying to run HuBot (the custom my-bot one) gives this error:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ZN_apnSb7iE/UbWiQKpDB9I/AAAAAAAANHo/JM_i4IY8dCo/s1600-h/image%25255B239%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8SefZz3owYE/UbWiQocsvTI/AAAAAAAANHw/Y4XZxmFd9MU/image_thumb%25255B87%25255D.png?imgmax=800" height="112" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-_UKc7wVJnqQ/UbWiRBpF2hI/AAAAAAAANH4/_zActE5nADk/s1600-h/image%25255B236%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-xl4F4BvWZZU/UbWiRQ3QR1I/AAAAAAAANIE/Yay7-gHKnh8/image_thumb%25255B86%25255D.png?imgmax=800" height="78" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;.... which says that we need to install the &lt;strong&gt;&lt;em&gt;node-stringprep&lt;/em&gt;&lt;/strong&gt; module, which fails to install with this error:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-cLJe3MNmR9Q/UbWiRwf2YgI/AAAAAAAANII/qxjRk_JqWNs/s1600-h/image%25255B248%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-DP_wXFsx1Hk/UbWiSiDeQqI/AAAAAAAANIQ/mQXvQyi0zwI/image_thumb%25255B90%25255D.png?imgmax=800" height="267" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The error above has nothing to do with &lt;em&gt;&lt;strong&gt;node-stringprep&lt;/strong&gt; &lt;/em&gt;, and related to the lack of this environment variable:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-8rQw5JR7Cgg/UbWiTI88CLI/AAAAAAAANIc/00HJlgjRQQw/s1600-h/image%25255B251%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-pxIeJj04q4k/UbWiTo3EraI/AAAAAAAANIk/l8zfqNeEr_o/image_thumb%25255B91%25255D.png?imgmax=800" height="282" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;We’re getting close, now it starts the connection but we get an authentication failure&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Xruv7Scauj4/UbWiUD2pluI/AAAAAAAANIs/f27GhL75Q1A/s1600-h/image%25255B254%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-QzNtVJ8cO4M/UbWiUhG67sI/AAAAAAAANI0/wYBVPHLGl0c/image_thumb%25255B92%25255D.png?imgmax=800" height="112" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;which I think is caused by the current environment HUBOT environment variables that I have setup&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-e-10LQEuxTQ/UbWiVH3k2fI/AAAAAAAANI8/bsJyJjlbNbg/s1600-h/image%25255B257%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-ybjDWjTjzyY/UbWiWHRCdnI/AAAAAAAANJE/q38Ub9o9WyU/image_thumb%25255B93%25255D.png?imgmax=800" height="108" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="480" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Lets change the authentication values to the credential used to connect to OpenFire directly using Jabber-net (see &lt;a href="http://blog.diniscruz.com/2013/06/using-jabber-net-to-talk-to-openfire.html"&gt;Using Jabber-net to talk to OpenFire&lt;/a&gt;&amp;nbsp;post) :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-k0HPFTrrFGw/UbWiWt99g1I/AAAAAAAANJM/SpaByDjoKzM/s1600-h/image%25255B263%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-aehEAqVeq6Q/UbWiXFpjh6I/AAAAAAAANJU/f1z3lKaizLE/image_thumb%25255B95%25255D.png?imgmax=800" height="418" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And just to make sure, I added those values directly to the &lt;strong&gt;&lt;em&gt;xmpp.coffee&lt;/em&gt;&lt;/strong&gt; file&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-OesdH_DCBWY/UbWiX16DeGI/AAAAAAAANJc/JJ76DDjFezk/s1600-h/image%25255B266%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-kYxGbnVZj-c/UbWiYRtIJGI/AAAAAAAANJg/0WB8dDqm5bk/image_thumb%25255B96%25255D.png?imgmax=800" height="402" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;But the Authentication failure still happens:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-WRNGaTUUdzM/UbWiZNRC48I/AAAAAAAANJs/DWmlzppRD-0/s1600-h/image%25255B269%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-7AIAin77L-U/UbWiZiZ59-I/AAAAAAAANJ0/8X-of78HFl8/image_thumb%25255B97%25255D.png?imgmax=800" height="125" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Looking at the logs&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-PU6Z4jSmhZg/UbWiaLGEK0I/AAAAAAAANJ4/725XvK0gQyE/s1600-h/image%25255B281%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-poPRolfLHaM/UbWiah7oBtI/AAAAAAAANJ8/dPK78dKJBCI/image_thumb%25255B101%25255D.png?imgmax=800" height="236" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="625" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;in info.log&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-ln8BSq1rzxE/UbWibE2NbMI/AAAAAAAANKE/iX5QillkFUU/s1600-h/image%25255B278%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Lfq9P5P-SfE/UbWib_gNLQI/AAAAAAAANKQ/s4FqfSmnbhw/image_thumb%25255B100%25255D.png?imgmax=800" height="33" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;in jive.audit*.log (&lt;/strong&gt;which looks like an xml)&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-_nKhMJkavY8/UbWicUcZAiI/AAAAAAAANKc/nR00AsZi5BE/s1600-h/image%25255B284%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-WemgiudnRio/UbWidF44g7I/AAAAAAAANKk/1ZulvaCKJA4/image_thumb%25255B102%25255D.png?imgmax=800" height="344" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So to see it I quickly wrote this script:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-A1DQ6DG_DP4/UbWidvBGXOI/AAAAAAAANKs/IzcYpPY7-Ik/s1600-h/image%25255B287%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-pAlXoSSVU0o/UbWieVEGV5I/AAAAAAAANK0/Sa5LNTL89GM/image_thumb%25255B103%25255D.png?imgmax=800" height="146" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...which showed this formated view of the xml content:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-u-wCNECHTyY/UbWiexOZIyI/AAAAAAAANK8/5Ss-IuVYx6E/s1600-h/image%25255B290%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-2okAJO5K7Js/UbWifo1XLgI/AAAAAAAANLE/oNhx6rldOsg/image_thumb%25255B104%25255D.png?imgmax=800" height="384" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which unfortunately didn't help, because there were no any references to the &lt;strong&gt;&lt;em&gt;o2-user&lt;/em&gt;&lt;/strong&gt; account&lt;br /&gt;&lt;br /&gt;Note: if I remove the &lt;b&gt;&lt;i&gt;preferredSaaslMechanism&lt;/i&gt;&lt;/b&gt; value, I get no errors or log messages:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Ag0Wx8qy5vA/UbWigTf3LmI/AAAAAAAANLM/DS3DZpL_wfI/s1600-h/image%25255B275%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-LHZoAh0Dg50/UbWig2Jd6uI/AAAAAAAANLU/Pp6Mhy5uy28/image_thumb%25255B99%25255D.png?imgmax=800" height="109" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;STOPPING FOR NOW&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;At this stage I can’t spend more time on this, so I’m going to blog as it is and ask for help to the the HuBot community&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/h8YSA2_XL0g" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/h8YSA2_XL0g/trying-to-running-hubot-and-being-stuck.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-8zr6mqGSWGU/UbWhwNu-aZI/AAAAAAAANAk/DATuFLo16eM/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/trying-to-running-hubot-and-being-stuck.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-2995738158050531007</guid><pubDate>Sun, 16 Jun 2013 16:02:00 +0000</pubDate><atom:updated>2013-06-16T17:02:01.208+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">O2 Platform</category><category domain="http://www.blogger.com/atom/ns#">Tools</category><title>Using Jabber-net to talk to OpenFire</title><description>After&amp;nbsp;&lt;a href="http://blog.diniscruz.com/2013/06/installing-ignites-openfire-and-spark.html"&gt;Installing Ignite’s OpenFire and Spark (IM server and client)&lt;/a&gt;,&amp;nbsp; using&amp;nbsp;&lt;a href="https://code.google.com/p/jabber-net/"&gt;Jabber-Net&lt;/a&gt;,&amp;nbsp;I wrote a O2 Platform C# script to access OpenFire,&amp;nbsp;which will:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Connect to a local OpenFire server&lt;/li&gt;&lt;li&gt;Login as a user&lt;/li&gt;&lt;li&gt;Find the HuBot room&lt;/li&gt;&lt;li&gt;Join that room&lt;/li&gt;&lt;li&gt;Post public messages to it&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;(see end of post for the source code)&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-JB7iu0TjwQo/UbP-vXewg1I/AAAAAAAAM-E/GoIoEZoiTpY/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-qV2ViWf5fq0/UbP-vyGQqtI/AAAAAAAAM-M/kVMNg5X3xVM/image_thumb%25255B1%25255D.png?imgmax=800" height="284" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The script can be compiled as a stand-alone exe:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-slGiaZKhTGo/UbP-wdXdn8I/AAAAAAAAM-U/ArPUQKocC6M/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-BR_GMkaOGpM/UbP-w8_8UMI/AAAAAAAAM-c/ohZs_KuJVmE/image_thumb%25255B2%25255D.png?imgmax=800" height="266" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;....which when executed will show a list of current messages&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-q9cMkDH__Ho/UbP-xisrZ2I/AAAAAAAAM-k/6yWmSyjeUwg/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-DQb6m3VYZUk/UbP-yBaRWXI/AAAAAAAAM-s/iimEP0zprLM/image_thumb%25255B4%25255D.png?imgmax=800" height="327" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="621" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... from the HuBot chat room:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-IyLxhPrgL3o/UbP-yriQJMI/AAAAAAAAM-0/p8CB3trQujk/s1600-h/image%25255B18%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-9sA9bo4Vr9E/UbP-zJHOKgI/AAAAAAAAM-8/wWyMd2Jblvk/image_thumb%25255B6%25255D.png?imgmax=800" height="308" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="414" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;To see the interaction between both tools, we can write a message on the Spark client (on the bottom-left):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-DKiTvSEP2gs/UbP-znmNOhI/AAAAAAAAM_E/linOEJGlr4Q/s1600-h/image%25255B21%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-SbBYu41D74w/UbP-0JZWy4I/AAAAAAAAM_M/GK5Tlz_Lbgs/image_thumb%25255B7%25255D.png?imgmax=800" height="298" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which shows in the &lt;strong&gt;&lt;em&gt;Jabber Test&lt;/em&gt;&lt;/strong&gt; tool&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-h1kGdLoJNek/UbP-04dXVeI/AAAAAAAAM_U/F8DRW1zabMU/s1600-h/image%25255B24%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-6rKlnrPHDUQ/UbP-1l1bcUI/AAAAAAAAM_c/bl6enk7WLsc/image_thumb%25255B8%25255D.png?imgmax=800" height="298" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and a message from the &lt;strong&gt;&lt;em&gt;Jabber Test&lt;/em&gt;&lt;/strong&gt; tool (on the top-right)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-lH0ww5C2ja0/UbP-2H2embI/AAAAAAAAM_k/cAsNFm0SGsU/s1600-h/image%25255B27%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-0bozXFfFVkA/UbP-25ShvII/AAAAAAAAM_s/m-SFiIu7fiQ/image_thumb%25255B9%25255D.png?imgmax=800" height="298" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... will show in Spark&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-p8XvTp0NnHA/UbP-3aqQS6I/AAAAAAAAM_0/MXDfW6jwLcs/s1600-h/image%25255B30%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-CKy1PubtmrA/UbP-4NMQ8CI/AAAAAAAAM_8/8zALIb3XPNE/image_thumb%25255B10%25255D.png?imgmax=800" height="298" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Troubleshoot:&lt;/b&gt; If you try this script and get a pink treeview, it means the connection or login failed:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-max2WKGoRFk/UbP-4Q3Sr0I/AAAAAAAANAE/b28AQSUsL4w/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-1zm8nCLLUcE/UbP-5GsUA4I/AAAAAAAANAM/oa3PB0KswH0/image_thumb%25255B3%25255D.png?imgmax=800" height="435" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="613" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Source Code used to create the &lt;em&gt;Jabber Test&lt;/em&gt; tool&lt;/strong&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: green;"&gt;//var credentialsFile = @"..\_UserData\TestAccounts.xml".inTempDir();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//var account = credentialsFile.credential("OpenFileClient");&lt;/span&gt;&lt;br /&gt;var userName = &lt;span style="color: #006080;"&gt;"o2_user"&lt;/span&gt;; &lt;br /&gt;var password = &lt;span style="color: #006080;"&gt;"aaaaa"&lt;/span&gt;; &lt;br /&gt;&lt;br /&gt;var firstMessage     = &lt;span style="color: #006080;"&gt;"Hello room"&lt;/span&gt;;&lt;br /&gt;var serverName      = &lt;span style="color: #006080;"&gt;"win-fgnq5aarj8o"&lt;/span&gt;;&lt;br /&gt;var roomName         = &lt;span style="color: #006080;"&gt;"hubot"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;var jabberClient = &lt;span style="color: blue;"&gt;new&lt;/span&gt; JabberClient()&lt;br /&gt;    {&lt;br /&gt;        Server = &lt;span style="color: #006080;"&gt;"localhost"&lt;/span&gt;,&lt;br /&gt;        Port = 5222,&lt;br /&gt;        User = userName,&lt;br /&gt;        Password = password,&lt;br /&gt;        AutoStartTLS = &lt;span style="color: blue;"&gt;false&lt;/span&gt;&lt;br /&gt;    };&lt;br /&gt;    &lt;br /&gt;var conferenceManager = &lt;span style="color: blue;"&gt;new&lt;/span&gt; ConferenceManager&lt;br /&gt;        {&lt;br /&gt;            Stream = jabberClient&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;var jid     = &lt;span style="color: blue;"&gt;new&lt;/span&gt; JID(roomName, &lt;span style="color: #006080;"&gt;"conference."&lt;/span&gt;+serverName,userName);&lt;br /&gt;var room     = conferenceManager.GetRoom(jid);               &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//var topPanel = panel.add_Panel(true);&lt;/span&gt;&lt;br /&gt;var topPanel = &lt;span style="color: #006080;"&gt;"Jabber Test"&lt;/span&gt;.popupWindow()&lt;br /&gt;                            .insert_LogViewer();&lt;br /&gt;var treeView = topPanel.add_TreeView();&lt;br /&gt;&lt;br /&gt;Action&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;,&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; showMessage = &lt;br /&gt;    (from,text) =&amp;gt;{&lt;br /&gt;                     var nodeText = &lt;span style="color: #006080;"&gt;"{0}: {1}: {2}"&lt;/span&gt;.format(DateTime.Now.ToShortTimeString(), from,text);&lt;br /&gt;                     treeView.add_Node(nodeText).selected();                     &lt;br /&gt;                  };&lt;br /&gt;                 &lt;br /&gt;Action&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; sendPublicMessage =&lt;br /&gt;    (text)=&amp;gt;{&lt;br /&gt;                room.PublicMessage(text);    &lt;br /&gt;                showMessage(userName, text);&lt;br /&gt;            };    &lt;br /&gt;    &lt;br /&gt;room.OnJoin += (r)=&amp;gt;&lt;br /&gt;        {                            &lt;br /&gt;            treeView.white();&lt;br /&gt;            sendPublicMessage(firstMessage);&lt;br /&gt;        };&lt;br /&gt;room.OnRoomMessage+= (sender,message)=&amp;gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #006080;"&gt;"[OnRoomMessage] {0}"&lt;/span&gt;.info(message);            &lt;br /&gt;            showMessage(message.From.User, message.Body);                    &lt;br /&gt;        };&lt;br /&gt;                        &lt;br /&gt;Action onAuthenticate = &lt;br /&gt;    ()=&amp;gt;{    &lt;br /&gt;            &lt;span style="color: #006080;"&gt;"[OnAuthenticate]"&lt;/span&gt;.info();                         &lt;br /&gt;            room.Join();&lt;br /&gt;        };&lt;br /&gt;Action onConnect = &lt;br /&gt;    ()=&amp;gt;{&lt;br /&gt;            &lt;span style="color: #006080;"&gt;"[OnConnect]"&lt;/span&gt;.info();             &lt;br /&gt;            &lt;span style="color: green;"&gt;//O2Thread.mtaThread(()=&amp;gt;jabberClient.Login());  // this wasn't working all the time            &lt;/span&gt;&lt;br /&gt;        };&lt;br /&gt;        &lt;br /&gt;jabberClient.OnConnect         += (sender,stream)=&amp;gt; onConnect(); &lt;br /&gt;jabberClient.OnAuthenticate += (sender)=&amp;gt; onAuthenticate(); &lt;br /&gt;&lt;br /&gt;topPanel.insert_Above(20).add_LabelAndComboBoxAndButton(&lt;span style="color: #006080;"&gt;"Message"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;""&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"Send"&lt;/span&gt;,sendPublicMessage);&lt;br /&gt;&lt;br /&gt;treeView.pink();&lt;br /&gt;&lt;br /&gt;jabberClient.Connect();&lt;br /&gt;&lt;br /&gt;200.wait();&lt;br /&gt;jabberClient.Login();                                     &lt;span style="color: green;"&gt;// have to trigger this from here&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//var state =  (BaseState)jabberClient.property("State");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: #006080;"&gt;"done"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//using jabber;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//using jabber.client&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//using jabber.connection&lt;/span&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;//Installer:JabberNet_Installer.cs!JabberNet/jabber-net.dll&lt;/span&gt;&lt;br /&gt;//O2Ref:JabberNet/jabber-net.dll&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/esRRGBK8DqQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/esRRGBK8DqQ/using-jabber-net-to-talk-to-openfire.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-qV2ViWf5fq0/UbP-vyGQqtI/AAAAAAAAM-M/kVMNg5X3xVM/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/using-jabber-net-to-talk-to-openfire.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7941335010828444032</guid><pubDate>Sun, 16 Jun 2013 12:08:00 +0000</pubDate><atom:updated>2013-06-16T13:08:40.016+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">NDepend</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>NDepend Query to visualize call flows</title><description>After installing &lt;a href="http://blog.diniscruz.com/2013/06/installing-ndepend.html"&gt;NDepend&lt;/a&gt;&amp;nbsp;and writing a &lt;a href="http://blog.diniscruz.com/2013/06/customizing-my-first-ndepend-cql-rule.html"&gt;first simple CQL query&lt;/a&gt;, it was time to try something more&amp;nbsp;interesting, namely a query that could help me write rules to find security vulnerabilities like SQL Injection.&lt;br /&gt;&lt;br /&gt;So I decided to write a rule to find out the call flows into/from a particular method, ie&lt;strong&gt;&amp;nbsp;‘Who calls this method and who it calls?’&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;With NDepend enabled on the source code of&amp;nbsp;&lt;a href="https://github.com/TeamMentor/Master"&gt;TeamMentor/Master&lt;/a&gt;&amp;nbsp;, I opened a class and chose this option:&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[63].png"&gt;&lt;img alt="image_thumb[59]" border="0" src="http://lh6.ggpht.com/-g5q6jA9MCiM/UbyoSn5nlDI/AAAAAAAAN9Q/-sj8XFMB54A/image_thumb%25255B59%25255D%25255B2%25255D.png?imgmax=800" height="382" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[59]" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... which opened this &lt;strong&gt;&lt;em&gt;Dependency Graph&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[66].png"&gt;&lt;img alt="image_thumb[60]" border="0" src="http://lh4.ggpht.com/-ANUnvuBwMWI/UbyoTU4q0gI/AAAAAAAAN9Y/MQ3ey5XLx1M/image_thumb%25255B60%25255D%25255B2%25255D.png?imgmax=800" height="620" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[60]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;If I now select a method, an helper tab will appear below:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[74].png"&gt;&lt;img alt="image_thumb[70]" border="0" src="http://lh5.ggpht.com/-PANrBRxqCLw/UbyoUW6DgKI/AAAAAAAAN9g/13krnb3dZ-k/image_thumb%25255B70%25255D%25255B2%25255D.png?imgmax=800" height="413" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[70]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which for example, explains how to generate a call graph:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[78].png"&gt;&lt;img alt="image_thumb[81]" border="0" src="http://lh4.ggpht.com/-8CO0iMCkIPk/UbyoVeQaEnI/AAAAAAAAN9o/eCCgCbbtyUk/image_thumb%25255B81%25255D%25255B2%25255D.png?imgmax=800" height="297" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[81]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;As per the instructions above, to create a call-graph, I select the direct/indirect callers&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[82].png"&gt;&lt;img alt="image_thumb[89]" border="0" src="http://lh4.ggpht.com/-E3RdGl-bQo4/UbyoWD_n2JI/AAAAAAAAN9w/2O46aAnsQmY/image_thumb%25255B89%25255D%25255B2%25255D.png?imgmax=800" height="361" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[89]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which creates a (custom) CQL rule and executes it:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[91].png"&gt;&lt;img alt="image_thumb[92]" border="0" src="http://lh5.ggpht.com/-2rHtPd_Y6_s/UbyoW1xd4XI/AAAAAAAAN94/X0gFb5WFINE/image_thumb%25255B92%25255D%25255B2%25255D.png?imgmax=800" height="591" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[92]" width="537" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Following the 2nd step of the instructions, I clicked on the ‘Export to Graph’ button, and I got this nice graph:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[95].png"&gt;&lt;img alt="image_thumb[97]" border="0" src="http://lh4.ggpht.com/-_3u2KLCRXuM/UbyoXpppgAI/AAAAAAAAN-A/ZV1RbzFUdb0/image_thumb%25255B97%25255D%25255B2%25255D.png?imgmax=800" height="536" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[97]" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Changing the query a little bit (from &lt;b&gt;&lt;i&gt;m.DepthOfIsUsing &lt;/i&gt;&lt;/b&gt;to &lt;b style="font-style: italic;"&gt;m.DepthOfIsUsedBy&amp;nbsp;&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[98].png"&gt;&lt;img alt="image_thumb[98]" border="0" src="http://lh3.ggpht.com/-Of9-3mqVAuw/UbyoYW5FtBI/AAAAAAAAN-I/A3jgJoiQWs4/image_thumb%25255B98%25255D%25255B2%25255D.png?imgmax=800" height="439" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[98]" width="642" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Gives us a recursive mapping of all methods &lt;b&gt;called by&lt;/b&gt; the original method, ie the call-flow FROM the current method (the first graph gave us the call-flow INTO the current method):&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[106].png"&gt;&lt;img alt="image_thumb[106]" border="0" src="http://lh5.ggpht.com/-4KHRGfANTks/UbyoZIa8tBI/AAAAAAAAN-Q/oh0bhwymjNI/image_thumb%25255B106%25255D%25255B2%25255D.png?imgmax=800" height="615" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[106]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And I got this script right (see below), this is how we get both graphs together:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[113].png"&gt;&lt;img alt="image_thumb[113]" border="0" src="http://lh4.ggpht.com/-8-XwpNKAK-0/UbyoaPVvYKI/AAAAAAAAN-Y/UDSxTy4MqwI/image_thumb%25255B113%25255D%25255B2%25255D.png?imgmax=800" height="474" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[113]" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;.... which will create this graph:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[110].png"&gt;&lt;img alt="image_thumb[112]" border="0" src="http://lh5.ggpht.com/-xpgC-3Cyt0Q/UbyoaxkdGyI/AAAAAAAAN-g/Tio7Sk6jVUk/image_thumb%25255B112%25255D%25255B2%25255D.png?imgmax=800" height="647" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image_thumb[112]" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[110].png"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[110].png"&gt;Now think of a similar view the attack surface at the top and the vulnerable APIs (like SQL execute) at the bottom :)&lt;/a&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles331C89C/image[110].png"&gt;&lt;br /&gt;&lt;/a&gt;And although this would just be a call-flow analysis (vs taint analysis) my experience in doing similar analysis with the O2 Platform has shown that we can find A LOT of vulnerabilities this way (i.e. without needing the full taint analysis engine).&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/1mY3e_iFZks" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/1mY3e_iFZks/ndepend-query-to-visualize-call-flows.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-g5q6jA9MCiM/UbyoSn5nlDI/AAAAAAAAN9Q/-sj8XFMB54A/s72-c/image_thumb%25255B59%25255D%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/ndepend-query-to-visualize-call-flows.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-6455050798638506410</guid><pubDate>Sun, 16 Jun 2013 11:58:00 +0000</pubDate><atom:updated>2013-06-16T12:58:59.881+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">NDepend</category><title>Customizing my first NDepend CQL rule (Potentially dead Methods)</title><description>After &lt;span id="goog_560303693"&gt;&lt;/span&gt;&lt;a href="http://blog.diniscruz.com/2013/06/installing-ndepend.html"&gt;Installing NDepend&lt;/a&gt;&lt;span id="goog_560303694"&gt;&lt;/span&gt;, I was looking at the rules execution result of &lt;a href="https://github.com/TeamMentor/Master"&gt;TeamMentor/Master&lt;/a&gt; and saw that there were a result of 21 &lt;strong&gt;&lt;em&gt;Potential dead methods:&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-vNeb9n5qQRQ/UbyYFo1fWCI/AAAAAAAAN1I/6s_DJ4MTHqQ/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-MJ2Rw0CGByw/UbyYGU-b0nI/AAAAAAAAN1Q/7D7a3WsxREE/image_thumb.png?imgmax=800" height="200" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... which when clicked opened up the rule source code and the 21 matched methods:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-gzxLq3cyRMM/UbyYHEYGviI/AAAAAAAAN1Y/KJN5Toz2JY8/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-D7XPX6pc_7c/UbyYHyyPdbI/AAAAAAAAN1g/m7uz7qL7xr4/image_thumb%25255B2%25255D.png?imgmax=800" height="536" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Double clicking on one of the methods, will open the selected method in Visual Studio (it would be nice it opened inside this UI), which in this case looked like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-EO7L4HpF7Y0/UbyYIQEXrBI/AAAAAAAAN1o/-_JhpRrBb1w/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-KSRZfqSBc30/UbyYJqH_MyI/AAAAAAAAN1w/qL3TTps0DRY/image_thumb%25255B3%25255D.png?imgmax=800" height="223" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;It looks like we have 21 'potentially dead' matches, because the script is not picking up the fact that this is a Unit Test (although it is weird why the other NUnit test also don't show up as 'potential dead methods').&lt;br /&gt;&lt;br /&gt;So I read the C# CQL rule that opened up above the results:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-OeYWxHrD--o/UbyYKk6Kn5I/AAAAAAAAN14/AVMN5BrtQV0/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-kL1HLafq6HY/UbyYLcQ2DNI/AAAAAAAAN2A/nk_wOrIH5uc/image_thumb%25255B4%25255D.png?imgmax=800" height="294" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://lh6.ggpht.com/-SokcHqOB_xY/UbyYMB4RBAI/AAAAAAAAN2E/l1Zw03uWtP4/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-YRr51tLYqnU/UbyYMwfPG1I/AAAAAAAAN2Q/jOzKKvai0jA/image_thumb%25255B5%25255D.png?imgmax=800" height="216" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;...and decided to try to see how hard it would be to customize it.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The compilation and execution is quite fast, with errors showing below&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-mAlzwm28DQk/UbyYOKxDx_I/AAAAAAAAN2Y/hnBW5IE3RuA/s1600-h/image%25255B20%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-mm4wei8tY3Q/UbyYPG9v1-I/AAAAAAAAN2g/n5rbILyrOjw/image_thumb%25255B6%25255D.png?imgmax=800" height="316" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So, I duplicated the … &lt;strong&gt;&lt;em&gt;.HasAttribute("System.Runtime.Serialization.OnDeserializedAttribute". … &lt;/em&gt;&lt;/strong&gt;line&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ixvvH-_zAsg/UbyYPxAgZYI/AAAAAAAAN2o/V08gJQTmKeI/s1600-h/image%25255B23%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-7LFjCeAg9pw/UbyYQtoJhhI/AAAAAAAAN2w/p5QxrvPVrSk/image_thumb%25255B7%25255D.png?imgmax=800" height="316" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;… changed it to &lt;strong&gt;NUnit.Framework.TestAttribute&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;… and the results where shown almost immediately (note how there are only &lt;strong&gt;8 methods matched&lt;/strong&gt; now)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ydwgjDmwLOE/UbyYRVhN2sI/AAAAAAAAN24/Erz0IZ1STTs/s1600-h/image%25255B26%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-stlgvdEsRcA/UbyYSYXNiOI/AAAAAAAAN3A/ebs4_hftv5Q/image_thumb%25255B8%25255D.png?imgmax=800" height="316" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I have to say that this was a really nice experience and I’m looking forward to taking these CQL rules for a bigger spin.&lt;br /&gt;&lt;br /&gt;I wonder if they could be used to create SAST rules, namely rules to find SQL Injection or XSS :)&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/x4LsjyXRKBQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/x4LsjyXRKBQ/customizing-my-first-ndepend-cql-rule.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-MJ2Rw0CGByw/UbyYGU-b0nI/AAAAAAAAN1Q/7D7a3WsxREE/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/customizing-my-first-ndepend-cql-rule.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7344839644076097316</guid><pubDate>Sun, 16 Jun 2013 11:51:00 +0000</pubDate><atom:updated>2013-06-16T12:55:59.379+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><category domain="http://www.blogger.com/atom/ns#">NDepend</category><category domain="http://www.blogger.com/atom/ns#">REPL</category><title>Installing NDepend</title><description>After a nice correspondence with &lt;a href="http://ndepend.com/"&gt;NDepend&lt;/a&gt;’s &lt;a href="http://www.linkedin.com/profile/view?id=36394993"&gt;Patrick Smacchia&lt;/a&gt; who offered me a license of in exchange for some blog posts on how I used it, here is my first one covering the installation and first run&lt;br /&gt;&lt;br /&gt;If don't know about NDepend, here are some references :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;on NDepend Website:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ndepend.com/GettingStarted.aspx"&gt;Getting Started&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ndepend.com/Features.aspx"&gt;Features&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ndepend.com/Doc_CQLinq_Syntax.aspx"&gt;CQL Syntax&lt;/a&gt;&amp;nbsp;, &lt;a href="http://www.ndepend.com/Doc_CQLinq_Features.aspx"&gt;CQL Features&lt;/a&gt;&amp;nbsp;and &lt;a href="http://www.ndepend.com/DefaultRules/webframe.html"&gt;CQL Rules Help&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ndepend.com/API/webframe.html"&gt;API&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ndepend.com/Doc_VS_Arch.aspx"&gt;Exploring Existing Code Architecture in Visual Studio&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/NDepend"&gt;NDepend&lt;/a&gt;&amp;nbsp;on Wikipedia (with more references links)&lt;/li&gt;&lt;li&gt;&lt;a href="http://codebetter.com/patricksmacchia/"&gt;Pattrick's blog&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Other blog posts and articles:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.thushanfernando.com/index.php/2009/06/01/net-tools-ndepend-static-analysis-tool-leave-t-pain-behind/"&gt;.NET Tools: NDepend static analysis tool, leave T-Pain behind.&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hanselman.com/blog/EducatingProgrammersWithPlacematsNDependStaticAnalysisPoster.aspx"&gt;Educating Programmers with Placemats - NDepend Static Analysis Poster&lt;/a&gt; &amp;nbsp;which talks about this&amp;nbsp;&lt;a href="http://www.hanselman.com/blog/content/binary/NDepend%20metrics%20placemats%201.1.pdf"&gt;NDepend Metrics&lt;/a&gt; pdf&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hanselman.com/blog/ExitingTheZoneOfPainStaticAnalysisWithNDepend.aspx"&gt;Exiting The Zone of Pain - Static Analysis with NDepend&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.troyhunt.com/2010/12/continuous-code-quality-measurement.html"&gt;Continuous code quality measurement with NDepend and TeamCity&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="http://tstune.blogspot.co.uk/2012/04/static-code-analysis-based-on-ndepend.html"&gt;Static Code Analysis based on NDepend&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;To start my NDepend test, &amp;nbsp;I went to &lt;a href="http://www.ndepend.com/NDependDownload.aspx"&gt;http://www.ndepend.com/NDependDownload.aspx&lt;/a&gt; and using the License key Patrick sent me, I choose the Professional Edition:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Wm5OYrsf3BM/UbyUaiq5poI/AAAAAAAANxQ/iZSrnvuCYNE/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-NjZHrjE_yuo/UbyUbR5J5aI/AAAAAAAANxY/-yEqHt9T03I/image_thumb%25255B1%25255D.png?imgmax=800" height="403" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...that triggered the download of a zip with these files:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-292iPku6YOE/UbyUcBdDj-I/AAAAAAAANxg/K3oLMh5OKb8/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-4sySMGOAzVk/UbyUc6497SI/AAAAAAAANxo/HzHAC3iE9ek/image_thumb%25255B2%25255D.png?imgmax=800" height="280" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="612" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;...which I unziped to a local folder and added the &lt;b&gt;&lt;i&gt;NDependProLicense.xml &lt;/i&gt;&lt;/b&gt;file (I also received from Patrick)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Xsjizmmt_y8/UbyUdsWQHyI/AAAAAAAANxw/k6NJgaGrSnU/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-OQU_OyZax3g/UbyUee4cQbI/AAAAAAAANx4/XaSz8M81RsU/image_thumb%25255B5%25255D.png?imgmax=800" height="280" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="632" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is the default UI of the stand-alone &lt;b&gt;VisualNDepend.exe &lt;/b&gt;application:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-juiWC2yPA_k/UbyUfBzOQnI/AAAAAAAANyA/bXPK6B1mYOI/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-5fjw3KXBP8o/UbyUf9utl-I/AAAAAAAANyI/fv133XB43gE/image_thumb%25255B4%25255D.png?imgmax=800" height="522" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Clicking on the link next to the red arrow, gets me a list of the latest VS solutions that I have opened:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-7VbJRAgsjZE/UbyUglGu9eI/AAAAAAAANyQ/ESs7vbnWCkk/s1600-h/image%25255B20%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-XY4tDqLnSCE/UbyUhcO2aoI/AAAAAAAANyY/agmu5kyIUXY/image_thumb%25255B6%25255D.png?imgmax=800" height="520" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Clicking ok will show a screen with the list the assemblies to&amp;nbsp;analyse&amp;nbsp;(with the option to remove or add more):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-9Rl8oXcpM_s/UbyUiMJp6xI/AAAAAAAANyg/fGhIAD4p7Ug/s1600-h/image%25255B23%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/--m6DAUUbvVE/UbyUiwvDe_I/AAAAAAAANyo/cO12mIwhDAA/image_thumb%25255B7%25255D.png?imgmax=800" height="348" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Once the analysis finishes (after less then 1 minute), this dialog pops up&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-zH2XB73bwJE/UbyUjhzEYxI/AAAAAAAANyw/IQGlfAq1sKo/s1600-h/image%25255B26%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-evezsKptIas/UbyUkQICXrI/AAAAAAAANy4/_e5r79fYz08/image_thumb%25255B8%25255D.png?imgmax=800" height="379" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I clicked on the first button (Interactive UI Graph) and got this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-d6RdofOGXj4/UbyUk892hiI/AAAAAAAANzA/XUwReEdRbA4/s1600-h/image%25255B30%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-jzpJYH72C_I/UbyUlhqniWI/AAAAAAAANzI/6Fza028ggG8/image_thumb%25255B14%25255D.png?imgmax=800" height="385" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The Dependency Graph can be popped-out and viewed independently:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-CwInB3ytoL0/UbyUmilKZjI/AAAAAAAANzQ/iVOQtWK1neM/s1600-h/image%25255B34%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-08DKOM9sc4E/UbyUnUC2dXI/AAAAAAAANzY/mLr_Oj7qbok/image_thumb%25255B19%25255D.png?imgmax=800" height="727" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... with lots of interresting analysis options in this UI:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-YjVfr6UTZWk/UbyUoXUP7mI/AAAAAAAANzc/I4ovwm4RC94/s1600-h/image%25255B38%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/--s9_lr9xCsc/UbyUpVBC3QI/AAAAAAAANzo/rYynbSoVMus/image_thumb%25255B26%25255D.png?imgmax=800" height="242" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Back in the main UI, here are the metrics view:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-E6d-Uf2WLhA/UbyUqA9woNI/AAAAAAAANzw/NCqTjLV_UOk/s1600-h/image%25255B41%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-Xiq5gR4yJe4/UbyUq-uMj3I/AAAAAAAANz4/odV2g1v_vlg/image_thumb%25255B27%25255D.png?imgmax=800" height="306" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... the project properties:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-5DRMa9QswGw/UbyUrwKOgQI/AAAAAAAAN0A/GVQfzr0bDh4/s1600-h/image%25255B44%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-oULF2yObmrs/UbyUsxEMEEI/AAAAAAAAN0I/g_BOdpo91Ig/image_thumb%25255B28%25255D.png?imgmax=800" height="306" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... the rules execution result&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-SzL1I_KuyHk/UbyUtShv1CI/AAAAAAAAN0Q/itr7ziXUPlM/s1600-h/image%25255B47%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-ZvITPdn3-Ms/UbyUuZfoI1I/AAAAAAAAN0Y/xxx-mmP3t9s/image_thumb%25255B29%25255D.png?imgmax=800" height="361" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="537" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... with these being the rules that are triggering errors (in red)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ARo8wOPkVbI/UbyUvZbV4zI/AAAAAAAAN0g/SElLJN0lJOY/s1600-h/image%25255B50%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-HGAaph8JYrY/UbyUwYbbyuI/AAAAAAAAN0o/l9MM0D_jXmc/image_thumb%25255B30%25255D.png?imgmax=800" height="345" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Note: the memory used also seems to be decent:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ZAfqRSqurxw/UbyUxC4QUXI/AAAAAAAAN0w/dD1H47bOWvA/s1600-h/image%25255B53%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-HmkggqSW-Ck/UbyUx5awoyI/AAAAAAAAN04/_I-xp5hgM4k/image_thumb%25255B31%25255D.png?imgmax=800" height="132" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing VisualStudio add-in&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Back in the unzip dir, I clicked on the &lt;strong&gt;&lt;em&gt;NDepend.Install.VisualStudioAddin.exe&lt;/em&gt;&lt;/strong&gt; file&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-QqZG5g4rcx0/UbyfGFWcAzI/AAAAAAAAN3Q/ZqfMkAZIj8Q/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-yCBQRpTw4cM/UbyfG3yF58I/AAAAAAAAN3Y/ROdW0NyAK9A/image_thumb.png?imgmax=800" height="276" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which opened up this UI:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-HBImTlp72V0/UbyfHRCCdoI/AAAAAAAAN3g/t4MJ-kMa9Vg/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-pB42vvjigG8/UbyfIjsZYFI/AAAAAAAAN3o/5nQIW-Un6Ck/image_thumb%25255B1%25255D.png?imgmax=800" height="372" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="424" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and this after clicking Install:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-907HyBSsYaQ/UbyfJQoGN3I/AAAAAAAAN3w/9NKD4SSQj6Y/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-0JlXCdNSEzI/UbyfJ63cANI/AAAAAAAAN34/M-PlXYAzYvQ/image_thumb%25255B3%25255D.png?imgmax=800" height="288" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="491" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next time VisualStudio opens up, we have a new menu:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-1wSZG2i2o5c/UbyfKv7NHjI/AAAAAAAAN4A/dKJgVwK0fRQ/s1600-h/image%25255B15%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-lDmo7ALIKfQ/UbyfLgt2cmI/AAAAAAAAN4I/gX0lySHPCIs/image_thumb%25255B8%25255D.png?imgmax=800" height="252" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I opened up the TeamMentor project and chose the NDepend menu option to &lt;strong&gt;&lt;em&gt;Attach a new NDepend Project to VS Solution&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-cj4NtI0knIQ/UbyfMGGEyTI/AAAAAAAAN4Q/es7D7eavj-c/s1600-h/image%25255B18%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-dyIvJQz6gBQ/UbyfMzaeOyI/AAAAAAAAN4Y/Bu3YujV9hto/image_thumb%25255B9%25255D.png?imgmax=800" height="395" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and now the NDepend windows show up inside a VisualStudio panel window:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-LH4o5xtRxNQ/UbyfOL_3buI/AAAAAAAAN4g/kb6emdZknX4/s1600-h/image%25255B21%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-cYCK2II7nrY/UbyfPcIAPzI/AAAAAAAAN4o/o9u30V-fAQ8/image_thumb%25255B10%25255D.png?imgmax=800" height="200" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;...which can be placed anywhere inside the VisualStudio UI&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-5AxFEyq3jJc/UbyfQUuL-8I/AAAAAAAAN4w/zD4-Tux3MnY/s1600-h/image%25255B24%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-smDxcZP2YWA/UbyfRBw8m4I/AAAAAAAAN44/vX3nZtYNEMU/image_thumb%25255B11%25255D.png?imgmax=800" height="528" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Note that afte the project is assigned, the NDepend menu has different entries:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-4s0kBGlGUvE/UbyfR-2hZJI/AAAAAAAAN5A/bXjhlpHWtAA/s1600-h/image%25255B28%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-iFwx4DZe9D0/UbyfSmW6S8I/AAAAAAAAN5I/Xx_Y6t5XYFQ/image_thumb%25255B22%25255D.png?imgmax=800" height="403" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Opening up the &lt;strong&gt;&lt;em&gt;Queries and Rules&lt;/em&gt;&lt;/strong&gt; Edit menu option, opens up this REPL CQL rules editor&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-LP1dDPV5H_0/UbyfTj7xPAI/AAAAAAAAN5Q/j0uq4qN5Hgc/s1600-h/image%25255B35%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-kRtt35oKgN4/UbyfUFVfTPI/AAAAAAAAN5Y/zJTTx9O4erk/image_thumb%25255B25%25255D.png?imgmax=800" height="382" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="482" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;where we can write a LINQ query (with Code Complete support)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-kW2BNjjBKNQ/UbyfVQ1vw0I/AAAAAAAAN5g/PApkB7IOXds/s1600-h/image%25255B43%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-h85RA2Ro7sQ/UbyfWT9Ly9I/AAAAAAAAN5o/xefBBRer5jw/image_thumb%25255B37%25255D.png?imgmax=800" height="333" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So for example, here is a query that lists all methods in the&amp;nbsp;analysed&amp;nbsp;assemblies:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-3fPf3J3noq8/UbyfW4vuLXI/AAAAAAAAN5w/BSRoMH6JNeA/s1600-h/image%25255B46%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-h839p5qYj94/UbyfXuOoYKI/AAAAAAAAN54/8yFLgEnouJw/image_thumb%25255B38%25255D.png?imgmax=800" height="468" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="591" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... with lots of interesting pre-massaged data analysis:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-XUPCHxqSyCk/UbyfYRaTzTI/AAAAAAAAN6A/D_w-8VDztEE/s1600-h/image%25255B51%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-37FbaonwwJY/UbyfY7Z9F6I/AAAAAAAAN6I/MPE4AYp9rj0/image_thumb%25255B44%25255D.png?imgmax=800" height="245" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-q7wZ_b9aBDE/UbyfZjUNB7I/AAAAAAAAN6Q/uvapPQmCzDM/s1600-h/image%25255B55%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-fzJH_R9tsQw/UbyfaXyJAmI/AAAAAAAAN6Y/yskKLh33UW4/image_thumb%25255B49%25255D.png?imgmax=800" height="532" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and really powerful results&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-u8yxbtvD130/Ubyfb8L5l4I/AAAAAAAAN6g/Jbk8x1CLKcA/s1600-h/image%25255B59%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-1PmagOJPF9A/Ubyfc0ssdOI/AAAAAAAAN6o/PJ8yDPp9bSA/image_thumb%25255B54%25255D.png?imgmax=800" height="496" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;I really like this query environment. It is fast, powerful and easy to understand&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And it will be even better once I can access this data from the O2’s C# REPL that is also running as a VisualStudio extension :)&lt;br /&gt;&lt;br /&gt;See next posts for my first experiments at writing CQL queries&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/XF8JGBBaoXA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/XF8JGBBaoXA/installing-ndepend.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-NjZHrjE_yuo/UbyUbR5J5aI/AAAAAAAANxY/-yEqHt9T03I/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/installing-ndepend.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-868191400059350832</guid><pubDate>Sun, 16 Jun 2013 11:17:00 +0000</pubDate><atom:updated>2013-06-16T12:17:35.927+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><title>Trying DevExpress (install and uninstall)</title><description>Since I'm still not 100% happy with Resharper performance and system Impact, I just tried&amp;nbsp;&lt;a href="http://www.devexpress.com/Products/CodeRush/"&gt;CodeRush from DevExpress&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The rest of this post shows how I installed, used it and uninstalled CodeRush&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;I went to CodeRush main page:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-6t6PG8XtiBI/UbyAgNCTiQI/AAAAAAAANtY/En34GVShpLs/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-C8IDt4lysUA/UbyAhaxJ85I/AAAAAAAANtg/QZ9Z46_27zY/image_thumb.png?imgmax=800" height="291" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...&amp;nbsp;downloaded the installer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-p-jPMKSD53w/UbyAk3ONm9I/AAAAAAAANto/hSQJ4VNCoT0/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-L50Xs8MvM6s/UbyAly95SFI/AAAAAAAANtw/v9wXeFN9EiE/image_thumb%25255B1%25255D.png?imgmax=800" height="424" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This screen is weird since what I want is CodeRush, which seems to be the only one not selected&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-sZDjBC4Wh0k/UbyAmQ9voZI/AAAAAAAANt4/JQuOfdZDZQs/s1600-h/image%25255B20%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-SbGwoSNa7Q0/UbyAn62zMNI/AAAAAAAANuA/Ti7a4FwWjBM/image_thumb%25255B6%25255D.png?imgmax=800" height="425" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...&amp;nbsp;so lets try like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-BqQUDSBzmI0/UbyAoVYiUoI/AAAAAAAANuI/3mQAx9g2MWw/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-iAbiKaQPWxk/UbyApR9biqI/AAAAAAAANuQ/0ZBeb7VJlAk/image_thumb%25255B5%25255D.png?imgmax=800" height="425" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;...&amp;nbsp;clicked on&lt;em&gt; “…Can I own your computer please?…”&lt;/em&gt; and &lt;em&gt;“…do you accept all the terms we wrote without reading them”&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;a href="http://lh3.ggpht.com/-nI4hVQSKDl8/UbyAquxExgI/AAAAAAAANuY/D5ozHeuKQCE/s1600-h/image%25255B26%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-8W7m7S1omU8/UbyArYTb7ZI/AAAAAAAANug/oTv8QFqJwsc/image_thumb%25255B8%25255D.png?imgmax=800" height="425" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... the 14Mb download started&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-sfPWckjpLtc/UbyAsCxPWMI/AAAAAAAANuo/-cT27cp7Z7A/s1600-h/image%25255B29%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-TOVHlax7LOI/UbyAssQ3kTI/AAAAAAAANuw/wCvN_Qqr764/image_thumb%25255B9%25255D.png?imgmax=800" height="425" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...&amp;nbsp;the install hanged here for a little bit&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-G17NHNmf6mg/UbyAtgGyHRI/AAAAAAAANu4/Er2ERuYAs_k/s1600-h/image%25255B32%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-kMI-09k79Zs/UbyAuCtaYTI/AAAAAAAANvA/Yd-C2LzLD14/image_thumb%25255B10%25255D.png?imgmax=800" height="425" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-0VTAatD6BoI/UbyAu7yPZUI/AAAAAAAANvI/hFihBn48oKo/s1600-h/image%25255B35%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-EKV1aQJGZ3Y/UbyAvncFZ4I/AAAAAAAANvQ/5RKYkAl2cgo/image_thumb%25255B11%25255D.png?imgmax=800" height="425" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...&amp;nbsp;After loading up visual studio, there is a new Menu Bar menu&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ZEaW7u_pSsA/UbyAwPHyJuI/AAAAAAAANvY/4ub8sQvcH8o/s1600-h/image%25255B39%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-b8b5BbFyoRI/UbyAw10sxuI/AAAAAAAANvg/J0z-K6Is5gM/image_thumb%25255B16%25255D.png?imgmax=800" height="184" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Humm, memory consumption is not looking very good:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-yacIPwn7hqk/UbyAxp1vEMI/AAAAAAAANvo/lIMTF-2X_Hc/s1600-h/image%25255B42%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-QMnKhC3gNNA/UbyAybwBhRI/AAAAAAAANvw/zOsCXqiuzDo/image_thumb%25255B17%25255D.png?imgmax=800" height="148" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... the unit test runner doesn’t work without config (on the same project that Resharper runs ok):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-yrda3PBsJIs/UbyAy0ZWReI/AAAAAAAANv4/azPssRu3HNU/s1600-h/image%25255B45%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-AaIP6aLfVvI/UbyAzmeBR1I/AAAAAAAANwA/AdywUg-Wieg/image_thumb%25255B18%25255D.png?imgmax=800" height="349" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... the GUI goes unresponsive and the memory consumption is very high:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-0DpdBNGPUdk/UbyA02qiaaI/AAAAAAAANwI/xzyCGQqrLf0/s1600-h/image%25255B48%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-C-eh3bzYuNQ/UbyA1vSxDRI/AAAAAAAANwQ/_1KT70A7UL4/image_thumb%25255B19%25255D.png?imgmax=800" height="131" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;... and&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-1LmOKDqaV7A/UbyA2B6lW9I/AAAAAAAANwY/yBQ2QR9-sxc/s1600-h/image%25255B54%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-NZWez5oTYA8/UbyA3ZwCwTI/AAAAAAAANwg/isosS3HYGPU/image_thumb%25255B21%25255D.png?imgmax=800" height="126" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The decompiler window looks good, but&amp;nbsp;unfortunately&amp;nbsp; after waiting around 2 minutes for VS to become responsive again, I’m going to uninstall it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-61nSqA4A3S0/UbyA4UCLUwI/AAAAAAAANwo/pxD-g2TfyW4/s1600-h/image%25255B51%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-BcIIr9m7tY0/UbyA5UDogII/AAAAAAAANww/yuS0DibtfyE/image_thumb%25255B20%25255D.png?imgmax=800" height="369" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="562" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;bye bye&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-OrDgQgPD1fI/UbyA55WbalI/AAAAAAAANw4/eyJXmH0aWqE/s1600-h/image%25255B57%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-CUoO4jb0b-c/UbyA7MMp5wI/AAAAAAAANxA/nnwCE3OZqpU/image_thumb%25255B22%25255D.png?imgmax=800" height="428" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... maybe next time, when they move all activity to outside the VisualStudio process&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/kKQxN9TSOkc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/kKQxN9TSOkc/trying-devexpress-install-and-uninstall.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-C8IDt4lysUA/UbyAhaxJ85I/AAAAAAAANtg/QZ9Z46_27zY/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/trying-devexpress-install-and-uninstall.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7856114786742007200</guid><pubDate>Fri, 14 Jun 2013 13:27:00 +0000</pubDate><atom:updated>2013-06-14T14:27:26.282+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AngularJS</category><category domain="http://www.blogger.com/atom/ns#">Design</category><title>AngularJS code editor using UI-Bootstrap and CodeMirror (done without using jQuery)</title><description>I’m adding a number of &lt;a href="http://docs.angularjs.org/"&gt;AngularJS&lt;/a&gt; views to &lt;a href="http://blog.diniscruz.com/search/label/TeamMentor"&gt;TeamMentor&lt;/a&gt;, and here is a simple HTML based source code editor inspired on the &lt;a href="http://neverstopbuilding.net/how-to-integrate-codemirror-with-angular-ui/"&gt;How to Integrate Codemirror With Angular UI&lt;/a&gt; post and &lt;a href="https://github.com/angular-ui/ui-codemirror"&gt;ui-codemirror&lt;/a&gt; repository.&lt;br /&gt;&lt;br /&gt;In the end, these are the APIs I used:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://angularjs.org/"&gt;http://angularjs.org/&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://angular-ui.github.io/bootstrap/"&gt;http://angular-ui.github.io/bootstrap/&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://twitter.github.io/bootstrap"&gt;http://twitter.github.io/bootstrap&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://codemirror.net/"&gt;http://codemirror.net/&lt;/a&gt; (just the core bit)&lt;/li&gt;&lt;/ul&gt;And this is what it looks like:&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-2ed3vgaR-6g/UbsYAYxNfTI/AAAAAAAANrg/bEsGUqtjdcc/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-3Zs-qLcAm-8/UbsYB1gJgcI/AAAAAAAANro/wpwGYPd-MSY/image_thumb.png?imgmax=800" height="528" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The source code editor is showing the contents of the current page (dynamically fetched using Angular &lt;strong&gt;&lt;em&gt;$http.get&lt;/em&gt;&lt;/strong&gt;) and the bottom yellow div is showing (in real-time) the contents of the source code editor:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-C86m0YcAMsE/UbsYCof8r5I/AAAAAAAANrw/ZgWGi5HUYu8/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-M9J-0pelkvs/UbsYDkVtfpI/AAAAAAAANr4/lfwxHqapHUQ/image_thumb%25255B1%25255D.png?imgmax=800" height="479" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;What is nice about this example is that I didn’t use jQuery at all!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The great posts&amp;nbsp;&lt;a href="http://stackoverflow.com/a/15012542" title="http://stackoverflow.com/a/15012542"&gt;http://stackoverflow.com/a/15012542&lt;/a&gt; and &lt;a href="http://blog.artlogic.com/2013/03/06/angularjs-for-jquery-developers/"&gt;AngularJS for jQuery Developers&lt;/a&gt;&amp;nbsp;explain why learning to code in Angular without JQuery is so important.&lt;br /&gt;&lt;br /&gt;Basically, it's better not &amp;nbsp;have jQuery available, since them, the only way to solve a problem, is the ‘AngularJS way’ :)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Here is a brief explanation of the code behind this PoC (included in full at the end of this page):&lt;br /&gt;&lt;br /&gt;First we load the&amp;nbsp;&lt;strong&gt;Javascript&lt;/strong&gt; and &lt;strong&gt;CSS:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-tEcuVEP1D80/UbsYEoXOcjI/AAAAAAAANsA/HWHRdWIOT18/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-9meX_1ioPwo/UbsYFiYyi6I/AAAAAAAANsI/dU24y71i_dY/image_thumb%25255B2%25255D.png?imgmax=800" height="216" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... them set up &lt;strong&gt;&lt;em&gt;AngularJS&lt;/em&gt;&lt;/strong&gt; module and &lt;strong&gt;&lt;em&gt;codeMirror&lt;/em&gt;&lt;/strong&gt; value&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-lyj5LUqcA94/UbsYGN5zcsI/AAAAAAAANsM/AgHTQeAAkp8/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-_tAEbELADlM/UbsYIqt0cSI/AAAAAAAANsY/zjbKgYm8kM4/image_thumb%25255B3%25255D.png?imgmax=800" height="234" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="589" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... use a &lt;strong&gt;&lt;em&gt;controller&lt;/em&gt;&lt;/strong&gt; to get the code to show (using &lt;strong&gt;&lt;em&gt;$http.get&lt;/em&gt;&lt;/strong&gt;) and assign it to the the&lt;strong&gt;&lt;em&gt; $scope.code&lt;/em&gt;&lt;/strong&gt; variable&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-b-GAtysPY7M/UbsYJdayGQI/AAAAAAAANsg/m5lJUWFHO-A/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-PKUOonOnMco/UbsYJ2urVxI/AAAAAAAANso/NRSPVh7LJBM/image_thumb%25255B4%25255D.png?imgmax=800" height="184" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... configure &lt;strong&gt;angularJS&lt;/strong&gt; in the HTML by setting the &lt;strong&gt;&lt;em&gt;textarea&lt;/em&gt;&lt;/strong&gt; element to be a &lt;strong&gt;&lt;em&gt;codemirror&lt;/em&gt;&lt;/strong&gt; (linked to the &lt;strong&gt;$scope.code &lt;/strong&gt;model)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-J3XesF0TAmA/UbsYK4HOBII/AAAAAAAANsw/ZsquvRAHFtg/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-J8RsYnqk_ys/UbsYLmACSrI/AAAAAAAANs4/rNveZ-rUsrU/image_thumb%25255B5%25255D.png?imgmax=800" height="213" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... finally show the current value of &lt;strong&gt;$scope.code&lt;/strong&gt;&amp;nbsp; in side an bootstrap &lt;strong&gt;&lt;em&gt;alert&lt;/em&gt;&lt;/strong&gt; element&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-aDNK4MBsNAE/UbsYMt2KWiI/AAAAAAAANtA/BEybxPt6wEk/s1600-h/image%25255B23%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-20MwfsMjXDw/UbsYNgYNzKI/AAAAAAAANtI/6HpKEFHXCsU/image_thumb%25255B7%25255D.png?imgmax=800" height="166" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Complete Source code:&lt;/strong&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;pre id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;    &amp;lt;head&amp;gt;&lt;br /&gt;        &amp;lt;title&amp;gt;CodeMirror with AngularJS&amp;lt;/title&amp;gt;&lt;br /&gt;        &amp;lt;link  href=&lt;span style="color: #006080;"&gt;"/Content/bootstrap.min.css"&lt;/span&gt;                    rel=&lt;span style="color: #006080;"&gt;"stylesheet"&lt;/span&gt;&amp;gt;&lt;br /&gt;        &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/Scripts/angular.min.js"&lt;/span&gt;                      type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;        &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/Scripts/angular-ui.js"&lt;/span&gt;                       type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;        &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/Scripts/ui-bootstrap-tpls-0.3.0.min.js"&lt;/span&gt;      type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;link  href=&lt;span style="color: #006080;"&gt;"/Content/codemirror-3.01/codemirror.css"&lt;/span&gt;       rel=&lt;span style="color: #006080;"&gt;"stylesheet"&lt;/span&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;link  href=&lt;span style="color: #006080;"&gt;"/Content/codemirror-3.01/theme/rubyblue.css"&lt;/span&gt;   rel=&lt;span style="color: #006080;"&gt;"stylesheet"&lt;/span&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/Scripts/codemirror-3.01/codemirror.js"&lt;/span&gt;       type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;        &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/Scripts/codemirror-3.01/mode/javascript.js"&lt;/span&gt;  type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;br /&gt;            var myApp = angular.module(&lt;span style="color: #006080;"&gt;'myApp'&lt;/span&gt;, [&lt;span style="color: #006080;"&gt;'ui'&lt;/span&gt;, &lt;span style="color: #006080;"&gt;'ui.bootstrap'&lt;/span&gt;]);&lt;br /&gt;&lt;br /&gt;            myApp.&lt;span style="color: blue;"&gt;value&lt;/span&gt;(&lt;span style="color: #006080;"&gt;'ui.config'&lt;/span&gt;,&lt;br /&gt;                {&lt;br /&gt;                    codemirror:&lt;br /&gt;                    {&lt;br /&gt;                        mode: &lt;span style="color: #006080;"&gt;'javascript'&lt;/span&gt;,&lt;br /&gt;                        lineNumbers: &lt;span style="color: blue;"&gt;true&lt;/span&gt;,&lt;br /&gt;                        matchBrackets: &lt;span style="color: blue;"&gt;true&lt;/span&gt;,&lt;br /&gt;                        theme: &lt;span style="color: #006080;"&gt;'rubyblue'&lt;/span&gt;&lt;br /&gt;                    }&lt;br /&gt;                });&lt;br /&gt;&lt;br /&gt;            function codeCtrl($scope,$http)&lt;br /&gt;            {&lt;br /&gt;                $scope.docLocation = document.location.href;&lt;br /&gt;                $http.get($scope.docLocation)&lt;br /&gt;                        .success(function (data)&lt;br /&gt;                            {&lt;br /&gt;                                $scope.code = data;&lt;br /&gt;                            });&lt;br /&gt;                &lt;span style="color: green;"&gt;//$scope.code = "var a = 'somecode'; \n//which also shows above&amp;lt;/h1&amp;gt;";&lt;/span&gt;&lt;br /&gt;            }&lt;br /&gt;        &amp;lt;/script&amp;gt;&lt;br /&gt;    &amp;lt;/head&amp;gt;&lt;br /&gt;    &amp;lt;body ng-app=&lt;span style="color: #006080;"&gt;"myApp"&lt;/span&gt;&amp;gt;&lt;br /&gt;        &amp;lt;div &lt;span style="color: blue;"&gt;class&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"well well-large"&lt;/span&gt;&amp;gt;&lt;br /&gt;            &amp;lt;div &lt;span style="color: blue;"&gt;class&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"container"&lt;/span&gt;&amp;gt;&lt;br /&gt;                &amp;lt;h2&amp;gt;CodeMirror working with AngularJS and Bootstrap&amp;lt;/h2&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;            &amp;lt;/div&amp;gt;&lt;br /&gt;        &amp;lt;div ng-controller=&lt;span style="color: #006080;"&gt;"codeCtrl"&lt;/span&gt;&amp;gt;&lt;br /&gt;            &amp;lt;div &lt;span style="color: blue;"&gt;class&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"container"&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;                &amp;lt;h4&amp;gt;Code Editor:&amp;lt;/h4&amp;gt;&lt;br /&gt;                &amp;lt;p&amp;gt;With the the contents of &lt;span style="color: blue;"&gt;this&lt;/span&gt; page (i.e.: {{docLocation}} )&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;                &amp;lt;textarea ui-codemirror ng-model=&lt;span style="color: #006080;"&gt;"code"&lt;/span&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;br /&gt;&lt;br /&gt;                &amp;lt;br/&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&lt;br /&gt;                &amp;lt;h4&amp;gt;Bootstrap alert style&amp;lt;/h4&amp;gt;&lt;br /&gt;                &amp;lt;p&amp;gt;&lt;br /&gt;                    Showing &lt;span style="color: blue;"&gt;in&lt;/span&gt; real time the contents of the code shown above (make a change to &lt;span style="color: blue;"&gt;try&lt;/span&gt; it)&lt;br /&gt;                &amp;lt;/p&amp;gt;&lt;br /&gt;                &amp;lt;alert type=&lt;span style="color: #006080;"&gt;"success"&lt;/span&gt;&amp;gt;{{code}}&amp;lt;/alert&amp;gt;&lt;br /&gt;            &amp;lt;/div&amp;gt;&lt;br /&gt;        &amp;lt;/div&amp;gt;&lt;br /&gt;    &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/Rs_0gCxpEhY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/Rs_0gCxpEhY/angularjs-code-editor-using-ui.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-3Zs-qLcAm-8/UbsYB1gJgcI/AAAAAAAANro/wpwGYPd-MSY/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/angularjs-code-editor-using-ui.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-4117070842911279406</guid><pubDate>Fri, 14 Jun 2013 00:49:00 +0000</pubDate><atom:updated>2013-06-14T01:54:49.787+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Git</category><category domain="http://www.blogger.com/atom/ns#">Video</category><category domain="http://www.blogger.com/atom/ns#">Visualization</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>Gource Visualisation of "TeamMentor Git Development - 18 Months in 180 Seconds"</title><description>Here is a pretty cool video of 18 months of Git commits using the &lt;a href="https://code.google.com/p/gource/"&gt;Gource tool&lt;/a&gt;&amp;nbsp;which is a software version control visualization tool.&lt;br /&gt;&lt;br /&gt;Try to see it in full screen and at 1024p HD quality:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="515" src="http://www.youtube.com/embed/SbwbWOeZpAA" width="100%"&gt;&lt;/iframe&gt; &lt;br /&gt;Here are the&amp;nbsp;&lt;a href="https://code.google.com/p/gource/wiki/Controls"&gt;Gource settings&lt;/a&gt; used to create this video:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;gource.exe -s 1 --file-idle-time 0 --key --title "TeamMentor" --font-size 30 -- hide dirnames --date-format "%d/%b/%y" --bloom-multiplier 0.5 --bloom-intensity 0.5 --f&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;Since the original video was 10 minutes, I used Camtasia &lt;b&gt;&lt;i&gt;Clip Speed&lt;/i&gt;&lt;/b&gt; feature to compress it to about 3 minutes (~180 sec)&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/xG7eQEifWXg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/xG7eQEifWXg/gource-visualisation-of-teammentor-git.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/SbwbWOeZpAA/default.jpg" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/gource-visualisation-of-teammentor-git.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7994862318843761554</guid><pubDate>Wed, 12 Jun 2013 18:26:00 +0000</pubDate><atom:updated>2013-06-12T19:26:35.390+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>More TeamMentor UI Javascript trace and debug views</title><description>On the topic of TeamMentor UI debug helpers (see &lt;a href="http://blog.diniscruz.com/2013/06/opening-up-teammentors-javascript-trace.html"&gt;Opening up TeamMentor’s Javascript Trace Viewer which hooks TM method calls&lt;/a&gt;) here are a couple other useful options:&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;strong&gt;With window.TM.Debug.callTrace_LoadEnvironment set to true:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;1) Enabling &lt;strong&gt;&lt;em&gt;window.TM.Debug.callTrace_LogToConsole&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-oB5SxdqGGA8/Ubicsgp6iHI/AAAAAAAANe0/IxXlF5u6heY/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-o23WumK-VeQ/UbicuOV0iTI/AAAAAAAANe8/hw_-OINAHfc/image_thumb%25255B4%25255D.png?imgmax=800" height="121" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="457" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;.... will also write the 'function call info' into the console (like Chrome developer tools of FireBug):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-GjO_y2oyx9U/Ubicu90puNI/AAAAAAAANfA/yJ2Tbycm8Os/s1600-h/image%25255B17%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-H5YCbuqqRV0/UbicvWb5U2I/AAAAAAAANfM/YqudPwPHWLU/image_thumb%25255B5%25255D.png?imgmax=800" height="525" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="624" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Tip: if you don’t want to see the Trace Output window, click on the top-right-red X&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-YEOEuvVevQA/UbicwBxwUWI/AAAAAAAANfQ/cCoa3uRezu8/s1600-h/image%25255B30%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-aTNzGRsl8zA/UbicwnP7GUI/AAAAAAAANfU/bnZGZtBNj-0/image_thumb%25255B10%25255D.png?imgmax=800" height="111" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="602" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;and it will be minimized into the bottom right corner (where you can click on it to reopen):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-0qRTCjWk9A4/UbicxDkvxiI/AAAAAAAANfg/f-2c-oNAY9Q/s1600-h/image%25255B21%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-mfMUOhwOflw/Ubicxv7IWbI/AAAAAAAANfo/0CxVk-74i7A/image_thumb%25255B7%25255D.png?imgmax=800" height="74" style="border: 0px; display: inline;" title="image" width="179" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) Enabling &lt;strong&gt;&lt;em&gt;window.TM.Debug.callTrace_ShowParamsInConsoleLog&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-9Cw2RnDQE-s/UbicyXM5wUI/AAAAAAAANf0/-uuIAwCFIZw/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-PPBVg3qPLYE/Ubicy37BsRI/AAAAAAAANf4/h8PgQvHpUew/image_thumb%25255B1%25255D.png?imgmax=800" height="121" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="457" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;will add the call parameters to the console log:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Dsc7_LYHvbE/UbiczSIenzI/AAAAAAAANgE/wFVdNCAudQM/s1600-h/image%25255B33%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-9aKodnxHr24/Ubic0PIeorI/AAAAAAAANgI/ZlBCc1l5VGQ/image_thumb%25255B11%25255D.png?imgmax=800" height="260" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Another example showing the string values of the &lt;strong&gt;&lt;em&gt;add_Filter&lt;/em&gt;&lt;/strong&gt; call&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Cs44BTB1Uhk/Ubic0osNSWI/AAAAAAAANgQ/c5R-B6ic_jA/s1600-h/image%25255B36%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-uGKbJfBZ-2Y/Ubic1RXKVbI/AAAAAAAANgY/_TZUd1RUrHs/image_thumb%25255B12%25255D.png?imgmax=800" height="208" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) enabling &lt;strong&gt;&lt;em&gt;callTrace_ShowExecutionTime&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-V53WCYqzFJ0/Ubic10ZQxkI/AAAAAAAANgg/J1xEiZ-d1TI/s1600-h/image%25255B11%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-cqlHzMWxiiE/Ubic2gaggFI/AAAAAAAANgo/ZrrenLKqS9w/image_thumb%25255B3%25255D.png?imgmax=800" height="121" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="457" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;will add a &lt;strong&gt;&lt;em&gt;took ##ms &lt;/em&gt;&lt;/strong&gt;message after each function returns (again very useful for debugging timing and performance issues)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-w0JTjvH9-B4/Ubic3MKJyKI/AAAAAAAANgw/WBg0dnGbcV8/s1600-h/image%25255B39%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-WfUtK6LIPdQ/Ubic30B38TI/AAAAAAAANg4/w4OuU3azdIw/image_thumb%25255B13%25255D.png?imgmax=800" height="328" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="625" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;With window.TM.Debug.callTrace_LoadEnvironment set to false&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;The call trace is very good and powerful, but it does have a performance hit, and can generate too much data, so another useful debug tool is if we disable all &lt;strong&gt;&lt;em&gt;callTrace_*&lt;/em&gt;&lt;/strong&gt; settings &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-l1ep9iBk02k/Ubic4SKkceI/AAAAAAAANhA/lEqdCrPbDAE/s1600-h/image%25255B42%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-m3GNiOn9ojk/Ubic4-xsQgI/AAAAAAAANhM/mCmGlsXgonk/image_thumb%25255B14%25255D.png?imgmax=800" height="121" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="473" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;and:&lt;br /&gt;&lt;br /&gt;1) enable &lt;strong&gt;&lt;em&gt;logEventsRaised&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-2-FcCX8n8lI/Ubic5bA2VII/AAAAAAAANhU/b5c8w5NloPU/s1600-h/image%25255B48%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-wZJU137DRn8/Ubic5z-Q6cI/AAAAAAAANhY/-xvz-Ti4AmU/image_thumb%25255B16%25255D.png?imgmax=800" height="49" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... will make TM write an entry to the console of all events raised:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Rg50aT61VYk/Ubic613QQvI/AAAAAAAANhg/H8p8XbQ33PU/s1600-h/image%25255B51%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-Jg35z_cNP-g/Ubic7T_dM1I/AAAAAAAANhs/JwfWHtbbK1c/image_thumb%25255B17%25255D.png?imgmax=800" height="296" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;2) enable &lt;strong&gt;logEventsRaise_CallTrace&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-0qRmsmXd7Ms/Ubic724O7AI/AAAAAAAANh0/QPiheJki73k/s1600-h/image%25255B54%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-ISq-yB5lCTA/Ubic8YxinMI/AAAAAAAANh4/mmyHzFBK4ck/image_thumb%25255B18%25255D.png?imgmax=800" height="60" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="480" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...will add the Call Stack/Trace to each event call (great to see who triggered that event)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-b5YWMBQcMDU/Ubic9BwCWKI/AAAAAAAANiA/OP1jQbcuKn0/s1600-h/image%25255B57%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-VJxENhmUrEk/Ubic94LHNqI/AAAAAAAANiI/AIXqQB1Uu0w/image_thumb%25255B19%25255D.png?imgmax=800" height="388" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... with the added bonus that we can click on the function location and see its source code:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-_q_1TQ50RvE/Ubic-wUOO_I/AAAAAAAANiQ/iHvbvu43fcY/s1600-h/image%25255B60%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8HmIyYfp2vU/Ubic_jpNV1I/AAAAAAAANiY/-2BzZZQFMsE/image_thumb%25255B20%25255D.png?imgmax=800" height="278" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...you can even take a look at the TM’s &lt;strong&gt;&lt;em&gt;Event-Driven-Architecture&lt;/em&gt;&lt;/strong&gt; Solution code (based on jQuery events):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-iE6zWN3JGGo/UbidAPAzT9I/AAAAAAAANig/284_SIDcr8U/s1600-h/image%25255B63%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-q6s7pfRp1QY/UbidA8sg9mI/AAAAAAAANio/8MDs5jggTj4/image_thumb%25255B21%25255D.png?imgmax=800" height="278" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) enabled &lt;strong&gt;logLoadedPages&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh4.ggpht.com/-6bhXHa9KTm4/UbidBghZUNI/AAAAAAAANiw/4SzMoZ-Y694/s1600-h/image%25255B66%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-Tk2PhivxAhQ/UbidCYWPrpI/AAAAAAAANi4/lQ-glRCs7n0/image_thumb%25255B22%25255D.png?imgmax=800" height="58" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="479" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... will show a real-time list of all html pages loaded (think of this as &lt;strong&gt;&lt;em&gt;views&lt;/em&gt;&lt;/strong&gt;):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-PnDEAFTrgo8/UbidC5h590I/AAAAAAAANjE/PS8qn09ykvM/s1600-h/image%25255B69%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-m2i3XxAOYu0/UbidDjcggSI/AAAAAAAANjI/bks0LhVfvUw/image_thumb%25255B23%25255D.png?imgmax=800" height="224" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Other debug options&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;There are a couple other smallish debug capabilities that can be configured by:&lt;br /&gt;&lt;br /&gt;1) disabling &lt;strong&gt;&lt;em&gt;LoadLibraryData&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-n2sjhxenk70/UbidEC0UToI/AAAAAAAANjQ/Iwiuux0wOwc/s1600-h/image%25255B72%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-bS13_hyp8A0/UbidEvH6xoI/AAAAAAAANjc/0tc6f9zBmdc/image_thumb%25255B24%25255D.png?imgmax=800" height="74" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="515" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which will load up TM without any libraries (useful when just debugging/testing the pure UI). &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-LTiK5WINU9c/UbidFZFfzoI/AAAAAAAANjk/maC9r0lY4eQ/s1600-h/image%25255B75%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-GDUeC8Nve_I/UbidGTkPBOI/AAAAAAAANjo/sQZyJGpqHDU/image_thumb%25255B25%25255D.png?imgmax=800" height="499" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;note how in the image above, the default TM UI has 46kb and loaded up in 698ms (which even for localhost access is quite nice and fast)&lt;br /&gt;&lt;br /&gt;If we disable the addTimeStampToLoadedPages (to allow caching of the view html pages (instead of adding a random ?time=#### value to them)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-qd3kPszYFvg/UbidG5J484I/AAAAAAAANjw/E3UeX6zwdhg/s1600-h/image%25255B81%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-ftxC83ffCiY/UbidHZTItYI/AAAAAAAANj4/7UuZoA_Xj8I/image_thumb%25255B27%25255D.png?imgmax=800" height="64" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="501" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;and load the site from IIS&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-93xabDiPXvQ/UbidIC0kvnI/AAAAAAAANkA/zdTlWlwp6mg/s1600-h/image%25255B78%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-gmdFIB4icjY/UbidIoBMhmI/AAAAAAAANkI/YjkrY-1kkrQ/image_thumb%25255B26%25255D.png?imgmax=800" height="124" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;we get a main gui that has &lt;strong&gt;4.4Kb &lt;/strong&gt;of size and loads in &lt;strong&gt;618ms&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-sJvJCxm9_Rw/UbidJAt4PZI/AAAAAAAANkQ/iU4ntxObpFk/s1600-h/image%25255B90%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-KHj7DUx6RgU/UbidJrtEOFI/AAAAAAAANkY/sRpdwWkICWw/image_thumb%25255B30%25255D.png?imgmax=800" height="79" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;There is still some optimization room here since a lot of the 26 requests are for images which could be all served in one request:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-7tKpXGClNus/UbidKck38QI/AAAAAAAANkk/aGc_fNase8g/s1600-h/image%25255B96%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-cPgyqXPtdhk/UbidLYd4DOI/AAAAAAAANks/kExPgOIo2Ic/image_thumb%25255B32%25255D.png?imgmax=800" height="432" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-U_p6Ap_17qs/UbidMDoKGjI/AAAAAAAANkw/7pf6qJ7YUbw/s1600-h/image%25255B93%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-KflzK8m4n_4/UbidMygSSqI/AAAAAAAANk4/JtjTcbl2Gcw/image_thumb%25255B31%25255D.png?imgmax=800" height="432" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/M3K4_eCg9a0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/M3K4_eCg9a0/more-teammentor-ui-javascript-trace-and.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-o23WumK-VeQ/UbicuOV0iTI/AAAAAAAANe8/hw_-OINAHfc/s72-c/image_thumb%25255B4%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/more-teammentor-ui-javascript-trace-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-3053215643061600935</guid><pubDate>Wed, 12 Jun 2013 18:22:00 +0000</pubDate><atom:updated>2013-06-12T19:22:19.187+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>Opening up TeamMentor’s Javascript Trace Viewer which hooks TM method calls</title><description>If you are trying to debug (or understand) the TeamMentor’s Javascript layer, there are a number of debugging tools and options (in the &lt;strong&gt;&lt;em&gt;/Javascript/TM/Settings.js file&lt;/em&gt;&lt;/strong&gt;) that might help you:&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-NfmIK6PcNQU/UbideCFypKI/AAAAAAAANlE/ph0dggtXTcM/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-c1wEjNToazU/UbideqdISkI/AAAAAAAANlM/dHldIbzJ26A/image_thumb.png?imgmax=800" height="230" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In this post I’m going to mailing cover the &lt;b&gt;&lt;i&gt;TraceView&lt;/i&gt;&lt;/b&gt;&amp;nbsp;which is a pretty powerful way to view the UI events and methods executed (during normal UI interaction).&lt;br /&gt;&lt;br /&gt;The solution (skipped with TeamMentor) is based on the&amp;nbsp;&lt;a href="http://interlogy.com/~cigdem/trace/"&gt;http://interlogy.com/~cigdem/trace/&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-wgei9gUuCIs/Ubi47vyca-I/AAAAAAAACsQ/DXpeoZsdtoI/s1600/Screen+Shot+2013-06-12+at+19.07.22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-wgei9gUuCIs/Ubi47vyca-I/AAAAAAAACsQ/DXpeoZsdtoI/s1600/Screen+Shot+2013-06-12+at+19.07.22.png" height="352" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;... and on the&amp;nbsp;&lt;a href="http://blog.johnmckerrell.com/javascript-call-tracer/"&gt;http://blog.johnmckerrell.com/javascript-call-tracer/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-79xwGU9ZOFM/Ubi6FJ_iR_I/AAAAAAAACsk/sS0Fw2heZ1E/s1600/Screen+Shot+2013-06-12+at+19.11.40.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-79xwGU9ZOFM/Ubi6FJ_iR_I/AAAAAAAACsk/sS0Fw2heZ1E/s1600/Screen+Shot+2013-06-12+at+19.11.40.png" height="542" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;To access it in TeamMentor, the config settings to change are the &lt;strong&gt;&lt;em&gt;window.TM.Debug.show_DebugDiv&lt;/em&gt;&lt;/strong&gt; which is usually set to &lt;strong&gt;&lt;em&gt;false&lt;/em&gt;&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ZqbpnrOiE9w/UbidfV5_lEI/AAAAAAAANlQ/sz6AvXcYEhw/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-_me9-LRab3Y/Ubidf2mvH4I/AAAAAAAANlY/_zKmp-jbJpY/image_thumb%25255B6%25255D.png?imgmax=800" height="110" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="435" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;To kickstart things, &amp;nbsp;we are going to change the&amp;nbsp;&lt;em&gt;&lt;b&gt;show_DebugDiv&lt;/b&gt; value&lt;/em&gt;&amp;nbsp;to &lt;strong&gt;&lt;em&gt;true&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-6Py6i-KLvhQ/UbidgauEYBI/AAAAAAAANlg/sF9Ioh7NK5k/s1600-h/image%25255B18%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-gkD_Ut0Ezzk/Ubidg18ObTI/AAAAAAAANlo/GwJDR2r_L_g/image_thumb%25255B8%25255D.png?imgmax=800" height="110" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="435" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and rebuild the application (or restart the server), so that the cache mappings are cleared&lt;br /&gt;&lt;br /&gt;Next time TeamMentor opens up, you should see a little Table at the top:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-V6Vfm-zfJp8/UbidhhjqG9I/AAAAAAAANlw/GvBNZDJSDXg/s1600-h/image%25255B21%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-iQiishBtT0A/UbidiTFrNXI/AAAAAAAANl4/tWnVaa6ib74/image_thumb%25255B9%25255D.png?imgmax=800" height="268" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… which can be moved around:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-6ckJ_Y3QmQk/Ubidizfxz4I/AAAAAAAANmA/iHlUTECK7IU/s1600-h/image%25255B24%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-vAhtasWSMGw/UbidjRdEINI/AAAAAAAANmM/NyNxWTk4X44/image_thumb%25255B10%25255D.png?imgmax=800" height="268" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and gives you three links:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Open Trace View&lt;/strong&gt;  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Open Trace View (and hooks)&lt;/strong&gt;  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Setup Trace Hooks&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;Let’s look at the first one, and see what happens when the &lt;strong&gt;&lt;em&gt;Open Trace View&lt;/em&gt;&lt;/strong&gt; link is clicked&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-4jQdAqL3Dpw/UbidkD6my7I/AAAAAAAANmU/7EDDCgYFvFU/s1600-h/image%25255B27%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-WPIa2JnPvXQ/UbidkjBA87I/AAAAAAAANmY/Yiv8PU_F5pI/image_thumb%25255B11%25255D.png?imgmax=800" height="357" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... a larger version of the &lt;a href="http://interlogy.com/~cigdem/trace/"&gt;TraceViewer&lt;/a&gt; appears :)&lt;br /&gt;&lt;br /&gt;There are a number of ways to interact with this Trace Viewer:&lt;br /&gt;&lt;br /&gt;1) Syntax: &lt;em&gt;&lt;strong&gt;trace(‘…message….’)&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;&lt;a href="http://lh4.ggpht.com/-SoGFL2fw7gA/UbidlWKmtSI/AAAAAAAANmg/Xim3in0XAyY/s1600-h/image%25255B30%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-18zlgLeon3c/UbidlyfMLdI/AAAAAAAANms/s3WYATWww7Q/image_thumb%25255B12%25255D.png?imgmax=800" height="243" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;2) Syntax: &lt;strong&gt;&lt;em&gt;traceErr(“…message…”)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-Z6LEGGA6yfk/Ubidmcz1W2I/AAAAAAAANm0/SAkC-25-Cgo/s1600-h/image%25255B33%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-V1K_NE4k5c0/UbidnVgs4gI/AAAAAAAANm8/2lPaqY2DFSw/image_thumb%25255B13%25255D.png?imgmax=800" height="278" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;3) Syntax: &lt;strong&gt;traceArr([ .. javascript array.. ] );&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-gHq7cZupEF0/UbidoE9BTFI/AAAAAAAANnA/yyjw2DKYQTc/s1600-h/image%25255B36%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-trP7cDj1Ljs/UbidomFmP6I/AAAAAAAANnI/IiYTz5pMLIA/image_thumb%25255B14%25255D.png?imgmax=800" height="309" style="border-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;4) Syntax: &lt;strong&gt;&lt;em&gt;traceAssoc(… javascript object …)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-9K7h8c2qzPs/UbidpoaiX8I/AAAAAAAANnU/XFZwP2lBVnc/s1600-h/image%25255B39%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-JrBrVIdN9zk/Ubidqb0zErI/AAAAAAAANnY/doXi-ISXV8E/image_thumb%25255B15%25255D.png?imgmax=800" height="440" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;5) Syntax: &lt;strong&gt;&lt;em&gt;tracerInfo()&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-CBRZPRg8BOs/UbidrBr8tXI/AAAAAAAANnk/D91yJvZoWgY/s1600-h/image%25255B42%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-iM4qNeFnkmw/UbidtWg8dhI/AAAAAAAANns/8b5Yo-HkSwE/image_thumb%25255B16%25255D.png?imgmax=800" height="523" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;6) You can also access all these objects (without code complete) on the &lt;strong&gt;&lt;em&gt;Run JS&lt;/em&gt;&lt;/strong&gt; tab&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-GtigcLcXJ_A/Ubidt4UV3QI/AAAAAAAANnw/Cm4ZQCuOWcc/s1600-h/image%25255B46%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-fAuyzUyZO_s/UbidurS7ERI/AAAAAAAANn4/thqaUlcyx90/image_thumb%25255B18%25255D.png?imgmax=800" height="393" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="470" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...by typing the javascript to invoke on the TextArea and clicking on &lt;strong&gt;&lt;em&gt;Apply&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-cBuNPizdRMA/UbidvHslyoI/AAAAAAAANn8/20x6lqOrCQs/s1600-h/image%25255B50%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-JUiwCJLLJfo/UbidvigXgqI/AAAAAAAANoE/pKxTLPbuYl8/image_thumb%25255B20%25255D.png?imgmax=800" height="394" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="471" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;7) Another powerful feature is the &lt;strong&gt;&lt;em&gt;'Watch’&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; which will monitor the value contents of a particular HTML Element.&lt;br /&gt;&lt;br /&gt;For example this is how we can monitor the &lt;strong&gt;&lt;em&gt;Search&lt;/em&gt;&lt;/strong&gt; TextBox (note &lt;strong&gt;&lt;em&gt;Watching&lt;/em&gt;&lt;/strong&gt; label in red)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-L6k7vHWZYsY/Ubidwcly9iI/AAAAAAAANoM/9Q-_UdwpjvE/s1600-h/image%25255B54%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-jXCYiIP--Ew/Ubidw0oBUfI/AAAAAAAANoU/ibq8yL3GHvs/image_thumb%25255B22%25255D.png?imgmax=800" height="395" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="472" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...and now every time we enter a new value on the textbox we will get an trace message:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ZQy6j0LDJIE/UbidxreaOEI/AAAAAAAANog/CBzRT2e9AJQ/s1600-h/image%25255B57%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-N5dfmeBi6b8/UbidyCV0lgI/AAAAAAAANok/goreXqHTMUk/image_thumb%25255B23%25255D.png?imgmax=800" height="195" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Note if you want just the trace viewer to open automatically everytime TeamMentor’s main UI loads up, you can set the w&lt;strong&gt;&lt;em&gt;indow.TM.Debug.show_TraceView &lt;/em&gt;&lt;/strong&gt;value to true:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ZqbpnrOiE9w/UbidfV5_lEI/AAAAAAAANlQ/sz6AvXcYEhw/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-_me9-LRab3Y/Ubidf2mvH4I/AAAAAAAANlY/_zKmp-jbJpY/image_thumb%25255B6%25255D.png?imgmax=800" height="110" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="435" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Tracing events execution&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Ok, so now that we have this trace window open up, what can we do with it?&lt;br /&gt;&lt;br /&gt;As mentioned above, the &lt;a href="http://blog.johnmckerrell.com/javascript-call-tracer/"&gt;jscalltracer.js&lt;/a&gt;&amp;nbsp;is also part of TeamMentor, and&amp;nbsp;after a couple&lt;br /&gt;customizations, it is set-up to add hooks on the main TM Methods invocations (including&amp;nbsp;TM Events)&lt;br /&gt;&lt;br /&gt;To see this in action , in the ‘&lt;b&gt;&lt;i&gt;debug div&lt;/i&gt;&lt;/b&gt;’ click on the &lt;strong&gt;&lt;em&gt;Setup Trace Hooks &lt;/em&gt;&lt;/strong&gt;link&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-XYBOpYGlq88/UbidyiHEqhI/AAAAAAAANos/49PfUxGC3P4/s1600-h/image%25255B60%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-z5J2mFixlrI/UbidzRGQEGI/AAAAAAAANo0/Ep83qByMZ_g/image_thumb%25255B24%25255D.png?imgmax=800" height="195" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...after about 20sec (depending on your box)&lt;br /&gt;&lt;br /&gt;... you should see a number of &lt;b&gt;&lt;i&gt;‘hooking ...'&lt;/i&gt;&lt;/b&gt;&amp;nbsp;messages in the Trace Output:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-NyjJ8qCK1L8/Ubid0Yn7IQI/AAAAAAAANpA/c0uzNRg4mTs/s1600-h/image%25255B63%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-rhmd2GQkZj0/Ubid1ZSkxoI/AAAAAAAANpI/0pkLrsuMwtE/image_thumb%25255B25%25255D.png?imgmax=800" height="392" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;If you now do any UI action (like for example clicking on a View), you will see an number of &lt;i&gt;‘event’ messages&lt;/i&gt;&amp;nbsp;show up (note how they are shown in a Tree-like-format, which represent the call depth)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-m5npKpxJazU/Ubid2MYKjQI/AAAAAAAANpM/s9dYTig321o/s1600-h/image%25255B66%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-gK-sAeM6b7Y/Ubid297SFZI/AAAAAAAANpU/kJ5Eaw9g9kY/image_thumb%25255B26%25255D.png?imgmax=800" height="330" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;More examples of call traces:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1) events that fire when I clicked on the ‘remove filter’ button&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-CpzdzG8gVgg/Ubid3ZG2BQI/AAAAAAAANpc/2EhYmV_ige4/s1600-h/image%25255B69%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-GW8FbZREfUQ/Ubid4NqO2zI/AAAAAAAANpo/jhN3EJpbslE/image_thumb%25255B27%25255D.png?imgmax=800" height="419" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="541" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;2) event that fire when I clicked on an Article in the main Table:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-pqQVFeZ1d5Y/Ubid4jJTR9I/AAAAAAAANpw/0o350p-Eq6c/s1600-h/image%25255B72%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Gk9lvXbbT_E/Ubid5MbNtKI/AAAAAAAANp4/QqiEJmlBV-s/image_thumb%25255B28%25255D.png?imgmax=800" height="216" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;3) events that fire when I clicked on one of the metadata filters (in this case the &lt;strong&gt;&lt;em&gt;Apache&lt;/em&gt;&lt;/strong&gt; technology):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Ef9_TfXf9cw/Ubid6G1WTcI/AAAAAAAANp8/EHG4Oi9YAVA/s1600-h/image%25255B75%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-lC5x9YaFICw/Ubid7DFo67I/AAAAAAAANqI/l365ebu_EqI/image_thumb%25255B29%25255D.png?imgmax=800" height="449" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Finally, if you are debugging something that happens when TeamMentor loads up for the first time, you want to change the &lt;em&gt;&lt;strong&gt;callTrace_LoadEnvironment &lt;/strong&gt;and &lt;em&gt;&lt;strong&gt;callTrace_LoadEnvironment_Before_Gui &lt;/strong&gt;&lt;/em&gt;&lt;/em&gt;values&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Wj-_I-rdSA8/Ubid7rfTOcI/AAAAAAAANqQ/jFYdU18RaVw/s1600-h/image%25255B78%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-J1zMUW3Sd6Q/Ubid8bye92I/AAAAAAAANqU/lzcURG9UwP8/image_thumb%25255B30%25255D.png?imgmax=800" height="95" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...to true&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-DqSQoZKllBo/Ubid9Cv7rII/AAAAAAAANqc/PorTgIzr9D8/s1600-h/image%25255B90%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-rlJhXYQm9vU/Ubid9s_1u1I/AAAAAAAANqo/aME_vy9V6_U/image_thumb%25255B34%25255D.png?imgmax=800" height="121" style="border: 0px; display: inline;" title="image" width="457" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... so that you get all events &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-OreLOakjGBc/Ubid-evCVPI/AAAAAAAANqw/LD1vqxKwChE/s1600-h/image%25255B84%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-ouyQmNfejCs/Ubid_IBDPjI/AAAAAAAANq4/ejFK7jn3Uwk/image_thumb%25255B32%25255D.png?imgmax=800" height="383" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;...including the first main javascript call that triggers the rebuild of the entire GUI (if you set &lt;em&gt;&lt;strong&gt;callTrace_LoadEnvironment_Before_Gui&lt;/strong&gt;&lt;/em&gt;&amp;nbsp; to false, the first call captured occurs after the main GUI is loaded)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-qtKIpekvoPo/Ubid_7W8wDI/AAAAAAAANrE/1G-ny25Mg5M/s1600-h/image%25255B87%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-5KlV87niYvI/UbieAdmIU4I/AAAAAAAANrI/UDRPUDwgsV4/image_thumb%25255B33%25255D.png?imgmax=800" height="503" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="601" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/b7sNDjGGL2w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/b7sNDjGGL2w/opening-up-teammentors-javascript-trace.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-c1wEjNToazU/UbideqdISkI/AAAAAAAANlM/dHldIbzJ26A/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/opening-up-teammentors-javascript-trace.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-5882130541194155370</guid><pubDate>Tue, 11 Jun 2013 17:53:00 +0000</pubDate><atom:updated>2013-06-11T18:53:50.098+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><category domain="http://www.blogger.com/atom/ns#">UnitTests</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>Trying out NCrunch</title><description>Intrigued by Kofi’s &lt;a href="http://wimiro.com/blog/post/2013/04/18/NCrunch-and-TeamMentor.aspx"&gt;NCrunch and TeamMentor&lt;/a&gt; post, and since today I had to write a number of Unit Tests, I decided to give &lt;a href="http://www.ncrunch.net/"&gt;NCrunch&lt;/a&gt; a test drive.&lt;br /&gt;&lt;br /&gt;I downloaded the MSI, the install was smooth and next time I opened up VisualStudio there was a new NCrunch menu available:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-VGo4R1wdWh4/UbceDrJuxHI/AAAAAAAANU0/GIPUsZZaHFg/s1600-h/image6.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-VpZKi0nWfvo/UbceERzTmNI/AAAAAAAANU8/R9kgB54-x94/image_thumb7.png?imgmax=800" height="343" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So (with TeamMentor solution opened), I clicked on &lt;strong&gt;&lt;em&gt;Enable NCrunch&lt;/em&gt;&lt;/strong&gt;, and the Configuration Wizard appeared:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-4jFBf5CDsNc/UbceEy1mXSI/AAAAAAAANVA/deh7Obnb_2s/s1600-h/image16.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-xwSqAgQPcy8/UbceFtyJA3I/AAAAAAAANVM/rLnpFpbwsx8/image_thumb13.png?imgmax=800" height="282" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="338" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In the Max Processing Threads, I set the value to 10 (default was 1)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;UPDATE: I ended up adding another 3 processor to this VM and making this value 2&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-YxBe5Hc5h-g/UbceGMcsllI/AAAAAAAANVU/YNDMc4vbWes/s1600-h/image19.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-MzUabrwYYUg/UbceGrrhM9I/AAAAAAAANVY/fqti72L7Wgc/image_thumb14.png?imgmax=800" height="405" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="485" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In Engine&amp;nbsp;Optimisation&amp;nbsp;I chose the option to &lt;i&gt;‘Optimize for fastest test execution&lt;/i&gt;’ (default was the other one)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ndpWH41Qtgc/UbceHKSLlKI/AAAAAAAANVg/n7NMn8qM3uU/s1600-h/image22.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-IF-Mg55g42g/UbceH88eGWI/AAAAAAAANVs/Q5wAUbOkDI0/image_thumb15.png?imgmax=800" height="405" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="485" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Clicked next on this one:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-riVVzoh5xhk/UbceJiDtFSI/AAAAAAAANV0/Up_Tw4G2_ew/s1600-h/image25.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-qilefDOgknI/UbceLVHWBSI/AAAAAAAANV8/KqXugv0mpcU/image_thumb16.png?imgmax=800" height="405" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="485" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… in Parallel Test Execution, I chose to execute all tests in Parallel (default was No)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;UPDATE: I ended up changing this value back to 'NO'&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;a href="http://lh6.ggpht.com/-NZiSlLApUO8/UbceL6m7u9I/AAAAAAAANWE/WkFYEk-5L6c/s1600-h/image28.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-FALdn_LdbGE/UbceMvfre8I/AAAAAAAANWI/fPa0TFLgy08/image_thumb17.png?imgmax=800" height="405" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="485" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In Engine Execution Mode I chose the &lt;strong&gt;&lt;em&gt;‘Run my tests automatically when changes are detected’&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-ZWBQArnMr8s/UbceNLWKzcI/AAAAAAAANWU/Jogy_IEn5Vk/s1600-h/image31.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8r50zT7skU4/UbceNnOmFVI/AAAAAAAANWc/ayv7ctAKnJs/image_thumb18.png?imgmax=800" height="405" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="485" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;On Ignored tests, I chose the 2nd option to &lt;strong&gt;&lt;em&gt;Let my tests run&lt;/em&gt;&lt;/strong&gt; (default was the first)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-1PkmNKwimTU/UbceOTWaQvI/AAAAAAAANWk/7MAtI0Wsh5U/s1600-h/image34.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-LHLIv5nO2Kg/UbceO1lkflI/AAAAAAAANWo/xExxIyUkpFA/image_thumb19.png?imgmax=800" height="405" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="485" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After the final Next, this small NCrunch GUI showed up&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-aHkNXlqIjCY/UbcePUnXR8I/AAAAAAAANW0/ny_d9EreaoM/s1600-h/image37.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Y9HPY34U7oA/UbceQAhqUrI/AAAAAAAANW8/CSFVhC8Tku0/image_thumb20.png?imgmax=800" height="301" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;(ignoring the CPU Warning, which is actually something I need to on this VM), at the moment there is a build failure:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-1bhdDsf8GcY/UbceQzlOK1I/AAAAAAAANXE/42f9iPMGYBs/s1600-h/image40.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-BnsMOxM-0jY/UbceRU75yhI/AAAAAAAANXM/ZmHG2BfjDeg/image_thumb21.png?imgmax=800" height="301" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Which if we look at Kofi’s &lt;a href="http://wimiro.com/blog/post/2013/04/18/NCrunch-and-TeamMentor.aspx"&gt;NCrunch and TeamMentor&lt;/a&gt; post, the solution is to go to the Configuration option:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-cYd_af8R7mw/UbceSCXoz3I/AAAAAAAANXU/dhyfVGnIsZE/s1600-h/image46.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8kRUaO4pBJs/UbceSsxW_XI/AAAAAAAANXc/R9ZP4_XPHyg/image_thumb28.png?imgmax=800" height="283" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="360" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And add these additional files:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;UPDATE: I ended up just adding the PostSharp dir (in my efforts to improve the performance of NCrunch)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;a href="http://lh3.ggpht.com/-vGvTwdJOicI/UbceTeqC2rI/AAAAAAAANXk/os5fuI0dpxE/s1600-h/image49.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-xOEoiel5hTU/UbceT2m6NtI/AAAAAAAANXs/ibfNU7lz6VY/image_thumb29.png?imgmax=800" height="502" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="476" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;After that change the NCrunch window changed the status of the &lt;strong&gt;&lt;em&gt;TeamMentor.CoreLib&lt;/em&gt;&lt;/strong&gt; project:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-i99jWmHatmk/UbceUcnPhfI/AAAAAAAANXw/lvr-2Iy5I_Q/s1600-h/image52.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-wTYDRkRKKh8/UbceVBbOryI/AAAAAAAANX8/LD-4MN5hQNY/image_thumb30.png?imgmax=800" height="190" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;After about 1 minute, we now have a similar error on the &lt;strong&gt;&lt;em&gt;TeamMentor.UnitTests&lt;/em&gt;&lt;/strong&gt; project&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-6QdRLZ6zpcc/UbceVrjqqGI/AAAAAAAANYE/IdM2UEp_3qI/s1600-h/image55.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-eXjx2UpcOXw/UbceWDp1NiI/AAAAAAAANYM/CU-Fy5Cfmc4/image_thumb31.png?imgmax=800" height="186" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Which was resolved the same way (adding the extra NuGet packages folder)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;UPDATE: I had to also add the TM_Website folder (as in Kofi's example)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-uGymo-8x-fk/UbceWydWOlI/AAAAAAAANYU/y7knjNhyBSQ/s1600-h/image58.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-Vln50dpbFAY/UbceXQ32lxI/AAAAAAAANYc/hdXg4hlGN4E/image_thumb32.png?imgmax=800" height="186" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Now the Tests are being executed, and after a bit I got 16 tests that failed:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-q3fmQmOHcls/UbceYAQsOwI/AAAAAAAANYk/eLXm_v8KyTI/s1600-h/image61.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/--5idO46-h_A/UbceYwi3hOI/AAAAAAAANYs/kK7c6B9Nlkc/image_thumb33.png?imgmax=800" height="521" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;With a pretty cool mapping of the tests/lines that passed and failed:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-C32GSszZrek/UbceZaDrELI/AAAAAAAANY0/i8zBhYnPmOY/s1600-h/image64.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-Uj6nsUOfozs/UbceaIC1ErI/AAAAAAAANY8/cmW71lFAVtU/image_thumb34.png?imgmax=800" height="250" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Even better is the fact that the actual code (not the unit tests) also show the line coverage!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-WqGqN8jtyGw/Ubceah29MPI/AAAAAAAANZE/a9eYbSGn5uE/s1600-h/image67.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-Jo8ZxFhm15A/UbcebJo4dsI/AAAAAAAANZM/5WVbVIh-4F0/image_thumb35.png?imgmax=800" height="356" style="border-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;This is awesome!&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;What a great way to see what is currently being covered by tests and what is failing :)&lt;br /&gt;&lt;br /&gt;I really like this….&lt;br /&gt;&lt;br /&gt;Let’s see if it holds real development work :)&lt;br /&gt;&lt;br /&gt;First I’m going to shutdown ReSharper, which made my VisualStudio instance to go from 505Mbs of memory&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-izGTZjBgXQs/Ubceb4btPHI/AAAAAAAANZQ/oLEaqidm4zQ/s1600-h/image70.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-ylJdV2ukmdY/UbcecdSJ81I/AAAAAAAANZc/7NfsfWx80rM/image_thumb36.png?imgmax=800" height="139" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;to 270Mb&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Gp31IxRw2Ew/Ubcec70UcqI/AAAAAAAANZk/cuF570Jn1o8/s1600-h/image76.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-d9D5KdJhBLQ/Ubcedhk0WxI/AAAAAAAANZs/s5EghtvaBnA/image_thumb38.png?imgmax=800" height="133" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;HUMM....... problems....&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Warning: &lt;/strong&gt;I started using NCrunch with the set-up of only having one core in the VM , and it was just about UNUSABLE :(&lt;br /&gt;&lt;br /&gt;The GUI was hanging all the time, and I couldn’t even code a couple lines without being interrupted.&lt;br /&gt;&lt;br /&gt;After shutting down the VM and giving it a couple processors, it looks much better. &lt;br /&gt;&lt;br /&gt;Let’s see how it holds ...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;UPDATE: As you can see by the examples in the &lt;a href="http://blog.diniscruz.com/2013/06/changing-way-user-sessions-are-handled.html"&gt;Changing the way User Sessions are handled by TeamMentor (will be 3.3 Release HotFix 3)&lt;/a&gt;&amp;nbsp;post, I was able to&amp;nbsp;successfully&amp;nbsp;use NCrunch to create a number of UnitTests&lt;/i&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/bLbgOAZPe5I" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/bLbgOAZPe5I/trying-out-ncrunch.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-VpZKi0nWfvo/UbceERzTmNI/AAAAAAAANU8/R9kgB54-x94/s72-c/image_thumb7.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/trying-out-ncrunch.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-3454835372492715017</guid><pubDate>Tue, 11 Jun 2013 17:47:00 +0000</pubDate><atom:updated>2013-06-11T18:54:57.728+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">TeamMentor Security</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>Changing the way User Sessions are handled by TeamMentor (will be 3.3 Release HotFix 3)</title><description>One feature we introduced in TeamMentor 3.3 was the limitation of only allowing one user session to be active at any given time.&lt;br /&gt;&lt;br /&gt;This had the nice side effect of '&lt;i&gt;preventing user account reuse'&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;In practice, this meant that TM users had to stop using shared accounts (like the admin account), which was a good thing.&lt;br /&gt;&lt;br /&gt;But, it created nasty side effects where the user can only be logged in once across all its devices. And an even worse side-effect happened when we implemented a SSO solution for a client, and we realized that for the cases where there was one SSO token shared across multiple users, we would have to create an TM account per user session!&lt;br /&gt;&lt;br /&gt;So we went back to the &lt;a href="https://github.com/TeamMentor/Master/issues/344"&gt;Concurrent Logins Have Broken&lt;/a&gt;&amp;nbsp; issue, reopened it and changed it priority to P0 (which means that this will be another 3.3 HotFix)&lt;br /&gt;&lt;br /&gt;The rest of this post shows the workflow that I took when making the code 3.3 HotFix #3 changes, testing them and pushing the new version to GitHub.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Going from one active session to multiple active sessions&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;This is quite a significant change to TeamMentor, and one that will really push the UnitTests usage to its limits.&lt;br /&gt;&lt;br /&gt;Since there were a number of code changes that needed to be made (which would affect both TM user session behavior and the methods available), my first step was to actually make the changes to the backend TeamMentor.CoreLib.dll:&lt;br /&gt;&lt;br /&gt;New &lt;strong&gt;&lt;em&gt;UserSession&lt;/em&gt;&lt;/strong&gt; class:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-VcQy247lrts/Ubc-FcpGbVI/AAAAAAAANZ8/CNy6SH4WOms/s1600-h/image5.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-3lkb3qvVePo/Ubc-GNPIFaI/AAAAAAAANaE/WiApjVTtLiU/image_thumb1.png?imgmax=800" height="211" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;New &lt;strong&gt;&lt;em&gt;Sessions&lt;/em&gt;&lt;/strong&gt; object in the main &lt;strong&gt;&lt;em&gt;TMUser&lt;/em&gt;&lt;/strong&gt; class:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-fIWYxl18cEM/Ubc-GzCpe6I/AAAAAAAANaM/IKLPRxD6FvI/s1600-h/image8.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-NrwZ6qYZ_YM/Ubc-HUIdEQI/AAAAAAAANaU/nlnwUS1jhtg/image_thumb2.png?imgmax=800" height="82" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;An extension method to add a new session to a user object:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-22E9UBwHBLQ/Ubc-ISmk_xI/AAAAAAAANac/sNzlD-rOuNQ/s1600-h/image16.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-cbTroAGxykA/Ubc-I-gqrDI/AAAAAAAANak/GzvX9ojOh0g/image_thumb6.png?imgmax=800" height="257" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="449" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And an extension method to remove a session from a user object&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Ya8k6ohzC44/Ubc-Jk2tUfI/AAAAAAAANas/0SJS7qtDSz0/s1600-h/image15.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-n378kztP5tI/Ubc-KNiSpgI/AAAAAAAANa0/OYcF7jN1FEs/image_thumb5.png?imgmax=800" height="159" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Once I had these code changes and the entire solution was compiling (with some minor changes to existing UnitTests), I committed them using:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-Yu3sX6V0oVY/Ubc-MR582oI/AAAAAAAANa8/jNLwtznTFr8/s1600-h/image2.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-w1NoeekQqDY/Ubc-NfSGn-I/AAAAAAAANbA/wl5Ntmdu1Lg/image_thumb.png?imgmax=800" height="455" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Next I executed the existing UnitTest (note that I will still add a number of tests focused on the expected new multiple SessionId behaviour)&lt;br /&gt;&lt;br /&gt;The good news is that there are only a couple broken tests:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-VYMihHErc5Q/Ubc-Od7a2-I/AAAAAAAANbI/hRro_HycPX4/s1600-h/image25.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-EQIE5Oz3NPk/Ubc-PkL5XyI/AAAAAAAANbU/6CEZoHTnFAQ/image_thumb9.png?imgmax=800" height="394" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;With the errors that matter being the ones in the &lt;strong&gt;&lt;em&gt;Test_Users_Sessions &lt;/em&gt;&lt;/strong&gt;class&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-6ni7HBbfNT4/Ubc-QSH6wbI/AAAAAAAANbc/k3owAypcVzY/s1600-h/image28.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-BSUR4-DkTC8/Ubc-RHDIkFI/AAAAAAAANbk/KzrJ16OfPKk/image_thumb10.png?imgmax=800" height="164" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The changes were quite minor, and after a bit I had all tests running again:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-PKRPwBX-EM0/Ubc-RuWWzmI/AAAAAAAANbs/G5MfmcnNaJU/s1600-h/image31.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-mx-NWtU-Pwg/Ubc-SuHOHCI/AAAAAAAANb0/VScwq59_IbE/image_thumb11.png?imgmax=800" height="240" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Now it was time to add Tests to check for the new UserSession class and the ability to have multiple sessions happening at the same time&lt;br /&gt;&lt;br /&gt;At this stage I’ve installed NCrunch (see &lt;a href="http://blog.diniscruz.com/2013/06/trying-out-ncrunch.html"&gt;Trying out NCrunch&lt;/a&gt;) and I’m going to try to use it to create these tests.&lt;br /&gt;&lt;br /&gt;I started with this one:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Tsq5y_YlXHI/Ubc-TNBQnCI/AAAAAAAANb8/-OFhwfVqpK8/s1600-h/image%25255B3%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-oETrpvk1QCQ/Ubc-Tr4jlpI/AAAAAAAANcE/-yW5niXRJZ0/image_thumb%25255B1%25255D.png?imgmax=800" height="150" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="614" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And ended up with a nice number of tests that covered a wide range of scenarios, while fixing a couple bugs with the original implementation of the new session code (see if you can stop them):&lt;br /&gt;&lt;br /&gt;UnitTest:&amp;nbsp;&lt;strong&gt;UserSession_Object&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-IHhBiT7wsxU/Ubc-UvTfbKI/AAAAAAAANcM/aNIl5WL1YKQ/s1600-h/image%25255B6%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-RRYZaMLySYI/Ubc-VTCSTiI/AAAAAAAANcU/qBGJQE-jMaE/image_thumb%25255B2%25255D.png?imgmax=800" height="485" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;UnitTest:&amp;nbsp;&lt;strong&gt;ResetSessions&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://lh5.ggpht.com/-pjLuRlQ3YWQ/Ubc-WRYIMTI/AAAAAAAANcc/iK8Cyf6yqqo/s1600-h/image%25255B12%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-7pPTh8K3qU0/Ubc-XXiUYHI/AAAAAAAANck/DO1KBteh4DI/image_thumb%25255B4%25255D.png?imgmax=800" height="456" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;UnitTest:&amp;nbsp;&lt;strong&gt;MultipleLoginSessions_Two_Users&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-xW57w-BrePk/Ubc-Yf_qB8I/AAAAAAAANcs/_HFp2wc4uhk/s1600-h/image%25255B15%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-U2hrS7scYcQ/Ubc-ZPnZ6CI/AAAAAAAANc0/LEBX6JeEJ1s/image_thumb%25255B5%25255D.png?imgmax=800" height="518" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;UnitTest:&amp;nbsp;&lt;strong&gt;MultipleLoginSessions_One_User&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-kUOu-yyy7OA/Ubc-aEvOmjI/AAAAAAAANc8/tKNldPK853w/s1600-h/image%25255B18%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-5-BykRYwXNw/Ubc-bSR_JlI/AAAAAAAANdE/1GbtdaabUd0/image_thumb%25255B6%25255D.png?imgmax=800" height="584" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Now that it all looks good, I’m going to (for the first time) fire up a browser, and try it out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-hrK-A0h18O8/Ubc-cLrJakI/AAAAAAAANdM/dKFWIRn9cv4/s1600-h/image%25255B21%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-UP0zYPeERlc/Ubc-cwFaFWI/AAAAAAAANdU/_20hyJ68oiU/image_thumb%25255B7%25255D.png?imgmax=800" height="239" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And it works :) &lt;br /&gt;&lt;br /&gt;The image above shows two chrome sessions (one normal and one in incognito mode), both logged in as the user &lt;strong&gt;admin &lt;/strong&gt;(before this would had logged out the first browser session (since there could only be one valid user session)).&lt;br /&gt;&lt;br /&gt;A quick look at the admin user’s xml also confirms that there are two sessions in there:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ayHPvnw1SKI/Ubc-d3xN8-I/AAAAAAAANdc/7kHu9ZCCwGY/s1600-h/image%25255B24%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-bLE9xcEuSCI/Ubc-e57JPlI/AAAAAAAANdk/6kdAV0qV6y8/image_thumb%25255B8%25255D.png?imgmax=800" height="304" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And if we logout from one of the browser sessions:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-TaOIqqeyJKU/Ubc-ftE3JaI/AAAAAAAANdo/HbPrJxFijYo/s1600-h/image%25255B27%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-fSn_m3H7XWg/Ubc-gD78ohI/AAAAAAAANd0/CXaro5jYRxM/image_thumb%25255B9%25255D.png?imgmax=800" height="109" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… the User’s xml file will now only contain one Session item (and note the extra &lt;strong&gt;&lt;em&gt;User Activity&lt;/em&gt;&lt;/strong&gt; line with an &lt;strong&gt;&lt;em&gt;User Logout &lt;/em&gt;&lt;/strong&gt;entry)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-yIlIwevOV24/Ubc-hD67wgI/AAAAAAAANd8/Lqmi023xjF8/s1600-h/image%25255B30%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-3BcMkZVxyVA/Ubc-iPkEaXI/AAAAAAAANeE/X3Re8ZB13GE/image_thumb%25255B10%25255D.png?imgmax=800" height="306" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which is the exact behavior that we want :)&lt;br /&gt;&lt;br /&gt;So the final steps are to commit the changes:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-yvt0a_GCgVc/Ubc-jBBsMoI/AAAAAAAANeM/N7d_2qh4eyE/s1600-h/image%25255B33%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-gPV3jH-7YRA/Ubc-j4ITTyI/AAAAAAAANeU/5A_AvpdxHl0/image_thumb%25255B11%25255D.png?imgmax=800" height="400" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... push the changes to the main TeamMentor/Master repository&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-qJPGeLDopRA/Ubc-kshkVMI/AAAAAAAANec/_H82pgKWMDs/s1600-h/image%25255B36%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-26Qz1R7pRZY/Ubc-lCQUnlI/AAAAAAAANek/xTCedwr9sXM/image_thumb%25255B12%25255D.png?imgmax=800" height="130" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="614" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... and ping the QA team to take a look at it&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/5nyayLRQYy0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/5nyayLRQYy0/changing-way-user-sessions-are-handled.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-3lkb3qvVePo/Ubc-GNPIFaI/AAAAAAAANaE/WiApjVTtLiU/s72-c/image_thumb1.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/changing-way-user-sessions-are-handled.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-1740010147238053318</guid><pubDate>Tue, 11 Jun 2013 00:26:00 +0000</pubDate><atom:updated>2013-06-11T01:26:07.352+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">GitHub</category><category domain="http://www.blogger.com/atom/ns#">TeamCity</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>Fixing a couple bugs and pushing new TeamMentor 3.4 Dev Version (from 4 to 5)</title><description>This post shows one way to use GitHub to update the main development branch of TeamMentor.&lt;br /&gt;&lt;br /&gt;At the moment &lt;a href="https://github.com/TeamMentor/Dev"&gt;TeamMentor/Dev&lt;/a&gt; repo&amp;nbsp; is at version &lt;b&gt;&lt;i&gt;3.3 – Dev 4 &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh4.ggpht.com/-FyaB8ZU4cTM/UbZt22HCE0I/AAAAAAAANS8/qJ7v65Mkrs0/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-YM0yVpaGxXs/UbZt3TwpCYI/AAAAAAAANTE/JjR5e1rDJb0/image_thumb.png?imgmax=800" height="267" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This version was pushed on Friday, and it introduced a nasty side effect on the wsdl generation (see issue &lt;a href="https://github.com/TeamMentor/Master/issues/546"&gt;546&lt;/a&gt;) and a minor bug in the user edit (from the old control panel).&lt;br /&gt;&lt;br /&gt;Both probs were picked up by Michael’s TM UI Unit Tests, which is another good example of the power of that type of UI/Browser integration tests.&lt;br /&gt;&lt;br /&gt;So, I went into my local dev repo, made the code fixes, checked that they were working and executed all unit tests (to make sure we are still good) &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-rSJtmhkqWUU/UbZt4NwvO2I/AAAAAAAANTM/CRErP8RukhM/s1600-h/image%25255B6%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-d6W0oYhlUxc/UbZt4yEYQSI/AAAAAAAANTU/KMZfXvOW80Y/image_thumb%25255B2%25255D.png?imgmax=800" height="406" style="border: 0px; display: inline;" title="image" width="467" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Next I committed the changes locally:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-0Ti7ydbC0ZE/UbZt5ocZ-7I/AAAAAAAANTc/WKbtsmA6-88/s1600-h/image%25255B9%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-aIfDTzF3E-M/UbZt6O3ycMI/AAAAAAAANTk/W7p-CdAqIuY/image_thumb%25255B3%25255D.png?imgmax=800" height="431" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;And pushed the commit to the main Dev repo and my personal Dev repo (this is the same as doing a Pull Request and&amp;nbsp;authorising&amp;nbsp;it via the GUI):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-BbPmOxB2dPo/UbZt6o-6RwI/AAAAAAAANTs/xibTZr8xC4c/s1600-h/image%25255B13%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-RZXVMEz_H98/UbZt7dFH5CI/AAAAAAAANT0/81b_vl48JW4/image_thumb%25255B5%25255D.png?imgmax=800" height="185" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="486" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Since TeamCity is configured to run on commit the master branch of TeamMentor/Dev a quick look at its web interface shows that the build started&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-c0ScL-5K6F8/UbZt8H9Y9gI/AAAAAAAANT8/v864uitXW1s/s1600-h/image%25255B16%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-qurWjf9HmhE/UbZt8v383FI/AAAAAAAANUE/jkugMiR75A8/image_thumb%25255B6%25255D.png?imgmax=800" height="65" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... after 4m:13s the build was completed, with all unit tests are passed and &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-Q8rA_CZM8XA/UbZt9BZtf7I/AAAAAAAANUM/-QUgyq6It1o/s1600-h/image%25255B19%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-EzhbWkCPuWc/UbZt9lWkkaI/AAAAAAAANUU/OcM9PVl0m30/image_thumb%25255B7%25255D.png?imgmax=800" height="53" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and the Dev QA site pushed into Azure:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-GnepPKRDZuU/UbZt-HP-tHI/AAAAAAAANUc/JPpzReWTtBQ/s1600-h/image%25255B22%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-jhZdyOymCiM/UbZt-3F3PBI/AAAAAAAANUk/o9GtkVF2_Uo/image_thumb%25255B8%25255D.png?imgmax=800" height="310" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/RvOQGK9gAxk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/RvOQGK9gAxk/fixing-couple-bugs-and-pushing-new.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-YM0yVpaGxXs/UbZt3TwpCYI/AAAAAAAANTE/JjR5e1rDJb0/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/fixing-couple-bugs-and-pushing-new.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-8530756488264475307</guid><pubDate>Tue, 11 Jun 2013 00:12:00 +0000</pubDate><atom:updated>2013-06-11T01:12:23.389+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CodingLab</category><title>The day CodingLab.org was born </title><description>After brainstorming about the idea of &lt;a href="http://blog.diniscruz.com/2013/06/open-library-for-my-raspberrypi-arduino.html"&gt;'Open Library' for my RaspberryPi, Arduino, BeagleBone, Pyhton, CodeClub books and materials on the Chiswick High Road&lt;/a&gt;&amp;nbsp;with Sarah (my wife), she come up with the name of &lt;i style="font-weight: bold;"&gt;Coding Lab&lt;/i&gt;&lt;i&gt;,&lt;/i&gt;&amp;nbsp;as a better way to present the concept to local venues (with the added idea of doing regular/monthly lab sessions in there).&lt;br /&gt;&lt;br /&gt;So I:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;did a quick DNS search, &amp;nbsp;&lt;/li&gt;&lt;li&gt;found that CodingLab.org was available,&amp;nbsp;&lt;/li&gt;&lt;li&gt;registered it,&amp;nbsp;&lt;/li&gt;&lt;li&gt;created a GitHub repository for it&amp;nbsp;&lt;a href="https://github.com/O2platform/CodingLab"&gt;https://github.com/O2platform/CodingLab&lt;/a&gt;&lt;/li&gt;&lt;li&gt;added some GitHub Pages&lt;/li&gt;&lt;/ul&gt;and voila, here is the very first version of:&amp;nbsp;&lt;a href="http://codinglab.org/"&gt;http://CodingLab.org&lt;/a&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-c-1t6jKmg2Y/UbZqRttCe4I/AAAAAAAACr8/plxG77e1pP0/s1600/Screen+Shot+2013-06-11+at+01.02.46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-c-1t6jKmg2Y/UbZqRttCe4I/AAAAAAAACr8/plxG77e1pP0/s1600/Screen+Shot+2013-06-11+at+01.02.46.png" height="424" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next step is to see if one of the local&amp;nbsp;cafes/restaurants wants to be involved&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/nnjc8F70a0k" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/nnjc8F70a0k/the-day-codinglaborg-was-born.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-c-1t6jKmg2Y/UbZqRttCe4I/AAAAAAAACr8/plxG77e1pP0/s72-c/Screen+Shot+2013-06-11+at+01.02.46.png" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/the-day-codinglaborg-was-born.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-2028464896556340166</guid><pubDate>Mon, 10 Jun 2013 23:52:00 +0000</pubDate><atom:updated>2013-06-11T00:52:41.481+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">GitHub</category><category domain="http://www.blogger.com/atom/ns#">TeamMentor</category><title>Creating TeamMentor release 3.3.2 (3.2 version with HotFix 2)</title><description>Now that the two P0 issues are marked as fixed (after a round of QA):&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-gzhYcOmYzj4/UbYENSQZSfI/AAAAAAAANLk/VqSTjwzITGg/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-pQcu-QtBYtE/UbYENxp9NaI/AAAAAAAANLs/6NZOezCvV9w/image_thumb.png?imgmax=800" height="247" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;It's time to publish the 3.3.2 TeamMentor release.&lt;br /&gt;&lt;br /&gt;At the moment the code changes are in the 3_3_2_HotFix branch&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-3T4jAor04gQ/UbYEOa6MOzI/AAAAAAAANL0/oI9EACIMwVc/s1600-h/image%25255B5%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-WYmYk0QN_9U/UbYEO2vzF2I/AAAAAAAANL8/QC9iRTqejfA/image_thumb%25255B1%25255D.png?imgmax=800" height="163" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Which contains the commits that made up the&lt;b&gt;&lt;i&gt; 3.3.2 – RC2 &lt;/i&gt;&lt;/b&gt;version (with the last commit being the &lt;strong&gt;&lt;em&gt;852d877290&lt;/em&gt;&lt;/strong&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-nuHgsNyK-CY/UbYEPYp5Q5I/AAAAAAAANME/QAF5xCaAS1U/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-QJ45rFU0KLI/UbYEP52aORI/AAAAAAAANMM/icwr_XI9uEk/image_thumb%25255B2%25255D.png?imgmax=800" height="209" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;As set in our release process, to make this the official official version, I will remove the &lt;strong&gt;RC2&lt;/strong&gt; bit from the version number and make it the final commit for this release.&lt;br /&gt;&lt;br /&gt;So I opened a Git Bash on a local copy of that repo TeamMentor/Master (same thing as doing a git clone and pull of the 3_3_2_HotFix branch)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-noDu7rAjiCs/UbYERk_QECI/AAAAAAAANMk/h_N0f9GpjC4/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-k2dzHAHSzxY/UbYESZxLIGI/AAAAAAAANMs/N-DM7ryEmUU/image_thumb%25255B4%25255D.png?imgmax=800" height="319" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;A quick look using &lt;strong&gt;&lt;em&gt;git log --decorate --graph --oneline --date-order &lt;/em&gt;&lt;/strong&gt;shows that the latest commit is &lt;strong&gt;852d877 &lt;/strong&gt;(which matches the version at GitHub that was QAed and checked for this release)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-E68XNbudCtY/UbYESwHv0eI/AAAAAAAANM0/eFFf4UDW-Sw/s1600-h/image%25255B23%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-evM4zEdMetc/UbYETX-40CI/AAAAAAAANM8/YOLM8guggQ8/image_thumb%25255B7%25255D.png?imgmax=800" height="214" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;My next steps was to change the version number,&lt;br /&gt;&lt;br /&gt;... commit that small change:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-Lfl9q3Vov6M/UbYEUP2bpGI/AAAAAAAANNE/WXUi72xutE0/s1600-h/image%25255B26%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-ZEAZcIMKCDA/UbYEUkhYv7I/AAAAAAAANNM/Jurk4KFsCVo/image_thumb%25255B8%25255D.png?imgmax=800" height="293" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... add the v3.3.2 tag (see &lt;a href="https://www.blogger.com/blog.diniscruz.com/2012/10/adding-tags-to-teammentor-master.html"&gt;Adding Tags to TeamMentor Master repository&lt;/a&gt; for more details on tagging)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-1N3C9BGD3SU/UbYEVETLi4I/AAAAAAAANNQ/CmsEOpNg4Iw/s1600-h/image%25255B29%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-0oELmUYtKGE/UbYEVqQh34I/AAAAAAAANNY/mGlmsfDtViM/image_thumb%25255B9%25255D.png?imgmax=800" height="37" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="546" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and pushed into TeamMentor/Master the commit and tag:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-gHrHEVjNI7c/UbYEWKcuvmI/AAAAAAAANNk/KDgnClKP-ys/s1600-h/image%25255B32%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-noD3Y7eiYHk/UbYEW5bMcBI/AAAAAAAANNs/jDWKkdJ2rmA/image_thumb%25255B10%25255D.png?imgmax=800" height="205" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="562" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Just to confirm, let’s take a look at GitHub:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Main page shows the 3.3.2 commit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-0TEDFvSaxr8/UbYEXTAA-2I/AAAAAAAANN0/UR0eNFhmjWA/s1600-h/image%25255B35%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-SSkWp9m4-HQ/UbYEX5BwB4I/AAAAAAAANN8/3gpYYSA5X2U/image_thumb%25255B11%25255D.png?imgmax=800" height="259" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… so does the &lt;b&gt;commit page&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-1hOrxsEGb0Q/UbYEYX0o99I/AAAAAAAANOA/Eb1IlqVwcU8/s1600-h/image%25255B38%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-N8sBORUQcKY/UbYEYzk4ESI/AAAAAAAANOM/R_mIjlg3gLw/image_thumb%25255B12%25255D.png?imgmax=800" height="259" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;… and the &lt;b&gt;Tags view&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-P3qpi5fGSe8/UbYEZZl6LCI/AAAAAAAANOU/x7IEQVVgWv8/s1600-h/image%25255B41%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-77vOWLMfMFM/UbYEaHr4O9I/AAAAAAAANOc/d1pHSgfMgzA/image_thumb%25255B13%25255D.png?imgmax=800" height="254" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;…and the &lt;b&gt;Network&lt;/b&gt; graph:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-Tyd28t_SYb4/UbYEatAeqnI/AAAAAAAANOk/LPBrZv5hfVU/s1600-h/image%25255B44%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-D-9sew7qDOI/UbYEbJ128XI/AAAAAAAANOs/2jPPJF0Vbnc/image_thumb%25255B14%25255D.png?imgmax=800" height="264" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The deployment of this version is now passed to the hands of the Infrastructure team, which will update all TM sites currently managed by SI.&lt;br /&gt;&lt;br /&gt;On the development side, the last thing to do, is to add this version to the TeamMentor/Dev fork so that it is part of the next release&lt;br /&gt;&lt;br /&gt;At the moment TeamMentor/Dev is on this commit&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-TvQwf8uZpHE/UbYEb7kULbI/AAAAAAAANO0/vIweC6vZtOY/s1600-h/image%25255B47%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-R7zfU0IWU-Q/UbYEcbd_yRI/AAAAAAAANO8/UVpLDKfaYac/image_thumb%25255B15%25255D.png?imgmax=800" height="310" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In a local copy of the this repo, I did a pull from TeamMentor/Master&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-ZI9sPbIHfX8/UbYEc9ednyI/AAAAAAAANPE/JLcSZnHQNyY/s1600-h/image%25255B50%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-vu-VDagSyQw/UbYEdYK6iCI/AAAAAAAANPM/NKMwAfYB48c/image_thumb%25255B16%25255D.png?imgmax=800" height="131" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="641" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which failed (on master) because there has been updates done on this repo (since the last merge).&lt;br /&gt;&lt;br /&gt;So I created a new branch called &lt;strong&gt;&lt;em&gt;3_3_2_merge&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://lh6.ggpht.com/-Dc1qTb1Rkjk/UbYEdy4QWWI/AAAAAAAANPU/XXv7igVa6nQ/s1600-h/image%25255B53%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-jTDm8ihYJiE/UbYEeTUqAFI/AAAAAAAANPc/-QeSMdNHbFM/image_thumb%25255B17%25255D.png?imgmax=800" height="49" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="617" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Forced pulled &lt;/b&gt;the 3.3.2 code into it (the code from TeamMentor/Master)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-msK_5j4PGzA/UbYEe-vv1wI/AAAAAAAANPk/4A7kztOH_m4/s1600-h/image%25255B56%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-dmerg-_UNuw/UbYEff7do7I/AAAAAAAANPo/SHtvFuPC2ik/image_thumb%25255B18%25255D.png?imgmax=800" height="122" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="605" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;switch back into master branch and merged with &lt;b&gt;&lt;i&gt;3_3_2_merge&lt;/i&gt;&lt;/b&gt; branch&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-2bHSht42cRM/UbYEf4h_rHI/AAAAAAAANPw/5TfPM6ptt8A/s1600-h/image%25255B59%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-8VAzk3kiURg/UbYEgrYH_FI/AAAAAAAANP8/XxdeV5hsUNE/image_thumb%25255B19%25255D.png?imgmax=800" height="170" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;…which had (as expected) a couple conflicts), with I’m going to resolve using&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-EbfXNa4DJSE/UbYEheRv_qI/AAAAAAAANQE/dXEyqO6x1VA/s1600-h/image%25255B63%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-Wg9YoWMlaKM/UbYEh41vY9I/AAAAAAAANQM/eVFTUw8SJ8Q/image_thumb%25255B24%25255D.png?imgmax=800" height="391" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;… which lists the conflicts&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-3AQH-cR-QkA/UbYEiuqWy2I/AAAAAAAANQU/fxZyLyo-eOA/s1600-h/image%25255B66%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-Cs3Akxq91kE/UbYEjFd1IoI/AAAAAAAANQc/GSDR4coffEU/image_thumb%25255B25%25255D.png?imgmax=800" height="271" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and in this case was mainly the version number:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-8tE3oMTjd0o/UbYEj2EFj8I/AAAAAAAANQk/csDM5wIK3AY/s1600-h/image%25255B69%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh3.ggpht.com/-VaITxCWFfj4/UbYEkRiL6PI/AAAAAAAANQs/IWhuEenC8Mc/image_thumb%25255B26%25255D.png?imgmax=800" height="311" style="border: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... easily fixed by making the local version the one to use:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-JLz4C4nDxi4/UbYElIBd8aI/AAAAAAAANQ0/ylkwkwVgm-Q/s1600-h/image%25255B75%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-EZub9rd3VFw/UbYElj73ORI/AAAAAAAANQ8/gyIsot8aA80/image_thumb%25255B28%25255D.png?imgmax=800" height="311" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... next I resolved the dlls by selecting one of them (doesn’t really mater since they will be recompiled soon)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ZqLi8OypTcY/UbYEmVaQVqI/AAAAAAAANRE/HoEvkXlj-68/s1600-h/image%25255B82%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-sCu4GFbBD0g/UbYEm7bM8qI/AAAAAAAANRM/LlfF0a8x0rc/image_thumb%25255B38%25255D.png?imgmax=800" height="263" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and commited the merge: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-SHEe5E0mysY/UbYEnm0nrMI/AAAAAAAANRU/aKv3UcqeX74/s1600-h/image%25255B85%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-qeTeABysH54/UbYEo0u6v8I/AAAAAAAANRc/w5rbypvlzyo/image_thumb%25255B39%25255D.png?imgmax=800" height="437" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;....which we can now see on Gitk:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-ppTTMinlLk0/UbYEpdk48zI/AAAAAAAANRk/4KeOYxhEdEo/s1600-h/image%25255B88%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-jEEcIkaD5oQ/UbYEp3ZjAVI/AAAAAAAANRs/g8Nw_bxtBN4/image_thumb%25255B40%25255D.png?imgmax=800" height="309" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The final step is to push these commits into TeamMentor/Dev&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-19m5DinR2x0/UbYEqd5y9eI/AAAAAAAANRw/KtUQUGX4u7U/s1600-h/image%25255B94%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-MBwxrJRtI5I/UbYEq3aKV1I/AAAAAAAANR8/70yp21XghXQ/image_thumb%25255B42%25255D.png?imgmax=800" height="118" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="601" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;.... which can be seen on the following couple graphs:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-SziV3O9u_aI/UbYErX-G2II/AAAAAAAANSE/16CnEfmEjTE/s1600-h/image%25255B97%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-ivF8AgawVSc/UbYEryyHalI/AAAAAAAANSM/KiL2N5rnC1I/image_thumb%25255B43%25255D.png?imgmax=800" height="294" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;The image above shows the TeamMentor/Dev commit done before the 3.3.2 merge, and below is the last commit made&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-Y-upW72zgNU/UbYEsdHxcaI/AAAAAAAANSU/QATq3S-OSZM/s1600-h/image%25255B100%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-Dg-sarTmzNU/UbYEs6lg7SI/AAAAAAAANSc/nSfY9BEoI0c/image_thumb%25255B44%25255D.png?imgmax=800" height="294" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;It might be easier to read with out the labels (in blue is the &lt;strong&gt;&lt;em&gt;TeamMentor/Dev&lt;/em&gt;&lt;/strong&gt; code in black is the&lt;strong&gt;&lt;em&gt; TeamMentor/Master&lt;/em&gt;&lt;/strong&gt; code:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-VS91v5qkEGg/UbYEteluIaI/AAAAAAAANSk/cCvQw8S4v4g/s1600-h/image%25255B103%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-aoQNbrcS5lQ/UbYEuD4rwBI/AAAAAAAANSs/x5P0tV80U4w/image_thumb%25255B45%25255D.png?imgmax=800" height="294" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/v6Me26xc64Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/v6Me26xc64Y/creating-teammentor-release-332-32.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-pQcu-QtBYtE/UbYENxp9NaI/AAAAAAAANLs/6NZOezCvV9w/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/creating-teammentor-release-332-32.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7720103117837584183</guid><pubDate>Mon, 10 Jun 2013 10:22:00 +0000</pubDate><atom:updated>2013-06-10T11:51:16.357+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Code Cafe</category><category domain="http://www.blogger.com/atom/ns#">Code Club</category><category domain="http://www.blogger.com/atom/ns#">Half-baked Idea</category><title>'Open Library' for my RaspberryPi, Arduino, BeagleBone, Pyhton, CodeClub books and materials on the Chiswick High Road</title><description>Yesterday I '&lt;i&gt;dropped&lt;/i&gt;' 10 Python books to a friend's kid house with a '&lt;i&gt;take a look at these books and pick one that make sense to you&lt;/i&gt;' workflow (they are trying to use a RaspeberryPI and learn how to code in Python)&lt;br /&gt;&lt;br /&gt;Later that day one of the kids asked me&amp;nbsp;&lt;i&gt;'... can we keep two?..' ,&amp;nbsp;&lt;/i&gt;which is always a good sign :)&lt;br /&gt;&lt;br /&gt;This got me thinking that that some of my books (I have lot of them) deserve to be shared with more kids :)&lt;br /&gt;&lt;br /&gt;Maybe I could have them '&lt;i&gt;somewhere&lt;/i&gt;' on the local&amp;nbsp;Chiswick&amp;nbsp;High Road (West London) as a kind of '&lt;i&gt;Public Geek Library&lt;/i&gt;' for kids (and adults).&lt;br /&gt;&lt;br /&gt;This could also be a great location to put information about&amp;nbsp;&lt;a href="http://codeclub.org.uk/"&gt;CodeClub&lt;/a&gt;&amp;nbsp;and examples of what I'm creating with the kids that I am teaching every Wednesday.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;Some draft thoughts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;At first, it is probably better if the books stay in that location&lt;/li&gt;&lt;li&gt;This makes sense to be on a coffee shop, or a bookstore close-to/with a coffee shop&lt;/li&gt;&lt;li&gt;The logic would be that the kids would stop by (with their parents) and read the books for a while (to get some ideas)&lt;/li&gt;&lt;li&gt;Maybe if there is a photocopier around, the kids could take some copies home&amp;nbsp;&lt;/li&gt;&lt;li&gt;Ideally the parents would buy the books that are popular with theirs kids&lt;/li&gt;&lt;li&gt;Maybe if there is a sponsor, we can just buy the books and let the kids take them home (with a note "please return it when you're done"&lt;/li&gt;&lt;li&gt;I wonder if we can put a little tracker in the books that would signal where the book's are (nice project to do with&amp;nbsp;Arduino/Electronics&amp;nbsp;:) )&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I already have the books I need to kickstart this, so next I just need to find a location for them&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any ideas?&lt;br /&gt;&lt;br /&gt;I also tagged this post with '&lt;b&gt;&lt;i&gt;Code Cafe'&lt;/i&gt;&lt;/b&gt; since that is something that I would love to see on every city and&amp;nbsp;community&amp;nbsp;event. This is what I tweeted yesterday:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class="twitter-tweet"&gt;At chiswick's GreenDays and just had a nice 'Scatch conversation' about 'variables' with one of the kids I'm teaching @&lt;a href="https://twitter.com/codeclub"&gt;codeclub&lt;/a&gt;&lt;br /&gt;— Dinis Cruz (@DinisCruz) &lt;a href="https://twitter.com/DinisCruz/status/343357898388279297"&gt;June 8, 2013&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote class="twitter-tweet"&gt;On @&lt;a href="https://twitter.com/codeclub"&gt;codeclub&lt;/a&gt; @&lt;a href="https://twitter.com/raspberry_pi"&gt;raspberry_pi&lt;/a&gt; topic, it's a shame that there is no stand here (Chiswick GreenDays) for kids to try some coding &lt;a href="https://twitter.com/search/%23MaybeNextYear"&gt;#MaybeNextYear&lt;/a&gt;&lt;br /&gt;— Dinis Cruz (@DinisCruz) &lt;a href="https://twitter.com/DinisCruz/status/343358640188698624"&gt;June 8, 2013&lt;/a&gt;&lt;/blockquote&gt;&lt;script async="" charset="utf-8" src="//platform.twitter.com/widgets.js"&gt;&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/EqxArYUG22E" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/EqxArYUG22E/open-library-for-my-raspberrypi-arduino.html</link><author>noreply@blogger.com (Dinis Cruz)</author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/open-library-for-my-raspberrypi-arduino.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-1646757312372985326</guid><pubDate>Sun, 09 Jun 2013 00:25:00 +0000</pubDate><atom:updated>2013-06-11T01:00:24.314+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><title>Installing Ignite’s OpenFire and Spark (IM server and client)</title><description>When testing &lt;a href="http://hubot.github.com/"&gt;HuBot&lt;/a&gt;, I needed an IM server and client&lt;br /&gt;&lt;br /&gt;Since the &lt;a href="http://server.dzone.com/articles/installing-and-running-hubot"&gt;HuBot install article&lt;/a&gt; that I was following recommended OpenFire and Spark, I decided to give it a test drive.&lt;br /&gt;&lt;br /&gt;Here is how I installed and set it up on a local VM.&lt;br /&gt;&lt;br /&gt;The first step was to get &lt;a href="http://www.igniterealtime.org/projects/openfire/"&gt;OpenFire&lt;/a&gt; from the Ignite's website:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[74].png"&gt;&lt;img alt="image_thumb[24]" border="0" src="http://lh6.ggpht.com/-vygkknm_V7E/UbPGoHauCgI/AAAAAAAAM6M/tq0n5wR0yDE/image_thumb%25255B24%25255D%25255B3%25255D.png?imgmax=800" height="418" style="border-width: 0px; display: inline;" title="image_thumb[24]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;which I did using this O2 Platform script:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://lh4.ggpht.com/-VaANqMhZKgQ/UbPIrcjXBGI/AAAAAAAAM9s/OBtWVgGgna0/s1600-h/image%25255B2%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh5.ggpht.com/-wBsdkeLUVM0/UbPIsDjl-KI/AAAAAAAAM90/3ES7Oap92Wo/image_thumb.png?imgmax=800" height="529" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... that when executed downloaded the zipfile, started the openfire.exe and opened the default browser at localhost:9090&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[71].png"&gt;&lt;img alt="image_thumb[23]" border="0" src="http://lh6.ggpht.com/-EBvf7rqgVS8/UbPGpaptilI/AAAAAAAAM6c/mDNrHuqxFqU/image_thumb%25255B23%25255D%25255B3%25255D.png?imgmax=800" height="552" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[23]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I then configured OpenFire to use an Embedded Database&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[77].png"&gt;&lt;img alt="image_thumb[25]" border="0" src="http://lh6.ggpht.com/-9gzyfX5ZIRc/UbPGpy4vXfI/AAAAAAAAM6k/yh5TIF_OKLI/image_thumb%25255B25%25255D%25255B3%25255D.png?imgmax=800" height="290" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[25]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... to use the default profile settings:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[80].png"&gt;&lt;img alt="image_thumb[26]" border="0" src="http://lh4.ggpht.com/-LbxsAqNivGI/UbPGqpZW_bI/AAAAAAAAM6s/9vdSEpd4aWc/image_thumb%25255B26%25255D%25255B3%25255D.png?imgmax=800" height="322" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[26]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and to use this default admin account:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[83].png"&gt;&lt;img alt="image_thumb[27]" border="0" src="http://lh3.ggpht.com/-Rsd1bWBntSo/UbPGrF8TYTI/AAAAAAAAM60/oxf2ZakxGgM/image_thumb%25255B27%25255D%25255B3%25255D.png?imgmax=800" height="322" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[27]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Which completed the setup:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[86].png"&gt;&lt;img alt="image_thumb[28]" border="0" src="http://lh5.ggpht.com/--ql47I4pjmI/UbPGrz62xDI/AAAAAAAAM68/XZLatDCXy3w/image_thumb%25255B28%25255D%25255B8%25255D.png?imgmax=800" height="173" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[28]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... with no errors in the OpenFire popup process&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[105].png"&gt;&lt;img alt="image_thumb[35]" border="0" src="http://lh6.ggpht.com/-DEdBzXhYkxw/UbPGsbmRhKI/AAAAAAAAM7E/43wKZZGJAXE/image_thumb%25255B35%25255D%25255B3%25255D.png?imgmax=800" height="234" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[35]" width="490" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next I used to login page:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[92].png"&gt;&lt;img alt="image_thumb[30]" border="0" src="http://lh3.ggpht.com/-qS0cllJa12U/UbPGs64I_1I/AAAAAAAAM7M/vtk5m-6_fF8/image_thumb%25255B30%25255D%25255B3%25255D.png?imgmax=800" height="166" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[30]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which didn't accept the email as username (see above), so I had to use&amp;nbsp;&lt;b&gt;&lt;i&gt;admin&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[95].png"&gt;&lt;img alt="image_thumb[31]" border="0" src="http://lh5.ggpht.com/-CQBaYJ7EVvI/UbPGtVs8QPI/AAAAAAAAM7U/HG8Dn5WjKrI/image_thumb%25255B31%25255D%25255B3%25255D.png?imgmax=800" height="166" style="border-width: 0px; display: inline;" title="image_thumb[31]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... to login and access the admin interface:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[98].png"&gt;&lt;img alt="image_thumb[32]" border="0" src="http://lh3.ggpht.com/-wBYYQDDmZ2I/UbPGt0p4o8I/AAAAAAAAM7c/h4hrmJEt-gc/image_thumb%25255B32%25255D%25255B3%25255D.png?imgmax=800" height="425" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[32]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;As per the &lt;a href="http://server.dzone.com/articles/installing-and-running-hubot"&gt;HuBot Install article&lt;/a&gt;, we should create a couple accounts and a room:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[108].png"&gt;&lt;img alt="image_thumb[36]" border="0" src="http://lh6.ggpht.com/-MaqPABkoiPQ/UbPGuh2s5mI/AAAAAAAAM7k/IQaSUwahcKY/image_thumb%25255B36%25255D%25255B3%25255D.png?imgmax=800" height="411" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[36]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;So, here is the &lt;strong&gt;developer&lt;/strong&gt; account:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[111].png"&gt;&lt;img alt="image_thumb[37]" border="0" src="http://lh3.ggpht.com/-LQSXCEiG7EU/UbPGvLYX6CI/AAAAAAAAM7s/m1j7CCkwTPI/image_thumb%25255B37%25255D%25255B3%25255D.png?imgmax=800" height="350" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[37]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... here is the hubot user:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[117].png"&gt;&lt;img alt="image_thumb[39]" border="0" src="http://lh5.ggpht.com/-hIdPMRvxHVY/UbPGvq_T6iI/AAAAAAAAM70/IqyCXX2Mp04/image_thumb%25255B39%25255D%25255B3%25255D.png?imgmax=800" height="421" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[39]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and here is the &lt;b&gt;&lt;i&gt;hubot&lt;/i&gt;&lt;/b&gt; room:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[123].png"&gt;&lt;img alt="image_thumb[41]" border="0" src="http://lh4.ggpht.com/-rjGonKEwPOg/UbPGwUl_a6I/AAAAAAAAM78/K_uWAQURe2o/image_thumb%25255B41%25255D%25255B3%25255D.png?imgmax=800" height="356" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[41]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;With the OpenFire IM server up and running, the next step was to install the Spark IM client:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[126].png"&gt;&lt;img alt="image_thumb[42]" border="0" src="http://lh3.ggpht.com/-ueIlv7pGyqs/UbPGw0Cc-fI/AAAAAAAAM8E/H7JvcM0WevQ/image_thumb%25255B42%25255D%25255B3%25255D.png?imgmax=800" height="417" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[42]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Which I did using this script:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[135].png"&gt;&lt;img alt="image_thumb[45]" border="0" src="http://lh3.ggpht.com/-o16UVDwgZSk/UbPGxhSV2SI/AAAAAAAAM8M/xPJi57-hXAs/image_thumb%25255B45%25255D%25255B3%25255D.png?imgmax=800" height="365" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[45]" width="640" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... which downloaded the installer&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[129].png"&gt;&lt;img alt="image_thumb[43]" border="0" src="http://lh3.ggpht.com/-WM4i8RAPJ7c/UbPGyFeT4yI/AAAAAAAAM8U/GN6m81WiR3c/image_thumb%25255B43%25255D%25255B3%25255D.png?imgmax=800" height="209" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[43]" width="472" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... executed it&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[132].png"&gt;&lt;img alt="image_thumb[44]" border="0" src="http://lh4.ggpht.com/-MOUOaOV6FOE/UbPGynRSCII/AAAAAAAAM8c/9YlSBF4x1KA/image_thumb%25255B44%25255D%25255B3%25255D.png?imgmax=800" height="387" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[44]" width="498" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and launched it&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[138].png"&gt;&lt;img alt="image_thumb[46]" border="0" src="http://lh6.ggpht.com/-wR8e8YTeQWY/UbPGzLpSVJI/AAAAAAAAM8k/9INCXVB7qOo/image_thumb%25255B46%25255D%25255B3%25255D.png?imgmax=800" height="417" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[46]" width="254" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Using the &lt;b&gt;&lt;i&gt;developer&lt;/i&gt;&lt;/b&gt; account previously created, I was able to connect to the OpenFire server:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[144].png"&gt;&lt;img alt="image_thumb[48]" border="0" src="http://lh5.ggpht.com/-n4WxKeLaaiQ/UbPGz36i3OI/AAAAAAAAM8s/3-dRhHz6SZg/image_thumb%25255B48%25255D%25255B3%25255D.png?imgmax=800" height="417" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[48]" width="254" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Here is the Spark post login UI:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[147].png"&gt;&lt;img alt="image_thumb[49]" border="0" src="http://lh4.ggpht.com/-htVW781wioo/UbPG0bljg5I/AAAAAAAAM80/0Y0gR7RxNJk/image_thumb%25255B49%25255D%25255B3%25255D.png?imgmax=800" height="519" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[49]" width="310" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is OpenFire's&amp;nbsp;&lt;b&gt;&lt;i&gt;Client Sessions&lt;/i&gt;&lt;/b&gt; page (showing the logged in&amp;nbsp;&lt;b&gt;&lt;i&gt;Spark&lt;/i&gt;&lt;/b&gt; user)&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[150].png"&gt;&lt;img alt="image_thumb[50]" border="0" src="http://lh3.ggpht.com/-N_Z2DaaeFR8/UbPG09T0BhI/AAAAAAAAM88/d53MsjjoOck/image_thumb%25255B50%25255D%25255B3%25255D.png?imgmax=800" height="278" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[50]" width="640" /&gt;&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Finally, to &amp;nbsp;access the &lt;strong&gt;&lt;em&gt;HuBot&lt;/em&gt;&lt;/strong&gt; room we previously created, I clicked on the &lt;strong&gt;&lt;em&gt;Conferences&lt;/em&gt;&lt;/strong&gt; tab&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[161].png"&gt;&lt;img alt="image_thumb[55]" border="0" src="http://lh3.ggpht.com/-bGAuV6KGFTg/UbPG1fG2gBI/AAAAAAAAM9E/ZXkwKODRD-A/image_thumb%25255B55%25255D%25255B3%25255D.png?imgmax=800" height="293" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[55]" width="308" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Then on the &lt;strong&gt;&lt;em&gt;conference.{computerName}&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;option:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[160].png"&gt;&lt;img alt="image_thumb[54]" border="0" src="http://lh3.ggpht.com/-OMqrrTZmrMs/UbPG1_rogPI/AAAAAAAAM9M/9IN6tQ-C89M/image_thumb%25255B54%25255D%25255B3%25255D.png?imgmax=800" height="387" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[54]" width="522" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... then on the HuBot option:&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[165].png"&gt;&lt;img alt="image_thumb[57]" border="0" src="http://lh5.ggpht.com/-vyzsy8JNpT8/UbPG2nhXzVI/AAAAAAAAM9U/p_tV2fIJ-WI/image_thumb%25255B57%25255D%25255B3%25255D.png?imgmax=800" height="498" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[57]" width="559" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;... and we can see that we have a fully operational client and server IM setup :)&lt;br /&gt;&lt;br /&gt;&lt;a href="file:///C:/Users/o2/AppData/Local/Temp/WindowsLiveWriter1286139640/supfiles27E3CAE/image[169].png"&gt;&lt;img alt="image_thumb[59]" border="0" src="http://lh4.ggpht.com/-COPz4ZNy0Vk/UbPG3N4gelI/AAAAAAAAM9c/WeIaNvVYY1c/image_thumb%25255B59%25255D%25255B3%25255D.png?imgmax=800" height="289" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="image_thumb[59]" width="496" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/aTZu0RxuKSg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/aTZu0RxuKSg/installing-ignites-openfire-and-spark.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-vygkknm_V7E/UbPGoHauCgI/AAAAAAAAM6M/tq0n5wR0yDE/s72-c/image_thumb%25255B24%25255D%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/installing-ignites-openfire-and-spark.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-5187350076320568234</guid><pubDate>Sat, 08 Jun 2013 23:31:00 +0000</pubDate><atom:updated>2013-06-09T00:31:55.211+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Philosophy</category><title>A constant source of confusion: Simplicity</title><description>From this&amp;nbsp;&lt;a href="http://www.reddit.com/r/programming/comments/1fxkhq/a_constant_source_of_confusion_simplicity/"&gt;reddit&lt;/a&gt;&amp;nbsp;I found the really&amp;nbsp;interesting&amp;nbsp;and thought provoking (long) post on&amp;nbsp;&lt;a href="http://su-shee.tumblr.com/post/50901053095/a-constant-source-of-confusion-simplicity"&gt;A constant source of confusion: Simplicity&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Simplicity is a topic that really matters to me, and is something that always try to do when writing code or creating APIs (like the ones in the O2 Platform, FluentSharp or TeamMentor).&lt;br /&gt;&lt;br /&gt;That post has some great references, which are well worth a read:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0709/rW_SO_Viewpoints.pdf"&gt;Software engineering: An Idea Whose Time Has Come and Gone?&lt;/a&gt;&amp;nbsp;- by the author of the&amp;nbsp;&lt;a href="http://www.amazon.co.uk/Controlling-Software-Projects-Management-Measurement/dp/0131717111"&gt;Controlling Software Projects: Management, Measurement, and Estimation&lt;/a&gt;&amp;nbsp;book and the one that said&amp;nbsp;&lt;i&gt;“You can’t control what you can’t measure.” &lt;/i&gt;(something the author now doesn't believe is correct)&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Worse_is_better"&gt;Worse is better&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;i&gt;&lt;span style="font-style: normal;"&gt;(&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&amp;nbsp;Wikipedia quote)&lt;/span&gt;"Worse is better,&amp;nbsp;also called the New Jersey style, was conceived by Richard P. Gabriel to describe the dynamics of software acceptance, but it has broader application. The idea is that quality does not necessarily increase with functionality. There is a point where less functionality ("worse") is a preferable option ("better") in terms of practicality and usability. Software that is limited, but simple to use, may be more appealing to the user and market than the reverse....&lt;span style="font-family: sans-serif; font-size: x-small;"&gt;&lt;span style="background-color: white; line-height: 19.1875px;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&amp;nbsp;:&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.co.uk/Dreaming-Code-Programmers-Transcendent-Software/dp/1400082471/"&gt;Dreaming in Code: Two Dozen Programmers, Three Years, 4,732 Bugs, and One Quest for Transcendent Software&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/vGx6FhE99fc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/vGx6FhE99fc/a-constant-source-of-confusion.html</link><author>noreply@blogger.com (Dinis Cruz)</author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/a-constant-source-of-confusion.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7061568054540301299.post-7879130536475043263</guid><pubDate>Sat, 08 Jun 2013 17:16:00 +0000</pubDate><atom:updated>2013-06-08T18:16:55.967+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Philosophy</category><category domain="http://www.blogger.com/atom/ns#">Privacy</category><title>What is Privacy all about? ... its about 'not being surprised'</title><description>Privacy is one of those subjective topics that is hard to talk about, because everybody seems to have a different definition of it (which depends on culture, personal experience, current/past jobs and state-of-mind.&lt;br /&gt;&lt;br /&gt;Recently I found a Seth Godin post (while reading &lt;a href="https://www.blogger.com/www.amazon.com/Whatcha-Gonna-That-Duck-Provocations/dp/1591846099"&gt;Whatcha Gonna Do with That Duck?&lt;/a&gt; in the toilet) which really provided a great explanation of privacy.&lt;br /&gt;&lt;br /&gt;The post happens to also be online (&lt;a href="https://www.blogger.com/sethgodin.typepad.com/seths_blog/2007/12/people-dont-tru.html"&gt;People don't truly care about privacy&lt;/a&gt;) and here is the key part:&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-EIbGQGMXgws/UbNmTQx-UsI/AAAAAAAAM5k/G0iOZEmITh4/s1600-h/image%25255B8%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh6.ggpht.com/-7vFpCXv9Hqs/UbNmUdsZxkI/AAAAAAAAM5s/AZzcuRBVt20/image_thumb%25255B2%25255D.png?imgmax=800" height="338" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="600" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;That is a great way to explain &lt;strong&gt;Privacy&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;... its all about &lt;strong&gt;being surprised!&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;I.e. it’s all about the individual understanding of what is happening with the personal data provided and who has access to it.&lt;br /&gt;&lt;br /&gt;For example, when I’m writing this blog post or post something on the owasp wiki, I am aware that my words and ideas are public, so I’m &lt;strong&gt;not going to be surprised &lt;/strong&gt;if anybody can uses it. &lt;br /&gt;&lt;br /&gt;But if I send a private email to somebody (specially one staring with &lt;em&gt;‘…in confidence…’&lt;/em&gt;) then I &lt;strong&gt;will be surprised &lt;/strong&gt;if others (from individuals, to companies, to governments) have access to it.&lt;br /&gt;&lt;br /&gt;Here is what &lt;a href="http://en.wikipedia.org/wiki/Privacy"&gt;Wikipedia has to say on Privacy&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/--M9Q4QpElmw/UbNmVMRjDkI/AAAAAAAAM50/zJID8YQhIgs/s1600-h/image%25255B14%25255D.png"&gt;&lt;img alt="image" border="0" src="http://lh4.ggpht.com/-3-LanYDrQhs/UbNmV28ZJWI/AAAAAAAAM58/jCeJ5fzeJ2w/image_thumb%25255B4%25255D.png?imgmax=800" height="307" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="644" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This is a much stronger definition of privacy and doesn’t take into account the shades-of-gray that the &lt;b&gt;&lt;i&gt;‘being surprised&lt;/i&gt;&lt;/b&gt;’ definition has.&lt;br /&gt;&lt;br /&gt;Here are Seth's posts on Privacy and being surprised:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sethgodin.typepad.com/seths_blog/2010/09/do-you-actually-care-about-privacy.html"&gt;Do you actually care about privacy?&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://sethgodin.typepad.com/seths_blog/2012/02/the-illusion-of-privacy-and-what-we-actually-care-about.html"&gt;The illusion of privacy (and what we actually care about)&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://sethgodin.typepad.com/seths_blog/2007/12/people-dont-tru.html"&gt;People don't truly care about privacy&lt;/a&gt;&amp;nbsp; (also linked from the top of this post)&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/DinisCruzBlog/~4/y9lZdsGr1ww" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/DinisCruzBlog/~3/y9lZdsGr1ww/what-is-privacy-all-about-its-about-not.html</link><author>noreply@blogger.com (Dinis Cruz)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-7vFpCXv9Hqs/UbNmUdsZxkI/AAAAAAAAM5s/AZzcuRBVt20/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.diniscruz.com/2013/06/what-is-privacy-all-about-its-about-not.html</feedburner:origLink></item></channel></rss>
