Monday, November 19, 2012

Technical Skills for BA's and QA's

What kind of technical skills do BA's and QA's need? Terry and I had a good discussion on this quite a few times in the last year. Her recent email to the group soliciting feedback and ideas sparked a really good email conversation. Here is my take on this topic.

I think the technical skills needed by BA's and QA's depend a lot on Intranet / Internet system as well. With an internet system used by users all over the country / world BA's and QA's would need more technical skills around what are the minimum system requirements. Do we support multiple browsers / devices, what are the compatibility criteria and options. What are the trends in browser usage? What new technologies are coming in marketplace that may need to be accounted for - example, new version of Android or ipad mini :) If there is a new version of TinyMCE editor available do we upgrade? What does it buy us? etc

In an intranet system we may have a much more predictable user base. The technology standards are governed by a company wide "standards board" of some kind. This takes away the need BA's and QA's to know some of these technical items. In an Internet system where the user base is sampled and the technology terrain keeps changing much faster BA's and QA's need more technical skills.

Tuesday, October 23, 2012

To use Cucumber or Not to

Cucumber is fun to use. It it really cool to see plain english statements come to life and different pieces of code executed when those are english lines are executed. Gherkin syntax is great too. It has so much potential. Using a handful of simple keywords you can express any scenario and combined with cucumber you can execute them. Wonderful !

Then my developer brain came into action with all the principles around DRY (Don't repeat yourself) and WET (Write Everything Twice) highlighted. Does DRY apply to gherkins? It probably does. Take these two steps in different feature files for example:

And User A can view the message posted by User B

And User can view the message posted by the other user

These are two different lines of english meaning the same thing. These are the kind of gherkins different people would write about the same step or the scenario. If we already have the step #1 implemented we may apply the DRY principle and not implement step #2 once again. Now, how do I know if these two steps match and have the same implementation? By collaboration and by looking into the implemented step - right? Well the problem is - this takes time. Specially when the test suite is large this takes even more time. Now let's say all this collaboration and code inspection is done and it is concluded that the steps are the same we may want to edit the gherkin and replace the step #2 with step #1.

I call this whole process - "Normalization of Gherkins".

When is this done? When the step is being implemented
Who does that? Well, since this is a collaborative effort - everyone is involved.
If the developer who is implementing this does not have any idea that the step #1 above is already implemented in some other stepdef file the new (re)implementation of step #2 will be done.

So what happened here?
We are thrilled by the idea of automating any simple line of english that can be written by anyone but we still want reusability. So here comes a choice -

- Do you have people outside of your team who care about gherkins? If so, then evaluate using cucumber.
- Do you NOT have people outside of your team who care about gherkins? If so, then consider not using cucumber.

Let me get my message straight here. I am saying this about cucumber - to evaluate using it or not using it. However I think there is a lot of value in gherkins. What I am saying is evaluate the use of cucumber.

So - If you choose not to use cucumber how would you automate your gherkins then? Use unit testing frameworks to hit webdriver or something! I guess at this point I will leave this post here leaving a few questions unanswered for the next few posts. These questions are -
- How would simple junits consume gherkins?
- Could I get the same kind of report from junits the way I get it from cucumber?

Stay tuned for some thoughts around these.

Friday, October 19, 2012

What do you like about it?

My new interview pattern these days is turning out to be very interesting. The simple question is - "What do you like about it?". Tell me a technology / process and my question is simple - "Why do you like it?"

The important part here is "Why". You may have used a technology for many years and you are now an expert at "using" it. However in the process you should have developed opinions, hatred and / or love for the technology. You should be able to see the good and bad parts of the technology. You should be able to critique and defend the technology. This is very important as this shows that your thought process has evolved.

It is surprising to see how many candidates don't have a good answer to this. These are still good candidates who can get the work done but it does give an impression about someone.

Saturday, October 13, 2012

Thought Leadership

I came across the terms - Thought Leader and Thought Leadership - several times now and I am intrigued enough what this means. I wonder
  • Who is a Thought Leader? 
  • What makes someone a Thought Leader? 
  • What does a Thought Leader do that Business Leaders do not do? 
  • What do Business Leaders do that Thought Leaders do not do? 
  • What are the characteristics of an Individual Thought Leader? 
  • What are the characteristics of a Organization as a Thought Leader? 
  • What skills a Thought Leader should have?
  • How did one become a thought leader?
  • How did an organization establish themselves as a Thought Leader?
Finally I decided to spend some time researching what this is and I tapped our friend - Google. I got a bunch of websites offering explanations around these terms. The pointers are:
  • Forbes indicates that a thought leader is "a foremost authorities in selected areas of specialization" and "that significantly profits from being recognized as such". It also indicates that such thought leadership "brilliance is a function of acclaim, created where others bestow the accolades". 
  • The Forbes article also indicates that a thought leader has a "selected areas of specialization"
  • Leaders Direct site indicates that a thought leader may not need to have "inspirational influencing skills" that may be necessary for a senior executive. It also indicates that they may actually have "weak interpersonal skills and an indifferent character" and what really counts is the "credibility of the idea"
  • CEO Online indicates, contrarily, that Thought Leaders need to have good "communication, positioning, pitching" skills along with 6 others
  • The How Matters site indicates a quote "proprietary command over a challenging industry issue".
  • It also indicates the 3 R's of Thought Leadership - "Results, Rhetoric, Relationships"
  • The OpenViewPartners blog places emphasis on "bold ideas that are new and noteworthy" and "high quality (preferably original) research"
  • The Thought Leadership Leverage article lays out the how "changing mindset" is more effective than "building skills"

Monday, August 20, 2012

get feature and scenario name with cucumber-jvm

cucumber-jvm does not provide an easy way to get the feature name, scenario name or the step that is being executed. I had to find a workaround for this. For reference it is listed here. I am using the mirage project that I created a while back that provides a few utility classes around reflection. The ReflectionUtils.getFieldInObject uses that.

I created an aspect and weaved the info.cukes:cucumber-junit jar file with the aspect.
 public aspect ReportFeatureScenarioStep {  
      pointcut running_feature() : execution(public * cucumber.junit.FeatureRunner.run(..));  
      pointcut running_scenario() : execution(public * cucumber.junit.ExecutionUnitRunner.run(..));  
      pointcut running_step() : execution(public * cucumber.junit.JUnitReporter.match(..));  
 // Not used. These are here for reference only  
 //     pointcut completing_feature() : execution(public * cucumber.junit.FeatureRunner.run(..));  
 //     pointcut completing_scenario() : execution(public * cucumber.junit.ExecutionUnitRunner.run(..));  
 //     pointcut completing_step() : execution(public * cucumber.junit.JUnitReporter.result(..));  
      before() : running_feature() {  
           ParentRunner pr = (ParentRunner) thisJoinPoint.getTarget();  
           System.out.println(pr.getDescription().toString());  
      }  
      before() : running_scenario() {  
           ParentRunner pr = (ParentRunner) thisJoinPoint.getTarget();  
           System.out.println(pr.getDescription().toString());  
      }  
      before() : running_step() {  
           StepDefinitionMatch m = (StepDefinitionMatch) thisJoinPoint.getArgs()[0];  
           Step step = (Step) ReflectionUtils.getFieldInObject(m, "step");  
           System.out.println(step.getKeyword() + " " + m.getStepName());  
      }  
 // Not used. These are here for reference only       
 //     after() : completing_feature() {  
 //          ParentRunner pr = (ParentRunner) thisJoinPoint.getTarget();  
 //          System.out.println("AFTER FEATURE : -->" + pr.getDescription() + "<--");  
 //     }  
 //       
 //     after() : completing_scenario() {  
 //          ParentRunner pr = (ParentRunner) thisJoinPoint.getTarget();  
 //          System.out.println("AFTER SCENARIO : -->" + pr.getDescription() + "<--");  
 //     }  
 //       
 //     after() : completing_step() {  
 //          System.out.println("AFTER STEP ");  
 //     }  
 }  

This aspect is weaved into the cucumber-junit by doing this:

               <plugin>  
                   <groupId>org.codehaus.mojo</groupId>  
                     <artifactId>aspectj-maven-plugin</artifactId>  
                     <version>1.4</version>  
                     <executions>  
                          <execution>  
                               <goals>  
                                    <goal>compile</goal>  
                                    <goal>test-compile</goal>  
                               </goals>  
                          </execution>  
                     </executions>  
                     <configuration>  
                          <source>1.6</source>  
                          <complianceLevel>1.6</complianceLevel>  
                          <verbose>false</verbose>  
                          <showWeaveInfo>false</showWeaveInfo>  
                          <target>1.6</target>  
                          <weaveDependencies>  
                               <weaveDependency>  
                                    <groupId>info.cukes</groupId>  
                                    <artifactId>cucumber-junit</artifactId>  
                               </weaveDependency>  
                               <weaveDependency>  
                                    <groupId>info.cukes</groupId>  
                                    <artifactId>cucumber-java</artifactId>  
                               </weaveDependency>  
                          </weaveDependencies>  
                     </configuration>  
                </plugin>  

Thursday, August 16, 2012

what is your favorite design pattern ?

In the last few technical interviews I have introduced this new question on design patterns -- "What is your favorite design pattern?"

The responses I got from candidates was - MVC, Singleton, DAO, Facade, Factory etc.

But what I don't get here is how can you have a favorite design pattern?

There are so many design patterns. The underlying idea is to use the right one for the right purpose and to solve the right problem. It does not matter if you like one or the other. Your level of understanding of one pattern may be high and other may be low - and that is perfectly fine. However how can I have a favorite design patten?

Whats happening

Almost a year since I blogged. Whats happening! For 8 hours a day it has been fun working with a new team on a new project. The work after work has been equally exciting. I am working on a new project - gherkinsalad - meant for automation using java, cucumberjvm, webdriver. The website is http://www.gherkinsalad.com.