Posts

Postman test cases on Jenkins

Image
 1. Download and install postman - https://www.postman.com/downloads/    2. Open postman and click on collection       Create new folder and start writing test cases -    This will generate test suit for you ( postman collection for test cases ) 3. Click on Environments and add key, value pair for the environment variables  Example - We can specify environment details here so that same test case by changing env can be executed on multiple environments like - DEV, QA, UAT and PRD  4. Now export postman collection and environment      postman.collection.testcases.json      postman.collection.env.json 5. Now install node js -  https://nodejs.org/en/download Install below node packages also -       sudo npm install -g newman      sudo npm install -g newman-reporter-htmlextra 6. Now go to the folder where postman collection and environment json are store  7. Run below commands -  newman run postman.collection.testcases.json -e postman.collection.env.json -r htmlextra --reporter-htmlextra-ex

SOLID Principles in programming

  If you follow, these principles you can improve the reliability of your code by working on its structure and its logical consistency. The SOLID principles are: The Single-Responsibility Principle (SRP) The Open-Closed Principle (OCP) The Liskov Substitution Principle (LSP) The Interface Segregation Principle (ISP) The Dependency inversion Principle (DIP) In general, the SOLID principles are basic learning steps for every code developer but are usually ignored by those who does not consider the highest quality of code their absolute priority. 1) The Single-responsibility principle (SRP) In other words, every component of your code (in general a class, but also a function) should have  one and only one responsibility . As a consequence of that, there should be only a reason to change it. Too often you see a piece of code that takes care of an entire process all at once. I.e., A function that loads data, modifies and, plots them, all before returning its result. 2) The Open–closed princ

Selenium with Docker for Test Case Execution

Image
  What is docker ? Docker is the next step beyond virtualisation. A Docker image contains everything it needs to run, independent of the Linux server on which it lives: a copy of the operating system, a database, code, configuration files, dependencies, and so on. Images can also be packaged and shared with other Docker admins. Why selenium execution using Docker ? Selenium helps you run tests locally, and it makes the process easy as you can configure your Windows manager. Wrapping the tests with Docker will help you easily move it to a different workspace as required. One of the biggest benefits of Docker is its capacity to scale. It’s particularly helpful because running Selenium grid on virtual machines or even separate machines takes up a lot of unnecessary computing overhead. Docker images share some system resources, so you need less resources than a virtual machine. You can easily cram several nodes in a single instance. Both Docker and Compose also handle the networking part e

What is Wireframe ?

    A wireframe is a layout of a web page that demonstrates what interface elements will exist on key pages. It is a critical part of the interaction design process. The aim of a wireframe is to provide a visual understanding of a page early in a project to get stakeholder and project team approval before the creative phase gets under way. Wireframes can also be used to create the global and secondary navigation to ensure the terminology and structure used for the site meets user expectations. It is quicker and cheaper to review and amend the structure of the key pages in a wireframe format. Iterating the development of the wireframes to a final version will provide the client and the design team confidence that the page is catering to user needs whilst fulfilling the key business and project objectives. Often used to complete the User Centred Design process, wireframes are also used at the beginning of the design phase. A prototype usability test will oft

Rest API automation using HTTP Client

Image
HTTP Response Status Codes - HTTP defines forty standard status codes that can be used to convey the results of a client’s request. The status codes are divided into the five categories presented below. 200 (OK) It indicates that the REST API successfully carried out whatever action the client requested, and that no more specific code in the 2xx series is appropriate. Unlike the 204 status code, a 200 response should include a response body.The information returned with the response is dependent on the method used in the request, for example: GET an entity corresponding to the requested resource is sent in the response; HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body;  POST an entity describing or containing the result of the action; TRACE an entity containing the request message as received by the end server. 201 (Created) A REST API responds with the 201 status code whenever a resource is cr