Friday, July 26, 2019

Setting up Selenium WebDriver with Eclipse IDE in Linux

How to set up Selenium WebDriver in Eclispe IDE on Linux?

Pre-requisites:

  • Eclipse is installed
  • Java is installed and Environment path is correctly set.

Steps to be followed:

  1. Launch Eclipse
  2. Create a Java Project
  3. Create a Package under "src" folder.
  4. Create a class inside the package

How to verify Java is installed and check the version?

  • Open terminal or press Ctrl + Alt + t on your keyboard.
  • Type - javac -version and hit enter.
  • If java is installed, the output will be something like - 
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)


Launching Eclipse

  • After installing eclipse, one folder with name "eclipse" will get created. 
  • Go to that folder and look for executable file named "eclipse" and double click on it to launch eclipse.



  • When this screen comes, it allows you to create a workspace and to choose a path for your workspace. Once you're ready click "Launch".
  • Once you clicked on launch, Eclipse will starts launching with the workspace selected in the above step.

  • You would see this window once your workspace is loaded completely. Here you can see quick links on left side under "Project Explorer" tab. 



Create a Project

  • Now click on "Create a project" quick link. A "New Project" window will open up which lets you select the type of project which you wish to create.
                                    
  • Click on "Java Project" and click on "Next".

  • On clicking "Next" another windows gets open which lets you give a name to the Project and once you're ready click "Finish".
  • OR You can also simply go to File > New > click on Java Project. Which opens up the window shown below.

  • Once you click on "Finish", the project with the given name will display on left pane.


Create a Package

Right click on "MyFirstProject" and New > Package. On clicking on Package a window will appear to give name for the Package. Once you're ready click on "Finish".


Once you click on "Finish" button, your package will get created and will display under your project.


Create a Class

To create a class, right click on package or project, New > Class. On clicking Class a window will appear to give name for the Class. You can select a "main" method to include in the Class (shown by a red arrow in the image below) or if you don't select it, then you can write it manually inside your class. 

Once you're ready click on "Finish".



Once the Finish is clicked, Class will get created and it will start displaying under the package name "org.app.v1".


Configuring Selenium

  • Right click on project "MyFirstProject" > Buid Path > Configure Build Path.
  • A window will get open and now go to "Libraries".
  • Click on "Add external JARs" to add selenium jar files.


  • Once you're done adding the selenium jar files in the libraries, click on "Apply and Close".


You have successfully configured Eclipse with Selenium WebDriver now. 

Thursday, July 25, 2019

Usability Testing

Usability


To understand the word "Usability" it can be broken in to "User" + "ability". User's ability to use anything, it may be a website, or driving a vehicle or a chair to sit on.

Usability is a part of user experience which speaks about the ease of access or using any functionality or a product. Let's move on to see "What is Usability Testing".

What is Usability Testing?

Usability testing is a type of testing which tries to see a product or a website from the users' end. And tries test or explore as a real user to see how easy or intuitive the experience provided by the product or a website. Now, the question arises is "When to perform usability testing?".

When to perform usability testing?

Usability testing should be performed at the early stages of SDLC (Software Development Life Cycle) so that the the UX perspective can be taken into consideration and which could help to uncover user expectations. 

Advantages of Usability Testing

Gives an output which is more user-friendly
Gives users' an ability to access and use the product easily.
Unleashes usability gaps before the product is ready for use.
Increased user satisfaction
Makes product more intuitive  
Helps to get a direct feedback from the users who use the system.
Helps in Customer retention
Helps business to grow

Saturday, July 20, 2019

Requirement Traceability Matrix

Requirement Traceability Matrix


Traceability means the ability to trace something. RTM or Requirement Traceability Matrix is a matrix where mapping of the entire requirements provided by the client or a Product owner is done in a single document which can be taken as a proof that the requirements are incorporated in to the final feature / product to be delivered.

RTM is a list of requirements and a place to track them with test cases. The aim to having this matrix or document is to ensure a full test coverage with the requirement and there is a no miss of any functionality while testing process.

Why RTM?


As it is utmost important for a tester to understand the requirements completely, so to deliver a high quality output. As the further processes depends on how good is the understanding of requirements, hence it makes very important to involve testers in initial stages of SDLC.

Now, once the requirements are clear, further these requirements are broken down to test scenarios and next to detailed test cases.

Here comes the answer to question "Why RTM". Once the detailed test cases are in place, to verify that it aligns with the requirement, we use RTM to map requirements with test scenarios and test cases. In this way RTM will be helpful in gauging that we have complete test coverage and ensure a quality output.

RTM is typically a excel sheet where the mapping of requirements with test cases and scenarios is done. 

Wednesday, July 17, 2019

Starting API Testing? - Here are the few things to know before you start!

What is an API?

API stands for Application Programming Interface. It's an interface responsible for communication / data transfer between two different software applications.

There are mainly two types of Web Services:

  • REST (Representational State Transfer)
  • SOAP (Simple Object Access Protocol)

REST stands for Representational State Transfer, which provides an ability of exchanging information between the the applications. These web services provide a predefined set of stateless operations and allow requesting applications to access and manipulate the data.

SOAP stands for Simple Object Access Protocol, which allows exchange of meaningful information between the applications using XML. It helps in exchanging structured information.

HTTP Methods

HTTP stands for Hyper Text Transfer Protocol is an application protocol for distributed and collaborative information systems.

HTTP defines some set of methods to indicate the expected action to be performed for a given resource. Each of them implement a different logic, but some common characteristics are shared by group of them. eg; a request can be idempotent or non-idempotent.

GET 
GET method is used when we need to retrieve the data. For simple understanding, it's like a Select command in SQL.This request doesn't result in modification of the data. If the request is successful, the status code of 200(OK) is received along the data in a particular JSON or XML format. This method is idempotent, i.e no matter how many times you make the request, there won't be any change in the data.

POST
POST method is used when we need to make manipulation of the data. Mostly, it is used to create a resource. When this request is made, a new resource gets created and if it's a successful requests a status code of 201(CREATED) is received. This method is non-idempotent, i.e this may result in duplicates or errors if called more than once.

PUT
PUT method is used when we need to make manipulation of the data. Mostly, it is used to update a existing resource. It maybe used to create a resource is request is made from client side. When this request is made, a new resource gets created and if it's a successful requests a status code of 201(CREATED) is received. This method is idempotent, i.e no matter how many times you make the request, there won't be any change in the data.

DELETE
- DELETE method is used to delete a resource. On a successful request, a status code of 200(OK) is received. This method is also idempotent as if a resource is deleted once it cannot affect it no matter how many times the request is made.

HTTP Response Codes

HTTP response codes fall under following categories:

1xx - Response code series starts with '1' are Informational codes.
2xx - Response code series starts with '2' are Success codes
3xx - Response code series starts with '3' are Redirection codes
4xx - Response code series starts with '4' are Client side error codes
5xx - Response code series starts with '5' are Server side error codes


Featured Post

API Automation using Newman - Part II

HTML Report via Newman In previous post we have seen how to setup Newman and execute the collections via Newman in command line. Ne...