What is REST?

REST is an acronym for "representational state transfer." It's a design pattern or architectural style for APIs. A RESTful web application reveals information about itself as resource information.

What is REST Assured?

REST Assured is a Java library that offers programmers a domain-specific language (DSL) to write maintainable, robust tests for RESTful APIs. It is widely used to test web applications based on JSON and XML. Additionally, it supports all methods, including GET, DELETE, PUT, POST, and PATCH.

How to do Estimation in Software Testing?

Here are some techniques: 

  1. Agile Estimation: In these techniques, the current data and past  experience are used for estimation and new information is continuously integrated into the project to refine the process of estimation
  2. Work Breakdown Structure (WBS): It is a method of breaking down large tasks into smaller, easily executable groups
  3. Functional Point Analysis: Large tasks are broken down into small tasks. Each small task is then estimated based on size, cost and duration of project
  4. 3 Point Software Estimation Test: Tasks are broken down into smaller tasks, and then each task is estimated based on 3 points – Best case, Most likely and Worst case estimates
  5. Wideband Delphi method: It is a technique where an expert set of panel comes together to determine the most probable outcome and they have a common consensus
  6. Use – Case Methodologies
  7. Distribution in Percentage: Here, every stage is assigned or assessed in terms of percentages. This is to find how much effort should be put into each stage of the testing cycle.
  8. Method of Ad-Hoc

What is the Difference between Scrum and Kanban?

Here are few differences:

 ScrumKanban
ArtifactsProduct Backlog, Sprint Backlog, Product IncrementKanban Board
Concept PillarsTransparency, adaptation, inspectionEffective, efficient, predictable
CycleRegular 2 or 4 weeks sprintsContinuous flow
Change PolicyNot done within sprintincorporate any time
Estimation ImportanceHighLow
IdeologyLearn through experience, self organize and priortize, and reflect on wins and loses to continuous improve.Use visual to improve work in progress
Iterative ApproachYesNo
OriginSoftware DevelopmentLean Manufacturing
PracticeDaily Scrum, Sprint Planning, Sprint Review, Sprint RetrospectiveVisualize the flow of work, limit work in progress, manage flow, incorporate feedback loops
Problem SolverScrum Master. Cross-Functional TeamAll member or specialized team
Productivity MeasurementMeasures production using velocity through sprints. Each sprint is laid out back-to-back and/or concurrently so that each additional sprint relies on the success of the one before it.Measures production using “cycle time,” or the amount of time it takes to complete one full piece of a project from beginning to end.
RolesProduct Owner, Scrum Master and Development TeamNo Required Roles
Resource RequirementPreferred in less or more resource Preferred when resources are limited
Sub-Task CreationYesNo
Suitable for projectswith chainging prioritiesstable priorities
Team Member DependencyProcess does not disturbed when team member leaves in betweenProcess disturbed
ToolsJira Software, Axosoft, VivifyScrum, TargetprocessJira Software, Kanbanize, SwiftKanban, Trello, Asana

What are the Challenges and Limitations of Selenium?

Here are some challenges and limitations of Selenium:

  1. Barcode: Can not be automated
  2. Captcha: Can not be automated
  3. Element Interaction: Difficult to handle dynamic element due to limited selectors choice.
  4. Browser Compatibility: Test fail with browsers update
  5. Desktop Application: No Support
  6. Devtool support: Supported with version 4
  7. Learning Curve: Steep
  8. Mobile Testing: Supported with Appium Integration
  9. Reporting: Not Built-in
  10. Test Stability: Unstable and flaky test
  11. Touch & Gesture Support: Limited
  12. Visual Testing: No Support. Integration required with other tools

What are the Challenges and Limitations of WebDriverIO?

Here are some challenges or limitations with WebDriverIO:

  1. Community Support: Less community support.
  2. Documentation: Official documentation should be improved. Especially for WebDriver Appium Mobile.
  3. Language Support: Only support JavaScript/TypeScript
  4. Network Control & Interception: Not Easy to implement
  5. Selenium Limitations: Its a custom implementation of Selenium WebDriver. Some of Selenium challenges exist.
  6. Syntax: Syntax is typical for Beginners. e.g. async-await syntax.

     

How to Check if a Number is Palindrome in JavaScript?

Code

function isPalindrom(str) { 
  return str === str.split("").reverse().join("");
} 

console.log(isPalindrom("madam")); // return true
console.log(isPalindrom("hello")); // return false

How to Sum Two Numbers in JavaScript?

Code

function sum(num1, num2) { 
  return num1 + num2; 
} 

console.log("Sum:", sum(2, 3));  // output - Sum: 5

Difference between Type and Interface in Typescript?

Here are few differences:

Declaration and Merging

Unlike a type alias, an interface can be defined multiple times, and will be treated as a single interface (with members of all declarations being merged).

// These two declarations become:
// interface Point { x: number; y: number; }
interface Point { x: number; }
interface Point { y: number; }

const point: Point = { x: 1, y: 2 };

Extend

Both can be extended, but again, the syntax differs. Additionally, note that an interface and type alias are not mutually exclusive. An interface can extend a type alias, and vice versa.

Interface extends interface

interface PartialPointX { x: number; }
interface Point extends PartialPointX { y: number; }

Type alias extends type alias

type PartialPointX = { x: number; };
type Point = PartialPointX & { y: number; };

Interface extends type alias

type PartialPointX = { x: number; };
interface Point extends PartialPointX { y: number; }

Type alias extends interface

interface PartialPointX { x: number; }
type Point = PartialPointX & { y: number; };

Implement

A class can implement an interface or type alias, both in the same exact way. Note however that a class and interface are considered static blueprints. Therefore, they can not implement / extend a type alias that names a union type.

interface Point {
  x: number;
  y: number;
}

class SomePoint implements Point {
  x = 1;
  y = 2;
}

type Point2 = {
  x: number;
  y: number;
};

class SomePoint2 implements Point2 {
  x = 1;
  y = 2;
}

type PartialPoint = { x: number; } | { y: number; };

// FIXME: can not implement a union type
class SomePartialPoint implements PartialPoint {
  x = 1;
  y = 2;
}

Syntax

Both can be used to describe the shape of an object or a function signature. But the syntax differs.

Interface

interface Point {
  x: number;
  y: number;
}

interface SetPoint {
  (x: number, y: number): void;
}

Type

type Point = {
  x: number;
  y: number;
};

type SetPoint = (x: number, y: number) => void;

Usage

Unlike an interface, the type alias can be used for other types such as primitives, unions, and tuples.

// primitive
type Name = string;

// object
type PartialPointX = { x: number; };
type PartialPointY = { y: number; };

// union
type PartialPoint = PartialPointX | PartialPointY;

// tuple
type Data = [number, string];
teststep banner