Things to be know regarding AUTOMATION Testing !!!

How it Started?

Automation! Automation! Once it was a nightmare for me. As for me coding is not a cup of my tea. Now, when I have started learning it with more efforts and enthusiasm to get this task ticked as done from my task list. Again, I have started learning and now I come across that to get rid of repetitive and monotonous boring task, and still want an accurate and good performance in less time for a stable requirement or to perform regression task we generate/create scripts (automation script in any programming language) which run automatically just on a single click that’s Automation.

This brings a wondering smile to my face and a thought strikes to my mind Ohh! that’s why everybody is running behind automation these days. Manual work is there and will remain forever but still who doesn’t like to get their work done fast with accurate result. So, Automations is their way…

Why Automation?

In my opinion, few points are there which helped me understand more about automation. These points initiated me to learn and implement it in my task.

  1. Auto (self) + Matic (Willing) means “Willing to self-perform” in simple terms. When we need to perform same task again and again in testing, we perform regression (to check nothing is affected due to the fixes made) every time some changes are made to code. We can use automation. As it says self-working / willing to self-perform means the task is performed itself with zeal. If one get help of machine to perform any task, one can save time and cost and that in the case, when one need to perform same task again and again. Example washing machine, clothes can be washed itself which helps in saving time and cost. So, Automation helps in reducing time taken and cost
  1. As we use automation for regression to validate that past features are still working or not. Might be they get affected by new changes implemented. As it says,

“Fixed goals stabilize life”.

          Same way fixed/frozen requirements stabilize the automation script.

  1. It is obvious and re-known that Manual labour is expensive. Hence, manual testing is expensive as one cost associated with hire skilled manual testers. However, this cost keeps on increasing with time. Whereas Automation cost is also too high at initial setup, i.e. cost associated to automation tool purchase, training and maintenance of test scripts is actually high. There are only few free ware automation tools available in market. Nevertheless this cost is one time cost. Think! Think! One time investment is better than investing similar good amount again and again.
  1. If one need to perform same task continuously in a same way and that to manually.  As,         

    “Necessity is a mother of invention

    One might find some easier and faster way to perform it. As it says:

    Haste makes waste”.

    It may lead to incomplete coverage. As one know result will be going to same. Here, automation helps whether we need to perform same task again and again covering all path/flow in fraction of time one can get the task done. Result remains the same which increase the consistency of work.

  1. It’s comparatively easy to develop a product, but you need to put much efforts in order to maintains its quality. So one needs to Stay competitive as market wants best of everything . And, Automation helps in creating better quality products, that too, in less time and cost which attracts the customer.
  1. If any work need to be done repetitively that too manually, the person loose the interest and the outcome drops. Sometimes, it happens due to monotonous work one might skip 100% coverage to attain the result. Whereas, when same work is automated, one can get good results each time which increases performance. With the help of automation, one can perform other tasks instead of spending time in same work.
  1. Repetitive work becomes boring, hence impacts on performance of any consistent tester. Just for the sake of completing the work, one may skip coverage or give an incorrect record. Whereas, automation provide a way to record all details and follow all paths mentioned in script to give accurate result.

Hope this might help/motivate you in your way to learn automation…..

Advertisement

Learning through the journey of Nightmare… ;)

During the phase of learning Java, one of my colleague (also sailing in same boat of learning selenium) asked me to side by side starting writing automation script in selenium. I was just giving a thought to this whether I should move to selenium or not. My lead pinged me and asked that I have to start writing code in selenium for any of the module in my application like as my other teammates were doing.I was worried more rather than confident about writing script. But I have to start as its an opportunity to work upon. I have started writing the script. I know little bit and my teammates were also there to help me out. I know how to find the xpath. I did that and try to login into my application but failed. But I was still happy atleast URL is launched that was of bit satisfaction. Now, I have tried all method to check my xpath is correct or not and I was on the verge of banging my head on wall as no conclusion was there what’s wrong in my code. I just asked one of selenium expert in my team to look into the code and my application and only in few minutes he said “Hey! your application is using iFrame tag”. He told me to use code
Driver.switchTo().frame(1); in my script.
I did the same and it worked. Thats cool! but does not end my query. So, I’d stop bothering my friend and my devta (Google) was there to help me out so I had start searching about iframe.

Definition and Usage (Refernce: w3schools.com)
The <iframe> tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.

Now, I know what is iFrame? Now, the question arises – How can I make out if my application is using iFrames or not?
While searching on internet I found out that with the help of Developer tool in browsers I can make out whether my application is using iframe or not. Just press F12 after launching the URL of application in any browser. Also make sure firebug is also there as add-ons in browser. As Firebug has a command line which allow to execute JavaScript expressions within the code/content of current page. In Firebug there is inbuit API and cd() is among one of them.

To check the presence of iframe just with the help of developer tool-> console select all tab.
> cd(window.frames); and press enter key. It will tell about the first frame from the list.
then cd(window.frames[1]); and so on..

Now, I was bit confident about iFrames.

Hope this might help you in concept of iFrame.
My journey of learning Selenium and Java is still on……

Selenium Nightmare