Posts

Showing posts from October, 2020

Maven Cheat sheet

Image
 

What is a Web Service? Difference between REST and SOAP API

  The words "web services" mean many things to people with different fields. For general users, it is about using online services, like surfing the internet, but for developers and webmasters, it has different meanings. Overall it is a broad term that tells us how the communication between two different set of devices or applications held over the World Wide Web (WWW). This communication system can be categorized into two types, namely Simple Object Access Protocol or SOAP, and Representational State Transfer or REST. Quite often both are considered to be the terms with same meanings but the how both works and what tools both use for communication purposes creates the fine line between two. Before highlighting the differences between two, it merits to discuss what both actually are. What Is a REST API? REST is basically an architectural style of the web services that work as a channel of communication between different computers or systems on the internet. The term REST API i

Can we use ChromeDriver driver = new ChromeDriver() instead of WebDriver driver = new ChromeDriver()? If yes, what is the disadvantage?

We generally do it this way because usually we want to be able to run our tests on multiple browsers. If we declare the driver as a specific driver type, we are then anchored to only that driver. This is not a problem if you only ever need to test on say Chrome for example. But what if you later want your tests to also be able to work with IE, Opera, Firefox, etc.? These are extended classes of the WebDriver interface. If your main tests and other classes define the commonly shared driver as simply WebDriver instead of specifically being tied to ChromeDriver, then the same tests can be run without change to the test code itself simply by initializing the shared driver object with a different driver extended class.

Difference Between driver.get() and driver.navigate()

  driver.get()   is used to navigate particular URL(website) and wait till page load. driver.navigate()  is used to navigate to particular URL and does not wait to page load. It maintains browser history or cookies to navigate back or forward. The disadvantage of using driver.navigate() is that if your next step is trying to identify a webelement it might fail as driver.navigate().to() will not wait for the page to load.

How to handle multiple windows in Selenium

Image
- We can use the mehtod  driver.switchTo.window(WindowHandle); - Selenium assigns a Unique Id to each open window in Browser. This id is called window handle. You can get the window handle of all open windows by using driver.getWindowHandles() method which returns a Set of Window Handles. You can iterate this set to switch to the corresponding window. Example1: By getting parent window handle   Example 2: By using a count variable Example 2: Get the title of the page while iterating the Set and switch to the window with desired title.

Tell me a technical challenge you have faced during your work and how you tackled it.

Example 1:  In My previous organization we had to Migrate our database from MySQL to Postgres in a very short time which would impact the data of existing customers. It was my first time doing Migration testing and it was challenging as any mistake in testing would break the build on prod environment. Since, I was the most experienced on the product and was also an Individual contributor, I had to come up with strategies and analyze the impactual areas, create dummy data and perform migration testing on this dummy data dump. I had to consider many factors like the impact on UI after migration, Data loss, and analyze how the data was stored in the new database, like is data stored in proper format, does decimal fields have same precision as in the old DB, the performance of the application after migration etc. Example 2: As we know in agile the focus is deliver the functionality as soon as possible. So there was very less time spent on UI/UX and people were very focused on delivering fu

Manual Testing Mindmaps

Image
LEVELS OF TESTING: Test Design Techniques: SDLC: Types of Software Testing: STLC:

Root Cause analysis Techniques (Fishbone analysis and 5-Whys Technique)

 https://www.softwaretestinghelp.com/root-cause-analysis/#:~:text=RCA%20(Root%20Cause%20Analysis)%20is,but%20also%20across%20the%20organization.

How do you resolve STALE ELEMENT EXCEPTION?

STALE ELEMENT Exception occurs when Webdriver is trying to find a WebElement that is present on the page but it cannot be referenced. Suppose that user lands on the Homepage and there is "Courses" button on the Home page of your application. The user identifies the button as follows. Therefore, you write the code as: driver.get("www.testweb.com/homepage"); WebElement courseBtn = driver.findElement(By.xpath("//div/btn[text(),'Courses']")); Now the user goes to another page say "Tutors" and comes back again to Home page and tries to click on Courses link. Now when you use courseBtn.click(); ---> Throws STALE ELEMENT Exception. SOLUTION: To Handle this problem we will have to identify the button again. i.e again write following code: WebElement courseBtn2 =  driver.findElement(By.xpath("//div/btn[text(),'Courses']")); courseBtn2.click(); // This will now work

Test Estimation/Factors to consider while providing estimation for testing a story, Planning Poker

Story Point Estimation technique used in Agile (Planning poker) During the Sprint backlog meeting the stories are pulled from the product backlog into the Sprint backlog. The stories are then sized using Planning poker method in Agile. The Planning Poker is a consensus based technique and is used to size the stories (in terms of story point) or effort estimate (in terms of days). The following are the steps followed by the team while using the Planning Poker technique: Product Owner explains the story and its acceptance criteria in detail Team discusses the work involved and asks questions to the Product Owner Everyone estimates individually without getting influenced by others. Each team member selects a poker card that reflects their estimate of the effort required for that story Everyone reveals their estimates simultaneously. Team members who voted with the lowest and highest estimates explain their reasoning behind their estimation and any misunderstanding of scope is neutralized.

HTTP Response Codes/ REST API respponse codes

Image
 Rest API response codes Informational responses ( 100 – 199 ), Successful responses ( 200 – 299 ), Redirects ( 300 – 399 ), Client errors ( 400 – 499 ), and Server errors ( 500 – 599 ).

Components/attributes of test case OR Test case template

  Test suite ID:  Each test case belongs to a specific  test suite . This is the ID used to address it. Test Case ID:  To denote the test case. Test Case Description:  A brief summary of the test case along with its objective. Test pre requisites:  Covers all the chief requirements and preconditions which must be looked into, before executing the test case. Test case procedure:  It is a stepwise strategy to conduct the test. Test data:  Includes all the data and links relevant to the cause of testing. Expected result:  The anticipated conclusions from the test are prepared well in advance for verification with actual results of the test. Actual result:  The results from testing are matched with those from the expected conclusions. Status:  Denotes if the tests have been executed and if the application under test has passed or failed the test case. Also includes remarks for improvement in the test case. Test environment:  It is the platform on which the test case is to be executed. This

Use Case testing

 What is a Use case? - A use case is a list of steps to achieve a goal in the system. - These steps define the interaction between Actor and the System. - The use case outlines the main scenarios and the optional exceptional scenarios. Example: Use Case name: Cash Withdrawl Description: This use case describes how the Customer uses ATM system to withdraw cash from his/her bank account. Pre-condition:  1. ATM system is online 2. Sufficient balance is available Normal Workflow: 1 The Customer will insert the debit card 2 The System will prompt for a PIN 3 The Customer will enter valid PIN 4 The System will display the option to "Withdraw Cash" 5 The Customer will select the option to withdraw 6 The System will prompt for an amount 7 The Customer will enter a

Decision Tables and Error Guessing

Image
 Decision tables: - It is a technique to document and test complicated logic. - Helps test all combinations of Conditions - A Decision table contains CONDITIONS and ACTIONS. - The number of total combinations can be calculated by multiplying the number of each values a condition can take Example 1: Test the login feature using Decision table Decision table will look as follows: (T means a valid input is given and F means the field is left blank) CONDITIONS Username T T F F Password T F T F ACTIONS Expected Result Msg: Log in is success Msg: Please enter password Msg: Please Enter Username Msg: Invalid Username and Password Here, No. of co

Test case design techniques: BVA and Equivalence partitioning

Image
There are 6 test case design techniques/Black box testing techniques: 1. Equivalence Partitioning 2. Boundary Value Analysis 3. Decision tables 4. State Transition Diagram 5. Error Guessing 6. Use Case testing Equivalence Partititioning and BVA  Source: https://www.youtube.com/watch?v=uydAyjqTSiw&list=PLc3SzDYhhiGWuMK03uYO-UENAx0s2woWM&index=16 1. EQUIVALENCE PARTITION:  - It is a test design technique  - Divide input test data into partitions. - Test each partition only ONCE (The assumption here is that any input within a partition is equivalent i.e. it produces the same output) Example 1: Date field which accepts numbers between 1 and 31 The partition is as follows: ...,-3,-2,-1,0: Invalid partition 1 to 31: Valid partitition 32, 33, 34... : Invalid partition Pick 1 value from each partition to test the partition. Hence the field can be tested by entering values like -1,31,33. Example 2: Username field that accepts 6 to 10 characters 0,1,2,3,4,5: Invalid partition 6 to 10: Va

Software Test Life Cycle (STLC)

Image
Definition:  It is a sequence of activities conducted during the testing process to ensure software quality goals are met. PHASE ENTRY CRITERIA ACTIVITY EXIT CRITERIA DELIVERABLES Requirement analysis 1. Story is defined properly. 2. Acceptance criteria is clearly mentioned. 1. QA interacts with stakeholders to understand the requirements in detail. 2. Identify the type of testing that will be required(Functional or non-functional) 3. Identify test environment details. 4. Prepare RTM 5. Identify automation feasibility. 1. RTM is ready 2. Automation Feasibility report is done. 1. RTM 2. Automation feasibility report. Test Planning: The senior QA Manager determines the test strategy, efforts & estimations for the project. Resources, test envmt and testing schedule

Sample Test Plan

  TEST PLAN Table of Contents Introduction 3 1.1 Objectives 3 1.2 Team Members 3 2 Scope 3 3 Assumptions / Risks 4 3.1 Assumptions 4 3.2 Risks 4 4 Test Approach 4 4.1 Test Automation 4 5 Test Environment 5 6 Milestones / Deliverables 5 6.1 Test Schedule 5 6.2 Deliverables 5 1.Introduction The Test Plan has been created to communicate the test approach to team members. It includes the objectives, scope, schedule, risks and approach. This document will clearly identify what the test deliverables will be and what is deemed in and out of scope. 1.1Objectives Test Case Tamer is a web-based Test Management tool used to create and store tests as well as the results of running those tests. This tool is a new product written with Ruby on Rails using a ‘mysql’ database. The test team is responsible for testing the product and ensuring it meets their needs. The test team is both the customer and the test

Test Plan

A  Test Plan  is a detailed document that describes the test strategy, objectives, schedule, estimation, deliverables, and resources required to perform testing for a software product.   Test plan is a document that guides you on testing the application Created by Test Manager/Test Lead. 1.0    INTRODUCTION -  A brief summary of the product being tested. Outline all the functions at a high level. 2.0    OBJECTIVES:   Describe the objectives supported by the Master Test Plan, eg., defining tasks and responsibilities, vehicle for communication, document to be used as a service level agreement, etc. 3.0 SCOPE:   Defines what to be tested what not to be tested. 4.0 TESTING STRATEGY:   Describes the overall approach to testing. The approach should be defined in detail. 4.1 Unit testing Definition:  Define Unit testing with respect to the product Participants:  List the names/designations of people responsible for unit testing Methodology:  Describe how unit testing will be c