Showing posts with label performance testing tools. Show all posts
Showing posts with label performance testing tools. Show all posts

Friday, January 20, 2017

Microservice: should I write micro tests? Or same tests would do?

There had been different conversations around testing microservices. Apart from Cloud, Mobile, Bigdata this is also one of the topic that saw some momentum recently. Naturally, being testers it is important to know how are we going to test the microservices.

Through this blog I am sharing my views on microservice testing. The discussion is open; happy to know your feedback and comments...

So what is micoservice?
Although the terms is appearing in most recent discussions, it is not really something new.
This architecture / product style has already been in place for quite few years. It has become popular as probably it shows the ability to adjust the architecture to constantly changing requirements.
We can look at microservices as small, independent applications communicate between each other. Generally the communication is  through HTTP, usually with use of REST protocol.
Not just new systems, but even old & proven systems are being written into this new architecture to meet the demands of post smartphone & mobile network timezone.

How to test it?
From tester's point of view - micro services need the proven testing levels as a part of test approach - i.e. unit tests, integrations tests, functional (end to end tests). So far nothing much to worry as far as testing levels go.
There is a new level though - Contract testing.

What is meant by contract testing?
When services is exposed to the world for communication, a contract is defined for API.  Idea here is to test the service under consideration as black box - and all the services must be called independently and their responses must be verified for both positive and most important negative cases.
Every consumer service is receiving the same output. If more functionality is added, it must not break the service functionality.

Tools like Pact are used in contract testing.

Next level is end to end test:
Although this level remains, it's nature has slightly varied in case of microservices.
It is generally advised that just enough e2e tests are included and most of the features should be covered in unit-integration-contract tests.
It thus becomes little more tricky to build e2e tests.
On top of the functionality it is advisable to consider network aspects in these cases like - like timeouts or packets loss.

Automation:
More automation focus is advised at unit-integration-contract level tests.
Even for e2e test automation - a different perspective can be considered - i.e. to check if some user actions can be automated at service level, ather than UI level through Selenium. So naturally, differnt tool sets would come into picture.

Defects fixing / Debugging:
In case of defects, debugging scenarios with a lot of dependencies to external services can be challenging, here.

Performance:
Testing critical microservices in isolation along with focusing on communication with external data source and external services would be handy.
While testing we can keep tap network contribution and code contribution to the time.

Security:
Security aspects should be factored around areas like - communication between services, data encryption in transit, testing security for each core / critical service in isolation,

So far, it must be clear, that this type of work would demand more technical and devops / testops type of skills; it seems that most of the microservice development happens in such work environment.

Friday, May 24, 2013

Keep your eyes "Open" .... to get a good toolset

A software tester with no tools to assist or help ... this is as horrible as one can imagine. If one still has any doubt why don't read this article before just freezing your view. So a tool is a vehicle, a resource! Well said.On its own the tool has limitations, it needs a human driver - who else other than us can be a good driver?

Once we agree on this point - let us take a step further and determine which tools we need. The biggest blunder is to 'assume' that if there is no automation or performance testing, then the tools are not required.

Let me make a small attempt to provide some vibrant thoughts:
- calculator available in your windows machine is your tool.
- windows accessibility options are your tools.
- zoom facility provided in browser is your tool.
- tools are required everywhere - NO MATTER WHAT TYPE OF TESTING IS INVOLVED.

So here is the sincere request from CAT - to keep your eyes "Open". With wide open eyes there are a number of free (& Open source) solutions available. Let me share list of some interesting tools and utilities:

Memtest - these are designed to stress test the X86 computers RAM. The default pass does 9 different tests, varying in access patterns and test data. For OSX, check Memtest OSX.

Webscarab - This  framework is used for analysing applications that communicate using the HTTP and HTTPS protocols. It is written in Java, and is thus portable to many platforms. One need to have at least  good understanding of the HTTP protocol to work with this tool.

nmon -  Provides performance data for AIX and Linux platforms and is used for for monitoring and analyzing the servers. A large number of details are provided by this tool e.g. CPU utilization, disk I/O rates, top processors, run queue information.

perfmon - SNMP based performance monitoring tool with web interface and facility to add new graphs.

PICT - a Microsoft algorith for pairwise testing. The concept of pair wise testing is extremely useful across testing phases and in both functional and non functional testing.

win32:  GUI Test - a Perl module for windows GUI automation

Xenu Link Sleuth - is a computer program to check broken hyperlinks.This is a proprietary software available at no charge.

Screen recorders:
Jing - captures images and video
CaptureFox - freeware Firefox add-on. It records every action within the browser.

HTTP: Recorder - Perl module Browser-independent recorder that records interactions with web sites.

Dexpot - a virtual desktop tool, that allows to switch between different virtual desktop connections easily.

This list is not complete, and in my opinion there can never be a complete list. However, this is a good starting point. There are other well known tools (for test automation, performance testing, security testing, etc) that are not in this list - but one can easily find them on internet.