Daily Posts

208, 2018

Learning API automation

By | August 2nd, 2018|

How to learn API automation?

I’d follow the following steps:

1)

Don’t start with instaling an API automation tool

2)

Do NOT START with installing an API automation tool, learn what are API’s first then think about tools.

3)

Understanding how APIs / the HTTP request / response works. Lots of tutorials out there.

A video covering the basics linked in the comments.

4)

Test some sample APIs with POSTMAN.

That would give you an idea of how API calls are constructed and some common responses

You can try using this website as a sample:
https://jsonplaceholder.typicode.com/

5)

Look into learning RestAssured.

There are a bunch of courses out there on it. It can work in parallel with Selenium.

All you need to do is just add the Maven dependency –

P.S.
I’m using RestAssured with spring Boots!

#QsDaily #ApiAutomation #Automation #API

3107, 2018

Automation is NOT just UI Automation

By | July 31st, 2018|

TestAutomation != Ui_AutomationOnly;

AutomationInTest == UI_Automation + API_Automation + UnitTests + WhateverYouCanComeUpWith; // This can be a long list

Any mundane test programmed to be checked through a tool would classify under automation

Since UI automation is the most widely implemented form of automation, it has become synonymous with automation

API automation is very valuable and should come directly under an automation engineer’s core responsibilities

Often since we start off ‘not as aware’ about the technology stack, we’re not really sure how API testing is done

Linked article stacks up UI vs API automation to illustrate the benefits.

http://quality-spectrum.com/ui-automation-vs-api-automation/

#QsDaily #ApiAutomation #UiAutomation #Automation

3007, 2018

McCabe Code Complexity

By | July 30th, 2018|

Configurability and complexity go hand in hand

Thanks to Thomas J McCabe for proving this concept

I have to say, over time things do get streamlines when layers upon layers of abstraction are added

But while developing a product, or automation framework, the more configurable we try to make it, the more complex it becomes

For that reason, Thomas McCabe came up with this algorithm to calculate complexity

Embedded / IoT devices standards dictate to keep the McCabe cyclomatic complexity (Code complexity) below 30

It’s not a bad idea to calculate your code’s complexity level and stick to a limit

Makes life a lot easier down the road.

#QsDaily #Automation #CodeComplexity

2907, 2018

Learn automation or go technical

By | July 29th, 2018|

Want to learn or hire for automation?

“To be technical or not to be, that is the question”..

While speaking at a conference I tried to outline the journey of a tester

While there were a lot of lessons to learn, the premise was to focus on learning the underlying technology

Familiarity with just an automation tool will not bring the results you want, for both, as an employer or as an employee

What you really are looking for is a technical background AND be able to program tests at the same time

#QsDaily #TestersGoingTechnical #Automation

2807, 2018

DevOps and Tenacity

By | July 28th, 2018|

DevOps and Tenacity

Here’s the relationship..

The differential between the good and the great is Tenacity

The great know to hashtag#NeverBackDown / hashtag#NeverGiveIn, and that’s what makes them great

Success consists of going from failure to failure without loss of enthusiasm (Winston Churchil)

In delivering software there are a lot of unknowns, many things can go wrong, and you’ll never get it right the first few times

So, keep on improving and at an accelerating speed. For which you and your team must be tenacious

And to me that’s what DevOps is, keep improving at speed, keep going from failure to failure without loss of enthusiasm, or simply put ‘fail fast’

#QsDaily #NeverBackDown #DevOps #FailFast

2707, 2018

Programming an important skill

By | July 27th, 2018|

I’m often asked how to learn automation

On of the most important skill is programming..

Firstly, often times this subject is not approached the right way

Folks attempt at ‘codeless’ or ‘keyword based’ automation at first

IMHO, while it might work for a finite scope and technology stack, generally it’s seen not to deliver

In the end, to do automation well you’ll have to program. there is no way around it

Secondly, learning programming is not about being good with Java or any one language’s syntax

It’s about building the right APTITUDE and the right ATTITUDE

With those two, the language becomes irrelevant. And without them your skill in any language will not create desired results

#QsDaily #Automation #Programming #TestersGoingTechnical

2607, 2018

AutoMagic by Jim Hazen

By | July 26th, 2018|

“AutoMagic” – Jim Hazen

Here’s what it means:

The assumption of automation being a silver bullet to solve all testing problems

Depicting the thought process of automation somehow ‘magically’ doing all the testing we have toBy following some simple steps (record and playback) and all your worries are over FOR LIFE..

I’m pretty sure most folks reading this are way past that point of understanding

But the term Jim has coined always fascinated me

Here is a short clip of Jim explaining the story how he came about to coin the term

#QsDaily #Automation

2507, 2018

Deleting a build run in Jenkins

By | July 25th, 2018|

Deleting a batch run result for a Jenkins job

Why would you want to do it and how..

I must mention first there is a ton of value in using Jenkins,

It’s not only easier to run, use and share results, but also can give a historic view of the results

I have nightly builds and sometimes due to unavoidable circumstance there are some batch runs which really shouldn’t be in the history for that job (it’s a long story, so just humor me)

To keep your batch run history clear of any unnecessary ‘noise’ you might want to delete a specific job run result

Here’s how you do it:

  1. From Jenkins “configure global security” page, set ‘Anyone can do anything’ in the ‘Authorization’ section
  2. Run CMD with admin rights and ‘cd’ into Jenkins-cli.jar file location (e.g. C:\Program Files (x86)\Jenkins\war\WEB-INF)
  3. Confirm the batch run you want to delete (this is irreversible)
  4. Write the following command:
    1. java -jar jenkins-cli.jar -s       <Jenkins server>     delete-builds     <job name>              <build number to delete>
  5. Restore security settings

Tadaa!

P.S.

I know this was written very short hand, will write up a post on a few tips including this one.

#QsDaily #Automation #Jenkins

2407, 2018

The concept of Jenkins

By | July 24th, 2018|

Often folks start learning the semantics and forget the concept

The same goes with learning Jenkins, so here’s the ‘concept’:

There used to be so many steps to deploy a product (ask someone who has been in a release manager kind of role)

All that time was wasted on useless mis-management, trying to merge code properly which should have been done anyway in the first place

Plus the time to do all these repetitive tasks day in day out

A few ‘God gifted’ members of the software community started working to solve this back in 2004

After lot’s of hard work, acquisitions and court trails, today we know that project as ‘Jenkins’ with over 1000 contributors

Working towards the goal of making the deployment of software easier, the corner stone of DevOps

A quick introduction to ‘how’ Jenkins solves this problem is in this article:

#QsDaily #Automation #DevOps #Jenkins

Jenkins – A quick introduction

2307, 2018

Why is UI automation not easy

By | July 23rd, 2018|

It’s not easy to get UI automation right

And here’s the reason why:

The AUT GUI will keep on changing, the browsers / mobile OS get updated every few months and the automation tool also keep upgrading

The automation framework needs to be loosely coupled to adapt to all these rapid changes

It ends up like a person trying to balance himself on three moving wooden planks at sea which keep on drifting..

Another analogy I remember is from car CD players problem

Even when a car is running smoothly, there are subtle vibrations, enough to disrupt the lens reading data off the CD

The industry started to engineer car CD players to be flexible enough to cater for these jitters and even bigger ones to avoid the disruption in reading data

So keep your automation framework fluid, easy / quick to update, and robust enough to overcome any small bumps and tides which are inevitable

#QsDaily #automation

The Automation Blog Book

2207, 2018

Compatibility testing

By | July 22nd, 2018|

An important area to leverage automation

The number of front ends applications need to support are increasing day by day

While this is a nightmare testing by a person, automation can be a big help

Making scripts reusable with the ability to run smoothly on multiple platforms and app versions is a no brainer

What’s not so common are the tests to add under this category

Conventional wisdom is to run ALL TESTS on ALL possible environments, but that’s just not smart

IHMO, any part of our app’s code that is affected by the browser / mobile OS etc. should be included here

For instance if a specific control is used multiple places in the application, testing it extensively in one place should suffice for compatibility tests for that control

And no need to test it every other place in the application

#QsDaily

2107, 2018

The power of goal setting

By | July 21st, 2018|

The power of writing your goals

I don’t know why, but it certainly is more powerful than most think

I read the concept the first time from Brian Tracey’s book “The miracle of self-discipline”

According to him, goal setting is the best part of his trainings people come up to him and talk about how it transformed them

From my personal experience, writing goals daily has been a game changer for me too

It has helped me stay true to my purpose, meet with awesome people and open doors I never knew existed

So here’s my goal setting ritual:

1. Anything I want to implement in my life, or goals I want to achieve, I write an affirmation for them
2. That builds my latest list of affirmations
3. First thing in the morning, I write my affirmations

And that’s it!

Try it out and let me know!

For more reading, audio book link : https://www.briantracy.com/catalog/the-miracle-of-self-discipline

P.S.
This will take time. So, “TRUST THE PROCESS”.

#QsDaily

2007, 2018

Programming for testers

By | July 20th, 2018|

For those starting from scratch, here are my two cents

Writing code is not that hard, but being good at it certainly is

IME, folks starting on the wrong foot struggle for a very long time

Having the aptitude of problem solving and thinking like a machine

Coupled with the right attitude towards the problem solving process makes all the difference

More on that here:

1907, 2018

Automation logs.

By | July 19th, 2018|

Did I ever mention I’m allergic to messy code?

There’s something I hate even more, horrible automation logs

Often I’ve seen automation logs / results are so complex and very hard to navigate

The only thing you might learn is how many tests passed or failed and that’s about it

I design my logs to be like an airplane black box

If any of my scripts go down, I want ALL the information I need to figure out what happened

AND the log has to be perfectly readable by ANYONE in the team

BTW, that’s how the first F-16 was designed, they didn’t start with what they CAN build, rather what fighter pilot’s dream features were

To read more on how to build a great test log:
#QsDaily #automation #TestResults

 

\https://goo.gl/YcgSbM

1807, 2018

How I built a test harness

By | July 18th, 2018|

How I decided to build a test harness:

Angular 4 + Spring Boots + SQL, (and oh my it is so much fun!)

It could have been done with using a front interface like Jenkins

The backend with some simple scripts in restAssured and plain Java, but would not have been scalable

Keeping good design practices of maintainability, scalability, reusability and robustness, we had to take the tougher route

When deciding on how to solve the problem, don’t look at the effort needed today, the solution should be scalable enough for years to come

I always quote to my team, don’t program thinking of today, rather a 3rd person reading it a year from now

#QsDaily #TestHarness

1707, 2018

Deciding what to automate

By | July 17th, 2018|

Deciding what to automate – part 2

Once you what to test, find the subset of what to automate

Again everything you want to ‘test’ cannot be ‘checked’

It’s best to be smart about what should be automated

While the most common answer to this question is ‘automate what we can’

There’s a fundamental flaw in that, not necessarily all we CAN automate is WORTH automating

If a feature is hardly changed and used, automation efforts are best spent elsewhere

Conversely, if a certain feature is time consuming to test and has to be done every time, I’d rather automate that feature.

More factors IMHO to help deciding what to automate here:

1607, 2018

Deciding what to test

By | July 16th, 2018|

Deciding what to automate – part 1

Find out what to test first..

Often the discussion about what to automate ends with ‘let’s automate everything’…

Around a year into it the team realizes we might never be able to automate everything

Plus the maintenance cost turns out to be much higher than expected

Eventually not seeing enough progress with automation

While this scenario is the result of multiple mistakes along the way,

The first IMHO is not taking the time to formulate a testing strategy first

We can NEVER test everything, let alone automate it

#QsDaily #Automation

Find out what to test first, more here:

1507, 2018

Trust the process

By | July 15th, 2018|

For my tester friends out there struggling and not seeing results, be it learning automation, learning technology or whatever

“Trust the process” – @John Somnez

The results are not up to us. All we have to think about is the little decisions we make in our daily lives

Every person intends to do great things, but then why only a few make it?

The answer I like the most: “little decisions we make every day without even thinking that is a decision”

A lot of small sloppy decisions every day can take you far off course without us even realizing

So trust the process, have faith, in time it will pay off

Every overnight success has a decade long struggle behind it. Little decisions matter. Hang in there..

#QsDaily

 

1207, 2018

Parameterizing Jenkins jobs

By | July 12th, 2018|

Parameterizing Jenkins jobs

If you’re not doing it, or having problems with it read on.

Design every piece of code in or around your automation framework keeping maintainability, reusability, scalability and robustness in mind (Pillars of framework design)

In that spirit your Jenkins job should be parameterized

This will allow you to select different AUT versions, browsers, tests to run from Jenkins itself

Even if you don’t need it right now, you SHOULD in the future

In case your automation tool is having problems reading parameters from Jenkins

You can export them into different file formats (JSON, XML etc.) and read those settings on project initialization of the automation tool

Easier said than done, but with patience and trial and error, you’ll get there

#QsDaily #Jenkins

907, 2018

Checking DB connection

By | July 9th, 2018|

Problem checking connection to your Database?

I recently learned this trick using Universal Data Link files

There are many methods out there, sometimes could be confusing

For windows users I stumbled upon this neat trick:

– Create a new file with the extension “*.UDL”
– Open the file and enter data:

1. Enter the server IP (Sometimes machine names create problems)
2. Add database username and password
3. Select DB name from the list (should show all the DBs hosted on the machine with IP from step 1)
4. Press Test Connection

and Wala.. you can get your answer

P.S.
Your Spring Boots app might not be connecting to your DB because of using the machine name instead of the IP as well..

For more details:
https://fileinfo.com/extension/udl

#QsDaily #database

807, 2018

Learning Automation

By | July 8th, 2018|

How to learn automation?

The biggest problem with this question is, it’s not the right question to ask!

We perceive a tester’s career progresses by starting with ‘manual testing’ to ‘automation’ to ‘management’

I don’t think that’s an accurate picture

Mostly we start of in testing as ‘Non-Technical’ (unfortunately)

We deliver greater value once we become ‘Technical’ and learn how the technology stack works

And then when leadership skills are acquired, that gives another boost to our impact, hence a higher pay

It’s not about just automation, it’s about having the capability to create a greater impact on the business’s bottom line

#QsDaily #TestersGoingTechnical #TestAutomation

707, 2018

Life does not happen to you, it happens for you

By | July 7th, 2018|

“Life does not happen to you, it happens for you”

A line that resonated with me immediately and here’s why

Has it ever happened similar events keep happening in your life?

Is it just bad luck?

I’ve felt there is always a reason for why events out of our control take place

Sometimes we’re able to figure out the lesson we were meant to learn, a lot of times the meaning remains hidden

And until we understand why this is here, different events might keep on manifesting for us to learn

To lean and go to the next stage in life

If we choose to believe everything happens for a reason, we have a better chance at improving and being more content

#QsDaily

607, 2018

Running tests in parallel

By | July 6th, 2018|

Running tests in Parallel?

It’s not just about what tool to use

1. Why do you need parallel execution?
To reduce execution time yes, but are all the tests running needed? Or can they be executed at different stages of the SDLC instead of one go?

2. Are your tests designed keeping in mind parallel execution?
More here: https://goo.gl/977JEP

3. Parallel execution environment setup
Depends on the tooling you are using and the AUT. Few options I know of with open source:

– Selenium Grid (will run on single machine)
– Jenkins + VM – with Selenium running on multiple VMs / environments
– Jenkins + Docker – Running on a docker server where multiple containers running different tests in parallel. Can manage the parallel execution through Jenkins
– Jenkins + SaaS – services like BrowserStack, SauceLabs etc.
– Zalenium – Docker based Selenium grid. More here: https://goo.gl/pqXoQW

#QsDaily #Docker #Jenkins #TestAutomation

 

507, 2018

Can continuous testing help?

By | July 5th, 2018|

Continuous testing just a buzz word or can it really help you?

To quote my all-time favorite book ‘The teams to take a product from idea to the market will win’

Here’s how I explain it:

Bottom line of a company – Sales

The best way to predict sales and improve them? – Go and sell the product

Unless you don’t have anything to give to your customers, no way to get feedback from them

For decades we tried to ‘model’ markets, trends, buyer personas and so on

Sometimes actual results were around our estimate, mostly way off mark

Then we thought, let’s forget to try and ‘simulate’ the environment, let’s just put it out there instead

The reason for simulations and models was it took too much time to build a deliverable product

With all concepts around Agile, CI, CT, CD, DevOps, we are trying to move from once in a 6 month delivery to multiple times a ‘Day’

Still thinking if continuous testing can help?

A video I did on the subject:

#QsDaily #ContinuousTesting #DevOps #CI #CD

407, 2018

Lightning post on AI and ML

By | July 4th, 2018|

What are they and how are they related

AI –

is ‘Artificial’ since the machine will not be ‘aware’ and is only working from a set of mathematical formulas under a specific context

Intelligence – is relevant, a computer can beat the best chess player ever, but has no concept of winning or losing. Can we call VA’s like Siri ‘really’ intelligent?

So why call it intelligent? The same reason we started calling phones ‘smart’!

ML –

To develop ‘intelligence’, machines are ‘trained’ to answer specific questions in a given context

There are different ways in which machine learning is done, one is ‘pattern recognition’

To the problem we want to solve, a large sample answer set is ‘programmed’ in the machine

So when an actual problem is given, the machine matches the ‘patterns’ it sees with the patterns it was trained on..

#QsDaily #ArtificialIntelligence #MachineLearning #AI #ML

Load More Posts