Wednesday, April 22, 2020

AutoIt

What is AutoIt?

AutoIt is a freeware scripting language designed for automating windows GUI and general scripting. It uses a combination of mouse movement, keystrokes and window control manipulation to automate a task which is not possible by selenium web-driver.

Why Use AutoIt?
Selenium is an open source tool that is designed to automate web-based applications on different browsers but to handle window GUI and non HTML popups in application. AutoIT is required as these window based activity are not handled by Selenium.

How to use AutoIT with Selenium

Source: https://www.guru99.com/use-autoit-selenium.html

Wednesday, April 15, 2020

Page Factory

What is Page Factory?


Page Factory is an inbuilt Page Object Model concept for Selenium Web-Driver but it is very optimized. Here, you follow the concept of separation of Page Object Repository and Test Methods.

What is Page Factory - Page Object Model in Selenium - Edureka

Additionally, with the help of the Page Factory class, I will use annotations @FindBy to find Web-Element.

For implementation of Page Object Model with Page Factory in Selenium Web-Driver use below link:
https://www.guru99.com/page-object-model-pom-page-factory-in-selenium-ultimate-guide.html



Tuesday, April 14, 2020

Defect/Bug Life Cycle in Software Testing

What is Defect Life Cycle?

DEFECT LIFE CYCLE or Bug Life Cycle is the specific set of states that a Bug goes through in its entire life. The purpose of the Defect life cycle is to easily coordinate bug status changes to various assigners and make the bug fixing process systematic.

Bug Life Cycle Status
The number of states that a defect goes through varies from project to project. Below life-cycle diagram, covers all possible states

New: When a new defect is logged and posted for the first time. It is assigned a status as NEW.

Assigned: Once the bug is posted by the tester, the lead of the tester approves the bug and assigns the bug to the developer team.

Open: The developer starts analyzing and works on the defect fix.

Fixed: When a developer makes a necessary code change and verifies the change, he or she can make bug status as "Fixed."

Pending retest: Once the defect is fixed the developer gives a particular code for retesting the code to the tester. Since the software testing remains pending from the testers end, the status assigned is "pending retest."

Retest: Tester does the retesting of the code at this stage to check whether the defect is fixed by the developer or not and changes the status to "Re-test."

What is Defect/Bug Life Cycle in Software Testing?

Verified: The tester re-tests the bug after it got fixed by the developer. If there is no bug detected in the software, then the bug is fixed and the status assigned is "verified."

Reopen: If the bug persists even after the developer has fixed the bug, the tester changes the status to "reopened". Once again the bug goes through the life cycle.

Closed: If the bug is no longer exists then tester assigns the status "Closed." 

Duplicate: If the defect is repeated twice or the defect corresponds to the same concept of the bug, the status is changed to "duplicate."

Rejected: If the developer feels the defect is not a genuine defect then it changes the defect to "rejected."
Deferred: If the present bug is not of a prime priority and if it is expected to get fixed in the next release, then status "Deferred" is assigned to such bugs.

Not a bug: If it does not affect the functionality of the application then the status assigned to a bug is "Not a bug".

20 basic OOPs Interview Questions & Answers

1. What is OOP?

Object-oriented programming (OOP) is a programming language model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.

2. Can you write the basic concepts of OOP?

  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism

3. What is a class?

A class is a broad definition of something, an instance (or object) is a specific example that fits under that broader class definition. e.g. TV is a class, and my Samsung TV is my instance.

4. What is an object?

It is the actual instance of a class. e.g. Car is class, my Mercedes Benz is an instance.

5. What is Encapsulation?

The Class can encapsulate the details of the logic.

6. What is Polymorphism?

Polymorphism is an object-oriented programming concept that refers to the ability of a variable, function or object to take on multiple forms.

7. What is Inheritance?

One class can extend the features of the other Class, and the first class will be the sub class, usually it implies a more specific type of entity. e.g. Dog is subclass of Pet. Dog is more specific whereas Pet can contain some common features of Pet. This way when I create a class called Cat, I do not need to repeat everything Pet has already got.

9. Define a constructor?

Constructor is a method used to initialise an object, and it gets invoked at the time of object creation. The creation of an object involves allocating the right amount of the memory.

10. Define Destructor?

Destructor is a method which is automatically called when the object is destroyed. You can clean up things there if needed.

12. What is a virtual method?

Virtual method is a member method of class and its functionality can be overridden in its derived or subclass class.

13. What is overloading?
Same method name, but different number or type of parameters.
for e.g.
void add(int a, int b);
void add(double a, double b);
void add(int a, int b, int c);

14. What is an abstract class?

  • An abstract class is a class which cannot be instantiated.
  • It will be inherited by specific type or class. (A type is a class, a class is a type)
  • An abstract class can contain only Abstract method.

15. What is a ternary operator?

condition ? expr1 : expr2 
If condition is true, expr1 is executed otherwise expr2 will be executed.

16. What is method overriding?

Method overriding is a feature that allows sub class to provide implementation of a method that is already defined in the main class. This will override the implementation in the super class by providing the same method name, same parameter and same return type.

17. What is an interface?

An interface is a contract.
An interface is a collection of abstract method. If the class implements an inheritance, and then thereby inherits all the abstract methods of an interface.

18.  What is exception handling?

Exception is an event that occurs during the execution of a program. Exceptions can be of any type – Run time exception, Error exceptions. Those exceptions are handled properly through exception handling mechanism like try, catch and throw keywords.

19. Difference between class and an object?

An object is an instance of a class. Objects hold information , but classes don’t have any information. Definition of properties and functions can be done at class and can be used by the object. Class can have sub-classes, and an object doesn’t have sub-objects.

20. What is early and late binding?

Early binding refers to assignment of values to variables during design time whereas late binding refers to assignment of values to variables during run time.

Interview Question for Quality Assurance

(Q.) Automation Testing - Process

  • Test tool selection - phase where you identify and select the automation tool for automation testing (refer to earlier post to understand how to choose a test automation tool)
  • Define scope of automation - what are you going to automate and won't you automate (refer to earlier post to understand how to choose a test automation tool)
  • Planning, Design and Development - Once you have identified the test cases to be automated, you can design and develop the automation suite, implementing relevant design pattern and framework.
  • Test Execution - Execute the above designed test case and record the test result.
  • Maintenance - Depending on the changes the Application Under Test goes through, update the existing automation test cases.


Automation Testing Tutorial — Know How to Automate Software Testing

(Q). Automation Test Cases - Suitable vs. Unsuitable

What test cases are suitable for automation?
Test cases to be automated can be selected using the following criterion to increase the automation ROI:

  • High Risk - Business Critical test cases.
  • Test Cases that are executed repeatedly.
  • Test Cases that are very tedious or difficult to perform manually.
  • Test Cases which are time consuming.


What test cases are NOT suitable for automation?
The following test cases are not suitable for automation:

  • Test Cases that are newly designed and not executed manually at least once.
  • Test Cases for which the requirements are changing frequently.
  • Test Cases which are executed on an ad-hoc basis.
(Q). Define the scope of Automation (Theses question is Usually asked in interviews)
"How do you identify test cases for automation?" or "What are the test cases that you will automate?" or "On what basis do you choose the test cases to be automated?"


Scope of automation is the area of your Application Under Test which will be automated. The following points help determine scope:
  • Feature that are important for the business
  • Scenarios which have large amounts of data
  • Common functionalities across applications
  • Technical feasibility
  • Extent to which business components are reused
  • Complexity of test cases
  • Ability to use the same test cases for cross browser testing
(Q). Automation Testing - Best Practices

To get maximum ROI from automation, observe the following

1. Scope of Automation needs to be determined in detail before the start of the project. This sets the expectations from Automation correctly.
2. Select the right automation tool: A tool must not be selected based on its popularity but its fit to the automation requirements.
3. Choose appropriate framework
4. Scripting Standards- Standards have to be followed while writing the scripts for Automation .Some of them are to create uniform scripts, comments and indentation of the code.
5. Adequate Exception handling - How error is handled on system failure or unexpected behavior of the application.
6. User defined messages should be coded or standardized for Error Logging for testers to understand.
7. Measure metrics- Success of automation cannot be determined by comparing the manual effort with the automation effort but by also capturing the following metrics.
  • Percent of defects found
  • Time required for automation testing for each and every release cycle
  • Minimal Time taken for release   
  • Customer satisfaction Index
  • Productivity improvement
(Q). Benefits of Automation Testing

Interviewers usually ask why do you have to automate a test case? or why is automation testing important? or what are the benefits of automating a test case?

Here are some answers you can give:
  • 70% faster than the manual testing
  • Wider test coverage of application features
  • Reliable results
  • Ensure Consistency
  • Saves Time and Cost
  • Improves accuracy
  • Human Intervention is not required while executing
  • Increases Efficiency
  • Better speed in executing tests
  • Reusable test scripts
  • Test Frequently and thoroughly
  • More cycles of execution can be achieved through automation 
  • Earlier time to market
(Q). What are the different types of testing that can be automated?

It is important for you to mention why and how you automated these types with an example from your experience.
  • Smoke Testing
  • Unit Testing
  • Integration Testing
  • Functional Testing
  • Keyword Testing
  • Regression Testing
  • Data Driven Testing
  • Black Box Testing
These are the test types that could be automated ideally.

(Q). How to choose a suitable Test Automation Tool.

Selecting the right tool can be a tricky task. The following criteria will help you select the best tool for your requirements:
  • Environment Support
  • Ease of use
  • Testing of Database
  • Object identification
  • Image Testing
  • Error Recovery Testing
  • Object Mapping
  • Scripting Language Used
  • Support for various types of test - including functional, test management, mobile, etc...
  • Support for multiple testing frameworks
  • Easy to debug the automation software scripts
  • Ability to recognize objects in any environment
  • Extensive test reports and results
  • Minimize training cost of selected tools 
Tool selection is one of biggest challenges to be tackled before starting automation. First, identify the requirements, explore various tools and their capabilities, set the expectation from the tool and go for a Proof Of Concept.

(Q). What is the testing process followed in your company?

It is important you explain this with an example from your experience. Ideally your answer should contain the below points in the same workflow.

The testing process differs from company to company according to their quality standard.

Phase 1: Requirements Analysis - where the team is allocated with a module of a requirement and asked to analyse and identify the testing scope. Requirement analysis includes setting objectives, the methodology adopted while testing, features to be tested and not to be tested, risk criteria, testing schedule, multi-platform support and the resource allocation for testing. Requirements could be either documented or not documented.

Phase 2: Objectives are set for major releases

Phase 3: Target Date planned for releases

Phase 4: Test plan document is prepared by the Test Lead based on the team's analysis. This includes objectives, the methodology adopted while testing, features to be tested and not to be tested, risk criteria, testing schedule, multi-platform support and the resource allocation for testing.

Phase 5: Test condition and test case preparation according to the requirements document.

Phase 6: Test execution - this can be either done manually or automated

Phase 7: Bug reporting and bug tracking

Phase 8: After fixing test again. (Regression /retest).

Phase 9: Test Completion Report


Friday, April 10, 2020

What to do, after Docker is Installed ?

After Docker is installed in your system, with Virtualization Enabled if you are using Windows 10 Home. Check whether virtualization is enabled using your Task Manager.

Step 1: Open Task Manager
Step 2: Click on Performance
Step 3: Check whether Virtualization is enabled



If it is not enabled, restart your system and keep pressing esc button and inside you will be able to find place where you can enable virtualization.

Also, there is one more very important step after Docker is installed. That step is to open the Docker Quickstart Terminal by doing a right click and Run as administrator (make sure you do that every time you open Docker).

If there are any issues with Docker installation. Then un-installation should be done properly. Even if a single old file is left in C drive, it could create trouble. To solve this problem, you can install Revo uninstaller software to uninstall Docker.

Image result for revo uninstqllr

Featured Posts