<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Reflections on the world of software development and testing.</description><title>Contrarian Musings</title><generator>Tumblr (3.0; @jweden)</generator><link>http://jweden.tumblr.com/</link><item><title>What Legos Teaches Us About REST API Testing</title><description>&lt;p&gt;My son loves Legos. He is continually fascinated about the ways he can use and reuse various Lego blocks to build different kinds of towers and other edifices.  He also likes to use the same larger Lego blocks as a foundation for a multitude of different towers.  Why should REST API testing be any different?  Herein, I refer to two main patterns for REST API testing:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;&lt;span&gt;Classes in your REST API test infrastructure should reflect a &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Separation_of_concerns" title="Separation of Concerns" target="_blank"&gt;Separation of Concerns&lt;/a&gt;&lt;span&gt; . Each class is like a Lego block that contributes its own particular set of functionality.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Features for REST API performance testing should be tightly integrated with your test infrastructure from the beginning and utilize the same foundation upon which the functional tests are built.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;This is best explained by the code below.  This code is in Groovy and represents these patterns but the patterns are applicable across languages.  One functional test method and one performance test method is shown.&lt;/p&gt;
&lt;script src="https://gist.github.com/jweden/5328575.js" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;Regarding pattern #1, like building blocks that fit nicely together, each class is responsible for its own &amp;#8220;separate concern&amp;#8221;.  When we separate out the behavior as shown, we prevent ourselves from repeating code needlessly across different tests.  This leads to the tests having VERY FEW lines of code and being VERY READABLE.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regarding pattern #2, there are many different types of performance testing but one thing this type of testing commonly necessitates is concurrent connections.  This is often overlooked when test &lt;/span&gt;infrastructure&lt;span&gt; is built around single request-response scenarios or utilizes some off-the-shelf tool that has a proprietary language that only one or a few on a team will understand.  (As a side note here, I also strongly recommend the http client utilize &lt;a href="http://en.wikipedia.org/wiki/Non-blocking_algorithm" title="non-blocking" target="_blank"&gt;non-blocking&lt;/a&gt; connections so that it isn&amp;#8217;t using one thread per connection and thereby unable to scale to higher concurrency levels due to client resources skewing metrics.)  Why not use the same code (read: Lego blocks) that was the foundation for the functional tests and apply that to the performance tests as well?  Doing so nicely applies the &lt;a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself" title="DRY Principle" target="_blank"&gt;DRY Principle&lt;/a&gt; to your test infrastructure. This pattern allows for continuously running performance tests that can be created quickly and which can provide metrics that can be captured in a database for reporting and trending purposes.&lt;/span&gt;&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/47331020792</link><guid>http://jweden.tumblr.com/post/47331020792</guid><pubDate>Sat, 06 Apr 2013 22:49:00 -0400</pubDate><category>REST</category><category>API</category></item><item><title>The Power of Java 8 Lambdas with Generics</title><description>&lt;p&gt;One of the nice things I like about the new Java 8 lambdas is that I can encapsulate common code inside a method. So if code inside the doPrintln() method is an algorithm or a test that needs to call common code multiple times as represented by the myFunc1 lambda, we don&amp;#8217;t need to bring that logic outside the method by creating a separate private method. We can maintain &lt;a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself" title="The DRY Principle" target="_blank"&gt;DRY (&amp;#8220;do not repeat yourself&amp;#8221;)&lt;/a&gt; code by using a lambda.&lt;/p&gt;
&lt;script src="https://gist.github.com/jweden/4741038.js" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;By combining the power of generics and varargs, I&amp;#8217;m able to have a lambda take a variable number of arguments of any type. This reminds me a lot of some Scala code I&amp;#8217;ve seen and used.  I&amp;#8217;ve also done something similar using &lt;a href="http://msdn.microsoft.com/en-us/library/bb549151.aspx" title="C# func delegates" target="_blank"&gt;C# func delegates&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;I think larger methods with lambdas inside are a better design practice and increase readability. When your eyes come upon a class for the first time, the private methods don&amp;#8217;t cloud things by requiring one to figure out how many other methods are using the private one. Yes, a few clicks in an IDE will tell you, but this is one less step to get you there.  This is an excellent way to implement &lt;a href="http://en.wikipedia.org/wiki/Cohesion_(computer_science)" title="method or function cohesion" target="_blank"&gt;method or function cohesion.&lt;/a&gt;&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/42608766021</link><guid>http://jweden.tumblr.com/post/42608766021</guid><pubDate>Fri, 08 Feb 2013 16:52:00 -0500</pubDate><category>java8</category><category>lambdas</category><category>lambda</category><category>java</category><category>generics</category><category>closure</category><category>closures</category></item><item><title>Innovation Day at Work!</title><description>&lt;p&gt;#innovation day &amp;#8212; what fun!  It has been a while since I&amp;#8217;ve had a chance to blog.  That is because I&amp;#8217;ve been heads-down at a new job as Principal Quality Engineer working on the backend automation architecture and automation tests for our webservices team.  However, I did want to blog about Innovation Day here at Constant Contact.  It was great.  In fact, there are many great things about working for a company that has an Innovation Day.  My idea was a mashup between Constant Contact and a 3rd party API and the team we had really helped to flush out the idea and bring the demo to fruition.  We had a short presentation piece and our demo was set up along with those of others in a science-fair like setup (see picture below).  It was a lot of work but a lot of fun as well.  I staged our demo on &lt;a href="http://www.heroku.com" title="Heroku"&gt;Heroku&lt;/a&gt; (first time using it) and brushed up on JSPs and servlets and had a chance to touch different parts of our products that I wasn&amp;#8217;t hitherto familiar with.  The third-party API was really helpful in getting us access to their sandbox for our API integration to work.  Innovation takes work and it makes sense for a company to set a block of time aside for software engineers to unleash their creativity.  I know I&amp;#8217;m better for it!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Our Innovation Demo" height="480" src="http://dl.dropbox.com/u/49930268/photo.JPG" width="640"/&gt;&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/31332593287</link><guid>http://jweden.tumblr.com/post/31332593287</guid><pubDate>Tue, 11 Sep 2012 08:39:49 -0400</pubDate></item><item><title>Enjoying #Akka With #Java</title><description>&lt;p&gt;I was extremely surprised at how easy it was to get Akka 2.0 up with Java. I used typed actors with futures. Why would I ever go back to shared state threading and deal with lower level constructs such as synchronization and locks? I still have lots of Akka goodness to learn though.&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/20299605797</link><guid>http://jweden.tumblr.com/post/20299605797</guid><pubDate>Sun, 01 Apr 2012 14:47:11 -0400</pubDate></item><item><title>Asynchronous Scala Rest Client with Spray</title><description>&lt;p&gt;#scala #spraycc #rest&lt;/p&gt;
&lt;p&gt;One of the things I really enjoyed at the NE Scala Symposium this past week was getting the Spray Rest Client going during the hacking sessions.  Below is a snippet of this code.
&lt;script src="https://gist.github.com/2033268.js?file=ScalaRestTester.scala" type="text/javascript"&gt;&lt;/script&gt;
I also integrated it into ScalaTest.  The hard part was getting it integrated with maven since the canned spray examples all use the Scala SBT build tool.  But once I got it up and running in Intellij IDEA, it was great!  The nice thing about spray is that it is 100% asynchronous &amp;#8212; it is very, very fast.  In fact, someone at the conference from another company compared it to other Java asynchronous rest frameworks and found this to be the fastest. &lt;/p&gt;
&lt;p&gt;I can&amp;#8217;t wait until the next version of spray which is due out very soon.  It will have support for Akka 2.0 and SSL.  All of the related code is at my github &lt;a href="https://github.com/jweden/scalaDbase" title="here"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_url = '[url]';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_title = '[title]';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_blurb = '[description]';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_style = '1';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://jweden.tumblr.com/post/19268632306</link><guid>http://jweden.tumblr.com/post/19268632306</guid><pubDate>Tue, 13 Mar 2012 21:51:44 -0400</pubDate></item><item><title>#in @nescalas Had a great time at NE #Scala Symposium 2012...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m0qclfEwcy1qbo8ogo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;#in @nescalas Had a great time at NE #Scala Symposium 2012 especially the Saturday where we were actually building real stuff.&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/19124936237</link><guid>http://jweden.tumblr.com/post/19124936237</guid><pubDate>Sun, 11 Mar 2012 13:00:51 -0400</pubDate></item><item><title>New Amazon Review of my Test Automation book</title><description>&lt;a href="http://www.amazon.com/Experiences-Test-Automation-Studies-Software/dp/0321754069/ref=sr_1_1?ie=UTF8&amp;qid=1326891299&amp;sr=8-1"&gt;New Amazon Review of my Test Automation book&lt;/a&gt;: &lt;p&gt;#in #agiletesting #sqa&lt;/p&gt;
&lt;p&gt;I’m very excited that the Experiences in Test Automation book in which I have contributed a case study chapter received its first glowing and detailed review by a reader on amazon.&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/16060012000</link><guid>http://jweden.tumblr.com/post/16060012000</guid><pubDate>Wed, 18 Jan 2012 08:17:37 -0500</pubDate></item><item><title>Using Squeryl and ScalaTest to connect with Postgres</title><description>&lt;p&gt;It wasn&amp;#8217;t too hard to get a ScalaTest going that makes a database connection using Squeryl (a Scala ORM).  I was able to do a select statement against a postgres database and get some data out.&lt;/p&gt;
&lt;script src="https://gist.github.com/1531469.js?file=ScalaFunctionalTests.scala" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;This select statement above assumes the sql below is in the running database. This allows the test to print &amp;#8220;jason&amp;#8221; if all is running correctly.&lt;/p&gt;
&lt;script src="https://gist.github.com/1531420.js?file=sql.sql" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;All the code can be found on github &lt;a href="https://github.com/jweden/scalaDbase"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_url = '[url]';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_title = '[title]';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_blurb = '[description]';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;![CDATA[// &lt;![CDATA[
var dzone_style = '1';
// ]]]]&gt;&lt;![CDATA[&gt;]]&gt;&lt;/script&gt;&lt;script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://jweden.tumblr.com/post/14952301887</link><guid>http://jweden.tumblr.com/post/14952301887</guid><pubDate>Wed, 28 Dec 2011 22:04:00 -0500</pubDate></item><item><title>Integrating ScalaTest with TestNG and Maven</title><description>&lt;p&gt;I totally trashed my Intellij installation by trying to manually install a Scala plugin I think because I only brought in one of the many needed jars.  Once I got Intellij 11 up and running with the Scala plugin by installing it the right way, I found that it is awesome.  I now have a demo of using ScalaTest with Maven and TestNG at my git repo &lt;a href="https://github.com/jweden/ScalaTestNGDemo" title="here" target="_blank"&gt;here&lt;/a&gt; .  You&amp;#8217;ll see from the readme in the repo that the whole demo is runnable by a simple &amp;#8220;mvn test&amp;#8221;.  One of the gotchas is extending a Java base class in Scala and still needing an import statement for said Java class in the Scala class.&lt;/p&gt;
&lt;p&gt;Here is the ScalaTest TestNG Test Class&lt;/p&gt;
&lt;script src="https://gist.github.com/1458298.js?file=ScalaFunctionalTests.scala"&gt;&lt;/script&gt;</description><link>http://jweden.tumblr.com/post/14049239736</link><guid>http://jweden.tumblr.com/post/14049239736</guid><pubDate>Sat, 10 Dec 2011 23:13:00 -0500</pubDate></item><item><title>Performance Testing</title><description>&lt;p&gt;#sqa #in&lt;/p&gt;
&lt;p&gt;It is a nice feeling of satisfaction today!  Nothing has been able to survive my multithreaded C# SOAP client test based on TPL (Task Parallel Library). But we have a great DBA that can look at my database trace file to pinpoint the issues. Score for my performance testing setup!&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/13211920729</link><guid>http://jweden.tumblr.com/post/13211920729</guid><pubDate>Wed, 23 Nov 2011 13:28:52 -0500</pubDate></item><item><title>Experiences of Test Automation - Ch. 11 by me!</title><description>&lt;p&gt;#amreading #sqa&lt;/p&gt;
&lt;p&gt;It is almost out!  &lt;em&gt;Experiences of Test Automation &lt;/em&gt;is a collection of case studies by Software Test Automation experts from around the world.  Poignant, educative, and overarching themes are astutely drawn together by Graham Fewster and Dorothy Graham to round out the learning experience.  I&amp;#8217;ve started to read some of the other case studies and I have to say that there is quite a lot of depth here.&lt;/p&gt;
&lt;p&gt;My case study is &lt;strong&gt;Chapter 11&amp;#160;&lt;/strong&gt;and you&amp;#8217;ll see my name circled on the back cover as shown below.  Pre-order from amazon now using &lt;a href="http://www.amazon.com/Experiences-Test-Automation-Studies-Software/dp/0321754069/ref=sr_1_1?ie=UTF8&amp;amp;qid=1321544201&amp;amp;sr=8-1"&gt;this link&lt;/a&gt; . Other notable authors include industry luminaries such as Lisa Crispin, co-author of Agile Testing.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Front Cover" height="881" src="http://dl.dropbox.com/u/49930268/frontCover.PNG" width="782"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Back Cover" src="http://dl.dropbox.com/u/49930268/backCover.PNG"/&gt;&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/12947716597</link><guid>http://jweden.tumblr.com/post/12947716597</guid><pubDate>Thu, 17 Nov 2011 20:02:00 -0500</pubDate></item><item><title>Bridging Boston’s Student-to-Startup Talent Gap: It’s All About Validation | Bostinnovation: Boston Start-ups, Innovation and News Blog</title><description>&lt;a href="http://bostinnovation.com/2011/11/03/bridging-boston’s-student-to-startup-talent-gap-its-all-about-validation/"&gt;Bridging Boston’s Student-to-Startup Talent Gap: It’s All About Validation | Bostinnovation: Boston Start-ups, Innovation and News Blog&lt;/a&gt;: &lt;p&gt;Partipating in this conversation about #boston and #innovation. #bostinnovation&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/12753554037</link><guid>http://jweden.tumblr.com/post/12753554037</guid><pubDate>Sun, 13 Nov 2011 15:54:50 -0500</pubDate></item><item><title>Experiences of Test Automation: Case Studies of Software Test Automation Safari Books Online</title><description>&lt;a href="http://my.safaribooksonline.com/book/-/9780132776608"&gt;Experiences of Test Automation: Case Studies of Software Test Automation Safari Books Online&lt;/a&gt;: &lt;p&gt;A preview of a software test automation book #in which I wrote the Chapter 11 case study is out! #sqa&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/12169306960</link><guid>http://jweden.tumblr.com/post/12169306960</guid><pubDate>Mon, 31 Oct 2011 15:53:31 -0400</pubDate></item><item><title>" val name = if(args.length == 1) args(0) else “world” println(“Hello ” +..."</title><description>“&lt;a href="http://readmill.com/jweden/reads/pragpub-2011-09-issue-27/highlights/fd75"&gt; val name = if(args.length == 1) args(0) else “world” println(“Hello ” + name) Thread.sleep(1000) println(“good bye”) &lt;/a&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;I love this #scala hello world. Highlighted by Jason Weden in PragPub 2011-09: Issue #27&lt;/em&gt;</description><link>http://jweden.tumblr.com/post/10303054700</link><guid>http://jweden.tumblr.com/post/10303054700</guid><pubDate>Fri, 16 Sep 2011 23:42:29 -0400</pubDate></item><item><title>A Note About Git Commit Messages</title><description>&lt;a href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html"&gt;A Note About Git Commit Messages&lt;/a&gt;: &lt;p&gt;This seems like a good best-practice document on #git commit messages.  I’ll be using this.&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/10124009075</link><guid>http://jweden.tumblr.com/post/10124009075</guid><pubDate>Mon, 12 Sep 2011 08:42:56 -0400</pubDate></item><item><title>Posting errata for Manning early-release #Scala #in Action book.  Seems to be on its way to be a...</title><description>&lt;p&gt;Posting errata for Manning early-release #Scala #in Action book.  Seems to be on its way to be a good scala book.  &lt;a href="http://www.manning.com/raychaudhuri/"&gt;&lt;a href="http://www.manning.com/raychaudhuri/"&gt;http://www.manning.com/raychaudhuri/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/9787798038</link><guid>http://jweden.tumblr.com/post/9787798038</guid><pubDate>Sun, 04 Sep 2011 09:34:08 -0400</pubDate></item><item><title>Listening to software engineering radio podcast episode on #Quantum Computing:...</title><description>&lt;p&gt;Listening to software engineering radio podcast episode on #Quantum Computing: &lt;a href="http://feedproxy.google.com/~r/se-radio/~5/lFSAQ8mt3VE/seradio-episode176-qc.mp3"&gt;http://feedproxy.google.com/~r/se-radio/~5/lFSAQ8mt3VE/seradio-episode176-qc.mp3&lt;/a&gt;&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/9460693911</link><guid>http://jweden.tumblr.com/post/9460693911</guid><pubDate>Sat, 27 Aug 2011 13:08:07 -0400</pubDate></item><item><title>Enjoying using #kojo as a GUI for the #scala REPL</title><description>&lt;p&gt;Enjoying using #kojo as a GUI for the #scala REPL&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/9134340964</link><guid>http://jweden.tumblr.com/post/9134340964</guid><pubDate>Fri, 19 Aug 2011 16:33:31 -0400</pubDate></item><item><title>InfoQ: Scala.Net and Scala with Martin Odersky</title><description>&lt;a href="http://www.infoq.com/articles/ScalaNETInterview"&gt;InfoQ: Scala.Net and Scala with Martin Odersky&lt;/a&gt;: &lt;p&gt;Thought this was great insight into #Scala., .NET integration and Scala’s future.&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/9079243411</link><guid>http://jweden.tumblr.com/post/9079243411</guid><pubDate>Thu, 18 Aug 2011 09:49:29 -0400</pubDate></item><item><title>Bug statistics are a waste of time</title><description>&lt;a href="http://gojko.net/2011/05/17/bug-statistics-are-a-waste-of-time/"&gt;Bug statistics are a waste of time&lt;/a&gt;: &lt;p&gt;I agree with most of what is said #in here.  Automated tests that are run continuously speak louder and longer than any bug tracking system.&lt;/p&gt;</description><link>http://jweden.tumblr.com/post/8737866410</link><guid>http://jweden.tumblr.com/post/8737866410</guid><pubDate>Wed, 10 Aug 2011 12:51:54 -0400</pubDate></item></channel></rss>
