Mutation Testing

Even with TDD, the quality or coverage of the existing Unit Tests are always a concern for the developer. “Have I done enough ?” That’s one question that haunts him throughout.

Mutation Testing is a structural testing method that attempts to add more value to Unit Tests by aiding in identifying the ‘misses’ in Unit Tests. The central idea behind is to write Mutant of existing code, each of the mutant varying each other by a single change.

For example, Let’s think about the following code.

int TestMethod(int CurrentValue)
return 100;
return 200;

One of the mutants of the method would be replacing the decision parameter “”.  The Mutant would look like following.

int TestMethod(int CurrentValue)
return 100;
return 200;

Idea behind the Mutation Testing Approach is to ensure that the Testing Data set is near complete and adequate to identify all possibles that the code could have.  The focus would then shift to create Test Cases that would kill as much as mutants as possible.

The mutants can be broadly categorized under 3 categories.
  • Decision Mutations  – Conditions are changed for checking design errors, typically relational, logical and arithmetic operators.
  • Value Mutations  – Typically focused on changing the values (especially constants) to detect the impact/error
  • Statement Mutations – Statements are removed/duplicated.
Thinking about it, Mutation Testing looks a must for any developer if one was turn blind on the extensive resources (mutants) that could be generated. However, from the perspective of a .Net Developer (especially if you are using Visual Studio 2017), there is definite lack of tools and related documentation. Some of the tools that are available for .Net developers are
While Visual Mutator looks the most user friendly, it doesn’t seem to support Visual Studio 2017. Ninja Turtles, on other hand, suffers from lack of documentation and guidance for usage.

Revamping Interview Strategies.

One of the things which bothers me with the current interview process relevant in most companies if the focus on measuring candidate’s capabilities on the basis of his knowledge of particular sub-technology. There might be wrong with this approach, but what if the Candidate is a strong programmer who unfortunately hadn’t got the opportunity to work on the particular technology/framework ?

Programming or analytical skills, according to me, is something which is heart and soul of a software programmer. He might or might not have worked in a particular technology, but that doesn’t mean he cann’t do good when given a chance. After all, none has worked in every technology under sun. What matters is his ability to solve a problem.

Recently I saw an article in Medium and was quite fascinated by the thought. What if ask something very familiar to candidate, but prompting him to think outside the box.

For example, counting the odd numbers in an array of integers or checking if a given day is weekday or weekend is something we would have done when we learn the first steps in programming. What if we ask the candidate to accomplish the same without any form of conditional operators ?

Now that would get his thought process reset. He would have think, which is more important than remembering something and answering. So, revisit your interview strategies and allow the candidate on put on his thinking cap on

Here is my 2 cents on accomplishing the above mentioned questions in C#

public int CountNonConditional(int[] Arr)
     var sum = 0;
     Array.ForEach(Arr, (x) => sum+= x % 2);
     return sum;
public bool IsWeekDayNonConditional(DayOfWeek Day)
     return Convert.ToBoolean(((int)Day % 6));

Scrum Vs Kanban

Agile and Scrum has been ruling the Software Development industry for quite a time now, at same time, slowly, but surely, Kanban is finding itself a strong foothold in the industry. So what is Kanban and how is it different from Scrum ?

Much like Scrum, Kanban is a tool for process improvement that provides you rules and constrains to effectively improve your process in the long run. Agile Methods such as Scrum and Kanban tend to be more adaptive (less rules to follow) than being prescriptive (more rules to follow). Relatively, Kanban is more adaptive than Scrum.


One of the key requirement of using any Process Tool is to ensure you adhere to the constraints associated with the tool.  Tools such as Scrum are minimalistic enough and if you were attempting to compromise on features such as Time-bound iterations and Daily Stand-ups, then it is better not to use the tool at all. These are the features/constrains which directly or indirectly makes the tool efficient.

Quite often, teams across the world end up adopting one Process Tool and adding features of others to it, while retaining the constraints of the original.

My attempt in this post would be to compare some of these constrains and it’s implementation in both Scrum and Kanban.

1. Prescribed Roles

Scrum prescribes 3 basic roles –

a) Product Owner – Responsible for setting priorities of tasks in the Product backlog

b) Team – Responsible for implementation

c) Scrum Master – Responsible for removing impediments and provide process leadership.

Kanban, on other hand doesn’t subscribe any roles. Teams can however, adopt roles, but only if they see any value to it.

2. Time Bound Iterations

Scrum roots for time-bound iterations with each sprint comprising of 3 basic phases – Planning, Implementation and Retrospective.


Planning Phase – During this phase, the forthcoming iteration is planned. Teams pulls out specific number of tasks from the product backlog based on the priority set by the product owner.

Implementation – Having defined the scope of iteration in the previous stage, the team gets cracking on the tasks in hand.

Retrospective – Team provides a demo of the work products of the sprint to the relevant stake-holders. The Product owner may choose to ship the work product to the business client. They also discusses the pros and cons of the concluded sprint and seek ways to improve.

Kanban, on other hand, doesn’t evolve around time bound iterations. The team choses its own feedback loop on when to plan, improve process and release. For example, Team could decide to release a work product every Tuesday or could very well say, we would release it only when we have something useful.

Scrum also focuses on having Daily Stand-up meetings where in, team would come together and provide an update of the tasks they are working on ( What they did previous day, What they intend to do on the day ).

Getting a feel that Kanban is more or less Ad-hoc ? Don’t worry, things are about to change.

Work Flow Task Items

Let’s have a look at the work flow of Scrum and Kanban through the representation of Progress Board – Called Scrum Board in Scrum and Kanban Board in Kanban.



The first impression on both board would give you is “they are exactly the same !!”. Well, Almost !! The difference is the number in the braces near the TODO and BUSY headers in the Kanban Board.

Scrum uses Velocity to measure the efficiency of sprint. It controls the WIP (Work in Progress) using a time based model by limiting the number of items in each sprint based on the velocity agreed by the team. On other hand, Kanban chooses to limit the WIP by limiting the number of items in each work flow state. In the example board shown, the maximum task items that can be in the busy state is 3.

Kanban uses “lead time” as a metrics for measuring and improving efficiency of the system. Lead Time is the average time taken for a task to move across the kanban board. For the purpose, teams using Kanban, tends to break down tasks to similar sizes. The feedback loop would help team in identifying and improving the lead time.

While estimation is not a forte required in Kanban System, “Lead Time” can be an efficient resource to depend on if the team is asked to estimate. Scrum uses a more formal method, called Planning Poker, for estimation.

Changes during Iterations

Scrum resists changes to spring log once team has committed to a sprint, even if the Product Owner holds a task of high value. Once the iteration has started, the only thing Product Owner can do is change the priority of the task and ensure it gets listed in the next sprint.

Since Kanban isn’t based on time bound iteration, it allows Product Owner or Customer to change the priorities at any time. The limitation comes in the form of WIP limit in the TODO list. The customer would have to take one item down to add another.

Other Differences

Other noticeable features which differentiate Scrum and Kanban includes Scrum’s emphasis on cross-functional teams, though one doesn’t always find it a developer testing. But the idea is, if at any time, testing becomes a bottle-neck, the developer should be able to lend a hand. This isn’t the case with Kanban, which doesn’t lay emphasis on team composition. The teams could be cross-functional or specialists for the jobs.

Another significant difference between the two tools is the way the task board is handled. Scrum resets the board after every sprint. After every sprint, all the task items are removed from the scrum board and fresh items are added to the extreme left column. Kanban, on other hand is an on-going process and doesn’t bother to reset the board at any point of time.


As one can notice, there isn’t much of the difference between Scrum and Kanban tools, though Kanban is slightly more adaptive than Scrum. It is more suitable to teams where the task priority could change frequently allowing the team to respond to customer requests within minimum time. With minimum constrains imposed, Kanban tends to become ad-hoc if not properly maintained. Scrum, on other hand, is more suitable for teams where Customer could commit to a sprint. A sudden change in priority could derail the entire sprint or would require the customer to wait for the sprint to complete. Both process tools has its own pros/cons and it is up to the teams to implement the basic rules to ensure the purpose of tool is served.

Both Scrum and Kanban is empirical in the sense, both expect the team to experiment with the process and customize it. If the scrum team has to experiment with velocity and sprint duration, the kanban team has to experiment with lead time and WIP Limits. Both tools provides the teams with the basic rules to govern the process and expects the team to improve their development process using continuous and empirical process optimization.


(1) Case Study by Mattias Skarin.