<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Manjiri kalkundrikar on Medium]]></title>
        <description><![CDATA[Stories by Manjiri kalkundrikar on Medium]]></description>
        <link>https://medium.com/@manjiri-softwaretesting?source=rss-ac30844b47c7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*B9obub3VBnKnbY5d</url>
            <title>Stories by Manjiri kalkundrikar on Medium</title>
            <link>https://medium.com/@manjiri-softwaretesting?source=rss-ac30844b47c7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 15:21:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manjiri-softwaretesting/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OOPS in Typescript]]></title>
            <link>https://manjiri-softwaretesting.medium.com/oops-in-typescript-4fee2caee254?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fee2caee254</guid>
            <category><![CDATA[oops-in-typescript]]></category>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 05:13:21 GMT</pubDate>
            <atom:updated>2026-11-23T05:13:21.001Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Why OOPS is important in Playwright Automation?</strong></p><p>OOPS helps build reusable, maintainable, scalable, and readable automation frameworks. Concepts like encapsulation, inheritance, abstraction, and classes reduce duplicate code and make Page Object Model implementation easier in Playwright.</p><p>OOPS include-</p><p>Class</p><p>Object</p><p>Encapsulation</p><p>Inheritance</p><p>Polymorphism</p><p>Abstraction</p><h3>1. Class</h3><p>A <strong>class</strong> is a blueprint for creating objects.</p><p>A <strong>class</strong> is a template that contains:</p><ul><li>Variables (properties)</li><li>Functions (methods)</li></ul><p>In Playwright, pages are usually represented as classes. We use classes in POM to represent pages and encapsulate their locators and actions in one place. This improves reusability, maintainability, and readability, and helps us avoid duplicating code across test cases.</p><h3>Why Important?</h3><p>Without classes:</p><ul><li>Same code repeats</li><li>Hard maintenance</li></ul><p>With classes:</p><ul><li>Reusable pages</li><li>Clean framework</li></ul><p>In Playwright, classes are commonly used for:</p><ul><li>Page Objects (LoginPage, DashboardPage)</li><li>Utility classes</li></ul><h3>Example:</h3><p>class LoginPage {</p><p>openPage() {</p><p>console.log(“Opening Login Page”);</p><p>}</p><p>login() {</p><p>console.log(“Perform Login”);</p><p>}</p><p>}</p><p>const login = new LoginPage();</p><p>login.openPage();</p><p>login.login();</p><h3>Output:</h3><p>Opening Login Page</p><p>Perform Login</p><h3>Playwright Example:</h3><p>import { Page } from ‘@playwright/test’;</p><p>export class LoginPage {</p><p>constructor(private page: Page) {}</p><p>async login(username: string, password: string) {</p><p>await this.page.fill(‘#username’, username);</p><p>await this.page.fill(‘#password’, password);</p><p>await this.page.click(‘#login’);</p><p>}</p><p>}</p><p><strong>2. Object</strong></p><p>An <strong>object</strong> is an instance of a class. Object is real working copy of class.</p><p>Why?</p><p>Because every page interaction happens through objects</p><p>Example:</p><p>const login=new LoginPage(page);</p><p>Here:</p><ul><li>LoginPage → Class</li><li>login → Object</li></ul><h3>Simple Example</h3><p>class Car {</p><p>start(){</p><p>console.log(“Car Started”);</p><p>}</p><p>}</p><p>const c1=new Car();</p><p>c1.start();</p><p><strong>Constructor</strong></p><p>Constructor initializes objects.</p><p><strong>Why do we need Constructor in TypeScript/Playwright?</strong></p><p>Constructor is used to initialize objects automatically during object creation. In Playwright, constructors are commonly used to store the Page object so that page methods can access browser actions without passing page repeatedly.</p><p>Syntax:</p><p>constructor(){}</p><h3>Simple Example</h3><p>class Student {</p><p>constructor(</p><p>public name:string</p><p>){}</p><p>}</p><p>const s=</p><p>new Student(“Manjiri”);</p><p>console.log(s.name);</p><p><strong>Output:</strong></p><p>Manjiri</p><h3>Real Playwright Framework Example</h3><h3>BasePage.ts</h3><p>class BasePage {</p><p>constructor(</p><p>protected page:Page</p><p>){}</p><p>async wait(){</p><p>await this.page.waitForLoadState();</p><p>}</p><p>}</p><h3>LoginPage.ts</h3><p>class LoginPage</p><p>extends BasePage {</p><p>async login(){</p><p>await this.page.click(</p><p>‘#login’</p><p>);</p><p>}</p><p>}</p><p>Test:</p><p>const login=</p><p>new LoginPage(page);</p><p>await login.login();</p><p>The constructor gives child classes access to page.</p><p>For clear concepts:watch this <a href="https://www.youtube.com/watch?v=tiWqCBXnWj0">https://www.youtube.com/watch?v=tiWqCBXnWj0</a></p><p><strong>3. Encapsulation</strong></p><p>Hiding internal data/implementation and exposing only required functionality.</p><p><strong>What is Encapsulation and what is its use in Playwright automation?</strong></p><p>Encapsulation is the OOPS concept of hiding implementation details and exposing only necessary functionality. In Playwright automation, Encapsulation is used to hide locators and browser interaction logic inside page classes while exposing reusable actions like login() or submit(). This improves maintainability, readability, and framework stability.</p><p>Real-life example:</p><p>ATM Machine</p><p>Visible:</p><p>Withdraw()</p><p>Deposit()</p><p>Hidden:</p><p>PIN validation</p><p>Bank calculations</p><p>Database calls</p><h3>Simple TypeScript Example</h3><p>Without Encapsulation:</p><p>class Employee {</p><p>salary=50000;</p><p>}</p><p>const emp=</p><p>new Employee();</p><p>emp.salary=1;</p><p>Problem:</p><p>Anyone can change salary</p><p><strong>With Encapsulation:</strong></p><p>class Employee {</p><p>private salary=50000;</p><p>public getSalary(){</p><p>return this.salary;</p><p>}</p><p>}</p><p>const emp=</p><p>new Employee();</p><p>console.log(</p><p>emp.getSalary()</p><p>);</p><p>// emp.salary ❌</p><p>Output:</p><p>50000</p><p>What happened?</p><p>salary → hidden</p><p>getSalary()</p><p>→ controlled access</p><p>This is Encapsulation.</p><h3>Playwright Example (Without Encapsulation) ❌</h3><p>test(</p><p>‘Login’,</p><p>async ({ page })=&gt;{</p><p>await page.fill(</p><p>‘#username’,</p><p>‘admin’</p><p>);</p><p>await page.fill(</p><p>‘#password’,</p><p>‘123’</p><p>);</p><p>await page.click(</p><p>‘#login’</p><p>);</p><p>}</p><p>);</p><p>Problem:</p><p>Locator repeated</p><p>Hard maintenance</p><p>If locator changes:</p><p>Update many files</p><h3>Playwright Example (With Encapsulation) ✅</h3><h3>LoginPage.ts</h3><p>class LoginPage {</p><p>constructor(</p><p>private page:Page</p><p>){}</p><p>private username=</p><p>‘#username’;</p><p>private password=</p><p>‘#password’;</p><p>private loginButton=</p><p>‘#login’;</p><p>public async login(){</p><p>await this.page.fill(</p><p>this.username,</p><p>‘admin’</p><p>);</p><p>await this.page.fill(</p><p>this.password,</p><p>‘123’</p><p>);</p><p>await this.page.click(</p><p>this.loginButton</p><p>);</p><p>}</p><p>}</p><h3>Test</h3><p>test(</p><p>‘Login’,</p><p>async ({ page })=&gt;{</p><p>const login=</p><p>new LoginPage(page);</p><p>await login.login();</p><p>}</p><p>);</p><h3>What is Hidden?</h3><p>username locator</p><p>password locator</p><p>click implementation</p><p>Test only sees:</p><p>login()</p><p>This is Encapsulation.</p><p><strong>Inheritance</strong>, <strong>super()</strong>, <strong>Overriding</strong>, and <strong>Access Modifiers</strong></p><p><strong>4. Inheritance in TypeScript</strong></p><p>• Inheritance allows a <strong>child class </strong>to acquire (<strong>Gets </strong>/ <strong>inherits</strong> ) properties and methods from another <strong>parent</strong> <strong>class</strong>.</p><p>• Use the <strong>extends </strong>keyword.</p><p>class Animal {</p><p>eat() {</p><p>console.log(“Animal eats food”);</p><p>}</p><p>}</p><p>class Dog extends Animal {</p><p>bark() {</p><p>console.log(“Dog barks”);</p><p>}</p><p>}</p><p>const d = new Dog();</p><p>d.eat(); // Inherited from Animal</p><p>d.bark(); // Own method</p><p><strong>super()</strong></p><p>• <strong>super() </strong>is used in the <strong>child class constructor </strong>to call the <strong>parent class</strong></p><p>Why do we need super()?</p><p>Suppose the parent class has a constructor<strong>.</strong></p><h3>Parent Class:</h3><p>class Animal {</p><p>constructor() {</p><p>console.log(“Animal Constructor”);</p><p>}</p><p>}</p><h3>Child Class:</h3><p>class Dog extends Animal {</p><p>constructor() {</p><p>super();</p><p>console.log(“Dog Constructor”);</p><p>}}</p><p>const dog = new Dog();</p><h3>Output</h3><p>Animal Constructor</p><p>Dog Constructor</p><h3>What happened?</h3><p>When you create:</p><p>const dog = new Dog();</p><p><strong>Execution order:</strong></p><p>Dog Constructor</p><p>▼</p><p>super()</p><p>▼</p><p>Animal Constructor</p><p>▼</p><p>Back to Dog Constructor</p><p>So the parent constructor always executes first.</p><p><strong>Method Overriding</strong></p><p>•Method overriding occurs when a child class provides its own implementation for a method already defined in the parent class. It enables runtime polymorphism and allows different classes to behave differently while keeping the same method name.</p><p>• A <strong>child class can redefine (override) </strong>a method from the parent class.</p><p>• The method in the child class should have the <strong>same name</strong>.</p><p>class Animal {</p><p>makeSound() {</p><p>console.log(“Animal makes sound”);</p><p>}</p><p>}</p><p>class Dog extends Animal {</p><p>makeSound() {</p><p>console.log(“Dog barks”);</p><p>}</p><p>}</p><p>const dog = new Dog();</p><p>dog.makeSound(); // Output: Dog barks</p><h3>Simple Example (Easy to Understand)</h3><p>Imagine all users can login, but Admin login works differently.</p><p>class User {</p><p>login() {</p><p>console.log(“Login as Normal User”);</p><p>}</p><p>}</p><p>class Admin extends User {</p><p>login() {</p><p>console.log(“Login as Admin”);</p><p>}</p><p>}</p><p>const user =</p><p>new User();</p><p>user.login();</p><p>const admin =</p><p>new Admin();</p><p>admin.login();</p><h3>Output</h3><p>Login as Normal User</p><p>Login as Admin</p><h3>What happened?</h3><p>User</p><p>↓</p><p>login()</p><p>Admin</p><p>↓</p><p>login() ← overrides parent login()</p><p>The child class (Admin) replaced the parent logic.</p><p><strong>What is the use of Method Overriding in Playwright?</strong></p><p>Method overriding allows child page classes to provide their own implementation of common actions such as submit, save, open, or validation methods defined in the base page. This helps create reusable and maintainable Page Object Model frameworks while supporting different page behaviors.</p><h3>1. Common Action, Different Implementation</h3><p>Imagine your application has:</p><p>Login Page</p><p>CAR Page</p><p>Loan Page</p><p>Dashboard Page</p><p>Every page has:</p><p>submit()</p><p>But submit works differently.</p><h3>BasePage.ts</h3><p>class BasePage {</p><p>async submit() {</p><p>console.log(</p><p>“Default Submit”</p><p>);</p><p>}</p><p>}</p><h3>CARPage.ts</h3><p>class CARPage</p><p>extends BasePage {</p><p>async submit() {</p><p>console.log(</p><p>“Submit CAR Form”</p><p>);</p><p>}</p><p>}</p><h3>LoanPage.ts</h3><p>class LoanPage</p><p>extends BasePage {</p><p>async submit() {</p><p>console.log(</p><p>“Submit Loan”</p><p>);</p><p>}</p><p>}</p><h3>Test</h3><p>await carPage.submit();</p><p>await loanPage.submit();</p><p>Output:</p><p>Submit CAR Form</p><p>Submit Loan</p><p><strong>Access Modifiers</strong></p><p>Access modifiers control <strong>who can access variables and methods</strong>.</p><p>There are 3 main access modifiers:</p><p>public</p><p>private</p><p>protected</p><h3>1. public → Accessible Everywhere</h3><h3>Meaning</h3><p>A public property or method can be accessed:</p><ul><li>Inside the same class</li><li>Outside the class</li><li>Inside child classes</li></ul><p>This is the default in TypeScript.</p><h3>Example</h3><p>class Employee {</p><p>public name=”Manjiri”;</p><p>public work(){</p><p>console.log(</p><p>“Testing”</p><p>);</p><p>}</p><p>}</p><p>const emp=</p><p>new Employee();</p><p>console.log(</p><p>emp.name</p><p>);</p><p>emp.work();</p><p>Output:</p><p>Manjiri</p><p>Testing</p><h3>Explanation</h3><p>Employee</p><p>↓</p><p>public name</p><p>↓</p><p>Accessible anywhere</p><h3>2. private → Accessible Only Inside Same Class</h3><h3>Meaning</h3><p>A private member cannot be accessed outside the class.</p><p>Used to hide internal details.</p><h3>Example</h3><p>class Employee {</p><p>private salary=50000;</p><p>showSalary(){</p><p>console.log(</p><p>this.salary</p><p>);</p><p>}</p><p>}</p><p>const emp=</p><p>new Employee();</p><p>emp.showSalary();</p><p>// emp.salary ❌ Error</p><p>Output:</p><p>50000</p><h3>Explanation</h3><p>Employee</p><p>↓</p><p>private salary</p><p>↓</p><p>Only inside class</p><h3>Why Playwright Uses private?</h3><p>Locators should not be modified from tests.</p><p>Example:</p><p>class LoginPage {</p><p>private username=</p><p>‘#user’;</p><p>private password=</p><p>‘#pass’;</p><p>async login(){</p><p>}</p><p>}</p><p>Test:</p><p>await login.login();</p><p>// login.username ❌ Not allowed</p><p>Benefit:</p><p>Protect locators</p><h3>3. protected → Accessible Inside Class + Child Class</h3><h3>Meaning</h3><p>protected allows access:</p><ul><li>Inside parent class</li><li>Inside child class</li></ul><p>But NOT outside.</p><h3>Example</h3><p>class Employee {</p><p>protected department=</p><p>“QA”;</p><p>}</p><p>class Tester</p><p>extends Employee {</p><p>show(){</p><p>console.log(</p><p>this.department</p><p>);</p><p>}</p><p>}</p><p>const t=</p><p>new Tester();</p><p>t.show();</p><p>// t.department ❌ Error</p><p>Output:</p><p>QA</p><p>Explanation:</p><p>Parent</p><p>↓</p><p>protected</p><p>↓</p><p>Child can access</p><p><strong>What is the use of access modifiers in Playwright automation?</strong></p><p>Access modifiers help control visibility and protect framework structure. public exposes reusable actions to tests, private hides locators and internal implementation, and protected allows shared access between base and child page classes while preventing external modification.</p><h3>Example of All Three Together</h3><p>class LoginPage {</p><p>constructor(</p><p>protected page:Page</p><p>){}</p><p>private username=</p><p>‘#user’;</p><p>private password=</p><p>‘#pass’;</p><p>public async login(){</p><p>await this.page.fill(</p><p>this.username,</p><p>‘admin’</p><p>);</p><p>await this.page.fill(</p><p>this.password,</p><p>‘123’</p><p>);</p><p>}</p><p>}</p><p>Usage:</p><p>const login=</p><p>new LoginPage(page);</p><p>await login.login();</p><p>Test can call:</p><p>login()</p><p>But cannot access:</p><p>username</p><p>password</p><p>page</p><p>Used to control the visibility of class members (properties and methods):</p><p><strong>Modifier</strong></p><p><strong>Description</strong></p><p><strong>public</strong></p><p>Accessible from anywhere (default)</p><p><strong>private</strong></p><p>Accessible only within the same class</p><p><strong>protected</strong></p><p>Accessible in the class and its subclasses</p><p>class Person {</p><p>public name: string;</p><p>private age: number;</p><p>protected city: string;</p><p>constructor(name: string, age: number, city: string) { this.name = name;</p><p>this.age = age;</p><p>this.city = city;</p><p>}</p><p>}</p><p>class Student extends Person {</p><p>showCity() {</p><p>console.log(this.city); // allowed (protected) // console.log(this.age); // Error (private) }</p><p>}</p><p><strong>Note</strong>: ‘<strong>this’ refers to the current object (current instance) of the class.</strong></p><h3>Example 1: Without this</h3><p>class Employee {</p><p>name = “Manjiri”;</p><p>display() {</p><p>console.log(name);</p><p>}</p><p>}</p><p>❌ Error</p><p>Why?</p><p>Because name is a property of the class, not a local variable.</p><h3>Example 2: Using this</h3><p>class Employee {</p><p>name = “Manjiri”;</p><p>display() {</p><p>console.log(this.name);</p><p>}</p><p>}</p><p>const emp = new Employee();</p><p>emp.display();</p><h3>Output</h3><p>Manjiri</p><p>Here:</p><p>this.name</p><p>↓</p><p>Current object’s name</p><h3>5. Polymorphism</h3><p>Polymorphism means:</p><p><strong>One interface (same method name), multiple behaviors.</strong></p><p><strong>What is Polymorphism and what is its use in Playwright automation?</strong></p><p>Polymorphism is the OOPS concept where the same method behaves differently depending on the object. In Playwright automation, it is used to implement common actions like submit, save, login, or validation differently across page classes while keeping test code reusable and clean.</p><p>In TypeScript, polymorphism is commonly achieved using:</p><ol><li><strong>Method Overriding </strong>(Refer this for page no.15)</li><li><strong>Interfaces</strong></li><li><strong>Inheritance </strong>(Refer this for page no.12)</li></ol><p><strong>Interfaces</strong></p><p>An interface is a blueprint or contract that defines the structure of an object or class. It specifies what properties and methods must exist without providing their implementation.</p><h3>What is the use of Interfaces in Playwright automation?</h3><p>In Playwright automation, interfaces are used to define consistent structures for test data, API request/response models, configuration objects, and common page contracts. They improve type safety, readability, and maintainability by ensuring that objects and classes follow a predefined structure.</p><h3>Advantages of Interfaces</h3><p><strong>Benefit</strong></p><p><strong>Why it helps</strong></p><p>Consistency</p><p>Every class/object follows the same structure</p><p>Type Safety</p><p>Prevents missing or incorrect properties</p><p>Better Code Quality</p><p>Detects errors during development</p><p>Easy Maintenance</p><p>Update the interface to update the contract</p><p>Better Readability</p><p>Makes expected data and behavior clear</p><h3>Do We Use Interfaces Every Day in Playwright?</h3><p>It depends on the project.</p><ul><li><strong>Small projects:</strong> You might use interfaces only for test data or API responses.</li><li><strong>Large enterprise frameworks:</strong> Interfaces are commonly used for page contracts, reusable services, configuration objects, API models, and shared data structures.</li></ul><p>Many frameworks rely more on <strong>BasePage (inheritance)</strong> than on interfaces for page objects, but interfaces are still very useful for enforcing consistency.</p><p><strong>Simple meaning:</strong></p><p>Interface</p><p>↓</p><p>Defines WHAT should exist</p><p>↓</p><p>Does NOT define HOW it works</p><h3>Why Do We Need Interfaces?</h3><p>Imagine you tell every employee:</p><p>Every employee must:</p><p>✔ Login</p><p>✔ Logout</p><p>✔ Submit Report</p><p>You don’t tell them <strong>how</strong> to do it.</p><p>That is an interface.</p><h3>Basic Example</h3><p>interface Employee {</p><p>name: string;</p><p>work(): void;</p><p>}</p><p>Here, the interface says:</p><p>Every Employee must have:</p><ul><li>name</li><li>work()</li></ul><p>But it doesn’t provide the implementation.</p><h3>Implementing an Interface</h3><p>interface Employee {</p><p>name: string;</p><p>work(): void;</p><p>}</p><p>class Tester implements Employee {</p><p>name = “Manjiri”;</p><p>work() {</p><p>console.log(“Testing Application”);</p><p>}</p><p>}</p><p>const tester = new Tester();</p><p>tester.work();</p><h3>Output</h3><p>Testing Application</p><h3>What Happened?</h3><p>Employee Interface</p><p>│</p><p>├── name</p><p>├── work()</p><p>│</p><p>Tester Class</p><p>│</p><p>✔ name</p><p>✔ work()</p><p>The Tester class <strong>must implement everything</strong> defined in the interface.</p><h3>If You Miss Something</h3><p>interface Employee {</p><p>name: string;</p><p>work(): void;</p><p>}</p><p>class Tester implements Employee {</p><p>name = “Manjiri”;</p><p>}</p><p>❌ Error</p><p>Why?</p><p>Because work() is missing.</p><p>An interface is like a contract — you must fulfill it.</p><h3>Interface with Multiple Classes</h3><p>interface Payment {</p><p>pay(): void;</p><p>}</p><h3>Credit Card</h3><p>class CreditCard implements Payment {</p><p>pay() {</p><p>console.log(“Paid using Card”);</p><p>}</p><p>}</p><h3>UPI</h3><p>class UPI implements Payment {</p><p>pay() {</p><p>console.log(“Paid using UPI”);</p><p>}</p><p>}</p><p>Both classes follow the same interface.</p><h3>What is the Use of Interfaces in Playwright Automation?</h3><p>In many Playwright projects, interfaces are used to define <strong>common structures</strong> for test data, page behavior, or configuration.</p><h3>Example 1: Test Data Interface (Most Common)</h3><p>Suppose every login test needs:</p><ul><li>Username</li><li>Password</li></ul><p>Create an interface:</p><p>interface LoginData {</p><p>username: string;</p><p>password: string;</p><p>}</p><p>Use it:</p><p>const user: LoginData = {</p><p>username: “admin”,</p><p>password: “admin123”</p><p>};</p><p>Now TypeScript ensures both fields exist.</p><h3>6. Abstraction</h3><p>Abstraction means:</p><p><strong>Hide implementation details and show only essential functionality to the user.</strong></p><p><strong>What is Abstraction and what is its use in Playwright automation?</strong></p><p>Abstraction is the OOPS concept of hiding implementation details and exposing only essential functionality. In Playwright automation, abstraction is used to hide browser interaction logic and expose reusable business actions like login(), submit(), or open() through page objects, making tests cleaner and easier to maintain.</p><p>Simple meaning:</p><p>User sees WHAT to do</p><p>User does not see HOW it works</p><p>Real-life example:</p><p>Car</p><p>Visible:</p><p>start()</p><p>stop()</p><p>Hidden:</p><p>engine</p><p>fuel system</p><p>battery</p><p>You drive the car without knowing internal implementation.</p><h3>Example</h3><p>abstract class Animal {</p><p>abstract sound():void;</p><p>}</p><p>class Dog</p><p>extends Animal {</p><p>sound(){</p><p>console.log(</p><p>“Bark”</p><p>);</p><p>}</p><p>}</p><p>new Dog().sound();</p><p>Output:</p><p>Bark</p><h3>Why abstract?</h3><p>This is NOT allowed:</p><p>const animal =</p><p>new Animal (); // ❌ Error</p><p>Because:</p><p>Abstract class</p><p>↓</p><p>Cannot create object directly</p><p><strong>TypeScript Functions</strong></p><p>A function is a reusable block of code that performs a specific task.</p><p>Instead of writing the same code again and again, you write it once and call it whenever needed.</p><p><strong>Is Function an OOPS concept?</strong></p><p>No. Function is a programming concept. In OOPS, functions inside classes are called methods and are used to define object behavior.</p><p><strong>1. Named Functions</strong></p><p>A <strong>named function </strong>has a specific name and can be reused multiple times in the code. <strong>Syntax</strong></p><p>function functionName(parameters): returnType {</p><p>// function body</p><p>}</p><p><strong>Example</strong></p><p>function add(a: number, b: number): number {</p><p>return a + b;</p><p>}</p><p>console.log(add(5, 10)); // Output: 15</p><p><strong>Key Points</strong></p><p>• The function name is add.</p><p>• It takes two parameters (a and b), both of type number.</p><p>• It returns a number.</p><p>//Name function:</p><p>/* Sytanx</p><p>function functionName(Parameter):returnType</p><p>{</p><p>//block of oode</p><p>}</p><p>functionName(); //callling the function/invoking the function</p><p>*/</p><p>//Example 1: Named function with no parameter and no return type</p><p>function display(): void {</p><p>console.log(“Hello World”);</p><p>}</p><p>display(); // Calling the function</p><p>Output:</p><p>Hello World</p><p>//Example 2:Named function with parameters and return type</p><p>function addNumbers(x:number, y:number):number</p><p>{</p><p>return x+y;</p><p>}</p><p>let res:number=addNumbers(2,3);</p><p>console.log(res);</p><p>Output:</p><p>5</p><p>Or</p><p>//Example 2:Named function with parameters and return type</p><p>function addNumbers(x:number, y:number):number</p><p>{</p><p>return x+y;</p><p>}</p><p>let res:number=addNumbers(2,3);</p><p>// console.log(res);</p><p>console.log(addNumbers(5,5));</p><p>Output:</p><p>10</p><p>//Example 3:Named function with Rest parameters -same type</p><p>//Rest parameters don’t restrict the number of values that you can pass to a function</p><p>function addNumbers(…nums:number[])</p><p>{</p><p>let i;</p><p>let sum:number = 0;</p><p>for(i=0; i&lt;nums.length;i++)</p><p>{</p><p>sum = sum + nums[i];</p><p>}</p><p>console.log(“sum of the numbers”, sum)</p><p>}</p><p>addNumbers(5,5,10,20);</p><p>Output:</p><p>sum of the numbers 40</p><p><strong>2. Anonymous Functions</strong></p><p>An <strong>anonymous function </strong>does not have a name. It is usually assigned to a variable. <strong>Syntax</strong></p><p>let variableName = function(parameters): returnType {</p><p>// function body</p><p>};</p><p><strong>Example</strong></p><p>let multiply = function(x: number, y: number): number {</p><p>return x * y;</p><p>};</p><p>console.log(multiply(4, 5)); // Output: 20</p><p><strong>Key Points</strong></p><p>• The function is stored in a variable (multiply).</p><p>• It does not have a function name.</p><p>• It behaves like a regular function.</p><p><strong>Note: </strong>In this Anonymous function Optional , Rest parameters, Default parameters also possible</p><p><strong>3. Arrow Functions (Lambda Functions)</strong></p><p>Arrow functions provide a shorter syntax for writing functions.</p><p><strong>Syntax</strong></p><p>let functionName = (parameters): returnType =&gt; expression;</p><p><strong>Example</strong></p><p>let square = (num: number): number =&gt; num * num;</p><p>console.log(square(6)); // Output: 36</p><p><strong>Key Points</strong></p><p>• Uses =&gt; (fat arrow) instead of function keyword.</p><p>• <strong>Single-line functions </strong>don’t need {} or return keyword.</p><p>• <strong>Multi-line functions </strong>require {} and return.</p><p><strong>Multi-line Example</strong></p><p>let greet = (name: string): string =&gt; {</p><p>return `Hello, ${name}!`;</p><p>};</p><p>console.log(greet(“Pavan”)); // Output: Hello, Pavan!</p><p><strong>Summary Table</strong></p><p><strong>Type</strong></p><p><strong>Syntax Example</strong></p><p><strong>Key Features &amp; Common Usage</strong></p><p><strong>Named Function</strong></p><p>function sum(a, b) { return a + b; }</p><p>Has a name, reusable,</p><p>traditional syntax</p><p>General reusable functions</p><p><strong>Anonymous</strong></p><p><strong>Function</strong></p><p>let multiply = function(x, y) { return x * y; };</p><p>No name, stored in a variable</p><p>Callbacks</p><p><strong>Arrow Function</strong></p><p>let square = (x) =&gt; x * x;</p><p>Shorter syntax, uses =&gt;</p><p>Playwright, modern TS</p><p><strong>Callback and Overloaded Functions in TypeScript</strong></p><p>In TypeScript, functions can have special features like <strong>callback functions </strong>and <strong>function overloading</strong>, making them more powerful and flexible.</p><p><strong>Callback Functions</strong></p><p>A <strong>callback function </strong>is a function that is passed as an argument to another function and gets executed later.</p><p><strong>What is a Callback Function and what is its use in Playwright automation?</strong></p><p>A callback function is a function passed as an argument to another function and executed later. In Playwright automation, callback functions are commonly used in test blocks, hooks, event listeners, waits, and reusable utility methods to control execution flow and handle asynchronous actions.</p><p><strong>Example: Callback Function in TypeScript</strong></p><p>// Function that takes a callback as an argument</p><p>function greet(name: string, callback: (message: string) =&gt; void) {</p><p>console.log(name);</p><p>callback(“Hello”); // Calling the callback function</p><p>}</p><p>// Callback function</p><p>function showMessage(message: string) {</p><p>console.log(message);</p><p>}</p><p>// Calling the function by passing the callback</p><p>greet(“Pavan”, showMessage);</p><p><strong>Output:</strong></p><p>Pavan</p><p>Hello</p><p>Here, greet calls showMessage after displaying the name.</p><p><strong>Function Overloading in TypeScript</strong></p><p><strong>Creating multiple function declarations with the same name but different parameters.</strong></p><p><strong>Function overloading </strong>allows you to define <strong>multiple versions </strong>of a function with the same name but different parameters or return types.</p><p><strong>What is Function Overloading and what is its use in Playwright automation?</strong></p><p>Function overloading allows multiple declarations of the same function with different parameters while keeping a single implementation. In Playwright automation, it is used to create flexible reusable methods such as login(), search(), navigation(), or form submission methods that support different input combinations without creating multiple functions.</p><p><strong>Basic Rules for Function Overloading</strong></p><p>1. <strong>Define Overload Signatures: </strong>List all possible ways the function can be called.</p><p>2. <strong>Single Implementation Signature: </strong>There must be <strong>one actual function implementation </strong>that handles all cases.</p><p>3. <strong>Ensure Compatibility: </strong>The implementation must be compatible with all overload signatures.</p><h3>Example</h3><p>Calculator:</p><p>function add(</p><p>a:number,</p><p>b:number</p><p>):number;</p><p>function add(</p><p>a:string,</p><p>b:string</p><p>):string;</p><p>function add(</p><p>a:any,</p><p>b:any</p><p>){</p><p>return a+b;</p><p>}</p><p>console.log(</p><p>add(10,20)</p><p>);</p><p>console.log(</p><p>add(“A”,”B”)</p><p>);</p><p>Output:</p><p>30</p><p>AB</p><p><strong>Correct Function Overloading Examples</strong></p><p><strong>1️</strong>. <strong>Overloading with Different Parameter Types</strong></p><p>// Overload signatures</p><p>function display(value: number): string;</p><p>function display(value: string): string;</p><p>function display(value: boolean): string;</p><p>// Implementation function</p><p>function display(value: number | string | boolean): string {</p><p>return `Value is: ${value}`;</p><p>}</p><p>console.log(display(100)); // “Value is: 100”</p><p>console.log(display(“Hello”)); // “Value is: Hello”</p><p>console.log(display(true)); // “Value is: true”</p><p>✔ <strong>Valid </strong>because the implementation function handles all specified types.</p><p><strong>2️</strong>. <strong>Overloading with Different Number of Parameters</strong></p><p>// Overload signatures</p><p>function add(a: number, b: number): number;</p><p>function add(a: number, b: number, c: number): number;</p><p>// Implementation function</p><p>function add(a: number, b: number, c?: number): number {</p><p>return c !== undefined ? a + b + c : a + b;</p><p>}</p><p>console.log(add(2, 3)); // 5</p><p>console.log(add(2, 3, 4)); // 9</p><p>✔ <strong>Valid </strong>because c is optional, ensuring compatibility with both overloads.</p><p>//Example 1: Different parameter types(data types)</p><p>function getInfo(Id:number):string;</p><p>function getInfo(name:string):string;</p><p>function getInfo(param:number|string):string</p><p>{</p><p>if(typeof param===”number”)</p><p>{</p><p>return(`User ID is ${param}`);</p><p>}</p><p>else</p><p>{</p><p>return(`User Name is ${param}`);</p><p>}</p><p>}</p><p>console.log(getInfo(101));</p><p>console.log(getInfo(“John”));</p><p>Output:</p><p>User ID is 101</p><p>User Name is John</p><p><strong>3️</strong>. <strong>Overloading with Different Return Types</strong></p><p>// Overload signatures</p><p>function processInput(input: string): string;</p><p>function processInput(input: number): number;</p><p>// Implementation function</p><p>function processInput(input: string | number): string | number {</p><p>return typeof input === “string” ? input.toUpperCase() : input * 2; }</p><p>console.log(processInput(“hello”)); // “HELLO”</p><p>console.log(processInput(10)); // 20</p><p>✔ <strong>Valid </strong>because the function correctly returns a string for string input and a number for number input.</p><p><strong>Conclusion</strong></p><p><strong>Callback Functions </strong>allow functions to be executed later, useful in asynchronous programming.</p><p><strong>Function Overloading </strong>enables defining multiple function signatures for different parameter types or return types.</p><p><strong>What is the actual use of functions in Playwright automation?</strong></p><p>Functions are used to encapsulate reusable actions such as login, navigation, form submission, validations, and utility operations. They reduce duplicate code and make Playwright frameworks more maintainable and readable.</p><p>So in Playwright, functions are not just theory — they are the building blocks of Page Object Model (POM).</p><p>Without functions → repetitive tests<br> With functions → cleaner framework</p><h3>1. Reuse Common Actions</h3><p>Imagine every test requires login.</p><h3>Without Function ❌</h3><p>test(‘Loan Test’, async ({ page }) =&gt; {</p><p>await page.fill(‘#user’,’admin’);</p><p>await page.fill(‘#pass’,’123&#39;);</p><p>await page.click(‘#login’);</p><p>});</p><p>test(‘Dashboard Test’, async ({ page }) =&gt; {</p><p>await page.fill(‘#user’,’admin’);</p><p>await page.fill(‘#pass’,’123&#39;);</p><p>await page.click(‘#login’);</p><p>});</p><p>Problem:</p><p>Same login steps repeated</p><h3>With Function ✅</h3><p>async function login(</p><p>page:Page</p><p>){</p><p>await page.fill(</p><p>‘#user’,</p><p>‘admin’</p><p>);</p><p>await page.fill(</p><p>‘#pass’,</p><p>‘123’</p><p>);</p><p>await page.click(</p><p>‘#login’</p><p>);</p><p>}</p><p>Use:</p><p>test(</p><p>‘Loan Test’,</p><p>async ({ page })=&gt;{</p><p>await login(page);</p><p>}</p><p>);</p><p>Benefit: Write once &amp; Use everywhere</p><p><strong>Remember:</strong></p><ul><li><strong>Function Overloading</strong> → Possible (outside a class).</li><li><strong>Method Overloading</strong> → Possible (inside a class).</li><li><strong>Method Overriding</strong> → Possible (using inheritance).</li><li><strong>Function Overriding</strong> → <strong>Not supported in TypeScript.</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fee2caee254" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Typescript]]></title>
            <link>https://manjiri-softwaretesting.medium.com/typescript-a20cb4fb2d48?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a20cb4fb2d48</guid>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 05:05:48 GMT</pubDate>
            <atom:updated>2026-11-23T05:05:48.546Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. What is TypeScript?</h3><p>TypeScript is a <strong>superset of JavaScript</strong> that adds features such as <strong>static typing, interfaces, classes, access modifiers, generics, and type aliases</strong>. TypeScript code is converted to JavaScript before execution.</p><p>We write code in .ts files. TypeScript checks the code during development and converts it into JavaScript, which can then be executed by Node.js or a browser.</p><h3>What is Static Typing?</h3><p>Static typing means we specify what type of value a variable can contain.</p><p>let age: number = 30;</p><p>let name: string = “Manjiri”;</p><p>let isActive: boolean = true;</p><p>This is invalid:</p><p>age = “thirty”;</p><p>Because age is declared as a number.</p><h3>Interview answer:</h3><p>Static typing allows us to define the expected data type and helps identify type-related errors during development.</p><h3>3. Basic Data Types</h3><p>A <strong>variable </strong>is a named container used to store data, while a <strong>data type</strong> defines what kind of data that variable can hold, such as string, number, or boolean.</p><p>let browserName: string = “Chrome”;</p><p>let retryCount: number = 2;</p><p>let isTestPassed: boolean = true;</p><p>Here browserName, retryCount, and isTestPassed are <strong>variables</strong>, while string, number, and boolean are their <strong>data types</strong>.</p><p>Common types:</p><ul><li>string</li><li>number</li><li>boolean</li><li>array</li><li>object</li><li>tuple</li><li>enum</li><li>any</li><li>unknown</li><li>void</li><li>null</li><li>undefined</li><li>never</li></ul><p>examples for these Common data types:</p><h3>1. string — Text</h3><p>Used for storing text.</p><p>let browserName: string = “Chrome”;</p><p><strong>Example:</strong></p><p>let url: string = “https://example.com&quot;;</p><p>await page.goto(url);</p><h3>2. number — Numbers</h3><p>Used for integers and decimal numbers.</p><p>let retryCount: number = 3;</p><p>let price: number = 99.50;</p><p><strong>Automation example:</strong></p><p>let timeout: number = 5000;</p><p>await page.waitForTimeout(timeout);</p><h3>3. boolean — True/False</h3><p>Used when the value can be only true or false.</p><p>let isLoggedIn: boolean = true;</p><h3>4. array — Multiple Values</h3><p>An array stores multiple values of the same type.</p><p>let browsers: string[] = [“Chrome”, “Firefox”, “Edge”];</p><p>let numbers: number[] = [10, 20, 30];</p><p><strong>Automation example:</strong></p><p>let users: string[] = [“admin”, “user1”, “user2”];</p><p>for (let user of users) {</p><p>console.log(user);</p><p>}</p><h3>5. object — Collection of Properties</h3><p>An object stores related information as <strong>key-value pairs</strong>.</p><p>let loginData: {</p><p>username: string;</p><p>password: string;</p><p>} = {</p><p>username: “admin”,</p><p>password: “Admin@123”</p><p>};</p><h3>6. tuple — Fixed Order and Number of Values</h3><p>A tuple allows you to specify the <strong>type and order</strong> of each element.</p><p>let user: [string, number] = [“Manjiri”, 30];</p><p>Here:</p><ul><li>First value must be string</li><li>Second value must be number</li></ul><h3>7. enum — Predefined Set of Values</h3><p>An enum is useful when you have a fixed set of possible values.</p><p>enum Environment {</p><p>DEV = “DEV”,</p><p>UAT = “UAT”,</p><p>PROD = “PROD”</p><p>}</p><p>let environment: Environment = Environment.UAT;</p><h3>8. any — Any Type</h3><p>any means TypeScript can accept <strong>almost any value</strong>.</p><p>“Don’t check the type.”</p><p>let data: any = “Hello”;</p><p>data = 100;</p><p>data = true;</p><p>data = [“Chrome”, “Firefox”];</p><h3>9. unknown — Unknown Type</h3><p>unknown is also used when you don’t know the type, but it is <strong>safer than any</strong>.</p><p>let data: unknown = “Hello”;</p><p><strong>any</strong> → TypeScript doesn’t force you to check.</p><p><strong>unknown</strong> → TypeScript forces you to check before using the value.</p><h3>10. void — No Return Value</h3><p>Usually used for a function that doesn’t return anything.</p><p>function printMessage(): void {</p><p>console.log(“Hello”);</p><p>}</p><h3>11. null — Intentionally Empty Value</h3><p>null means the value is intentionally set to “nothing.”</p><p>let testData: string | null = null;</p><p>Later:</p><p>testData = “Login Test”;</p><h3>12. undefined — Value Not Assigned</h3><p>undefined generally means a value hasn’t been assigned./ value is not currently available/assigned.</p><p>let username: string | undefined;</p><p>console.log(username);</p><p>The value is undefined.</p><p>You can later assign:</p><p>username = “Manjiri”;</p><h3>13. never — Never Successfully Completes</h3><p>never is used when a function <strong>never returns normally</strong>.</p><p>For example, a function that always throws an error:</p><p>function throwError(): never {</p><p>throw new Error(“Something went wrong”);</p><p>}</p><p><strong>Q. 4. What is a type?</strong></p><p>A type in TypeScript defines what kind of value a variable can hold. We can use built-in types like string, number, and boolean, or create custom types to define the structure of objects and data</p><p>E.g.</p><p>let username: string = “Manjiri”;</p><p>let age: number = 30;</p><p>let isActive: boolean = true;</p><p>Here:</p><ul><li>string → type of username</li><li>number → type of age</li><li>boolean → type of isActive</li></ul><h3>You can also create your own type</h3><p>type User = {</p><p>username: string;</p><p>age: number;</p><p>};</p><p>let user: User = {</p><p>username: “Manjiri”,</p><p>age: 30</p><p>};</p><p>Here, User is a <strong>custom type</strong> that defines the structure of the user object.</p><p><strong>Q. 5 Difference between type and interface?</strong></p><p>Both type and interface can be used to define object structures. Interfaces are mainly used for object-oriented structures and can be extended using extends, while types are more flexible and can also define unions, tuples, and other types. In automation, I can use either depending on the requirement</p><h3>Example</h3><p><strong>Interface:</strong></p><p>interface User {</p><p>username: string;</p><p>age: number;</p><p>}</p><p><strong>Type:</strong></p><p>type User = {</p><p>username: string;</p><p>age: number;</p><p>};</p><h3>Main differences</h3><p><strong>interface</strong></p><p><strong>type</strong></p><p>Mainly used to define object/class structure</p><p>Can define objects, unions, primitives, tuples, etc.</p><p>Can be extended using extends</p><p>Can combine types using &amp;</p><p>Supports declaration merging</p><p>Does not support declaration merging</p><p>Commonly used for object structures</p><p>More flexible</p><p><strong>Q.6) What is async/await?</strong></p><p>async/await is used in JavaScript/TypeScript to <strong>handle asynchronous operations</strong> and wait for them to complete. This is <strong>very important in Playwright</strong> because most Playwright actions are asynchronous.</p><p>async/await is used to handle asynchronous operations. async defines an asynchronous function, and await waits for an asynchronous operation to complete before moving to the next step. In Playwright, we use it with actions like goto, click, fill, and assertions</p><p>async function login() {</p><p>await page.locator(“#username”).fill(“admin”);</p><p>await page.locator(“#password”).fill(“Admin@123”);</p><p>await page.locator(“#login”).click();</p><p>}</p><h3>Why do we use it in Playwright?</h3><p>Without properly waiting for asynchronous operations, the next step could execute before the previous operation is completed.</p><p><strong>Asynchronous </strong>= an operation that takes time to complete, and the program handles it without treating it as an immediate result.</p><p><strong>Q. 7. What is a Promise?</strong></p><p>A Promise represents the result of an asynchronous operation. It can be pending, fulfilled, or rejected. In Playwright, methods like goto(), click(), and fill() return Promises, so we use await to wait for them to complete.</p><h3>Easy way to remember</h3><p>Promise = result will come later<br> await = wait for that result</p><p><strong>Q. 8) What is type inference?</strong></p><p>Type inference is a TypeScript feature where the compiler automatically determines the type of a variable based on the value assigned to it, so we don’t always need to explicitly specify the type</p><h3>Playwright</h3><p>const browserName = “Chrome”;</p><p>const timeout = 5000;</p><p>TypeScript automatically infers:</p><p>browserName → string</p><p>timeout → number</p><p><strong>Q.9) What is optional parameter?</strong></p><p>An optional parameter is a function parameter that is not mandatory. In TypeScript, we use ? after the parameter name to make it optional</p><p><strong>Easy to remember:</strong></p><p>name: string → <strong>Required</strong></p><p>name?: string → <strong>Optional</strong></p><h3>Simple example</h3><p>function login(username: string, password?: string) {</p><p>console.log(username);</p><p>}</p><p>login(“admin”); // Valid</p><p>login(“admin”, “Admin@123”); // Also valid</p><p>The username is <strong>required</strong>, but password is <strong>optional</strong>.</p><p><strong>Q.10) What is union type?</strong></p><p>A union type allows a variable or parameter to accept multiple types or predefined values. We use the | (pipe) symbol to define a union type</p><h3>Simple example</h3><p>let userId: string | number;</p><p>userId = 101; // Valid</p><p>userId = “USER101”; // Valid</p><p>Here, userId can be either a <strong>number or a string</strong>.</p><h3>In Playwright</h3><p>You might define a reusable type:</p><p>type BrowserName = “chromium” | “firefox” | “webkit”;</p><p>let browser: BrowserName = “chromium”;</p><p>Now only these three values are allowed.</p><p><strong>Q.11) What is type assertion?</strong></p><p>Type assertion is a way of telling TypeScript what type we believe a value has. It doesn’t convert or change the value; it only provides type information to TypeScript.</p><p>For example:</p><p>let value = “123”;</p><p>let num = value as number;</p><p>This does <strong>not</strong> actually convert “123” into the number 123. For conversion, you would use something like Number(value).</p><p><strong>Q.12) How do you import/export classes?</strong></p><p>In Playwright POM, I export Page Object classes from their respective files and import them into the test files using import. This allows us to reuse the Page Object classes and keep the automation code organized and maintainable</p><h3>Easy way to remember</h3><p><strong>export → make the class available<br>import → use the class in another file</strong></p><p>Page Object classes are usually kept in separate files and then imported into your test files.</p><h3>1. Export a class</h3><p>Suppose you have LoginPage.ts:</p><p>import { Page } from ‘@playwright/test’;</p><p>export class LoginPage {</p><p>constructor(private page: Page) {}</p><p>async login(username: string, password: string) {</p><p>await this.page.locator(‘#username’).fill(username);</p><p>await this.page.locator(‘#password’).fill(password);</p><p>await this.page.locator(‘#login’).click();</p><p>}</p><p>}</p><p>The keyword <strong>export</strong> makes the LoginPage class available to other files.</p><h3>2. Import the class</h3><p>In your test file:</p><p>import { LoginPage } from ‘./LoginPage’;</p><p>Then create an object:</p><p>const loginPage = new LoginPage(page);</p><p>await loginPage.login(‘admin’, ‘Admin@123’);</p><p>So the flow is:</p><p><strong>LoginPage.ts</strong></p><p>export class LoginPage</p><p>⬇️</p><p><strong>login.spec.ts</strong></p><p>import { LoginPage }</p><p>⬇️</p><p>new LoginPage(page)</p><p><strong>Q.13) What is tsconfig.json?</strong></p><p>tsconfig.json is the configuration file for a TypeScript project. It defines compiler and type-checking settings such as the JavaScript target, module system, and strict type checking.</p><h3>In Playwright</h3><p>A Playwright project can have:</p><p>Playwright Project</p><p>│</p><p>├── tests/</p><p>├── pages/</p><p>├── playwright.config.ts</p><p>├── tsconfig.json</p><p>└── package.json</p><p>tsconfig.json controls the <strong>TypeScript settings</strong>, while playwright.config.ts controls <strong>Playwright settings</strong> such as browsers, timeout, retries, base URL, etc.</p><h3>Simple example</h3><p>{</p><p>“compilerOptions”: {</p><p>“target”: “ES2020”,</p><p>“module”: “commonjs”,</p><p>“strict”: true</p><p>}</p><p>}</p><p><strong>Q.14) How do you define test data using TypeScript?</strong></p><p>In Playwright, I can define test data using TypeScript objects, arrays, interfaces, or types. For structured and reusable data, I prefer defining an interface or type and then creating test data based on it. For data-driven testing, I can store multiple test-data objects in an array.</p><h3>1. Using an object</h3><p>For simple test data:</p><p>const loginData = {</p><p>username: “admin”,</p><p>password: “Admin@123”</p><p>};</p><p>Use it in the test:</p><p>await loginPage.login(loginData.username, loginData.password);</p><h3>2. Using an interface ⭐</h3><p>For structured and reusable test data:</p><p>interface LoginData {</p><p>username: string;</p><p>password: string;</p><p>}</p><p>const loginData: LoginData = {</p><p>username: “admin”,</p><p>password: “Admin@123”</p><p>};</p><p>Now TypeScript ensures that username and password have the correct types.</p><h3>3. Using an array for multiple test data</h3><p>This is useful for <strong>data-driven testing</strong>:</p><p>const loginUsers: LoginData[] = [</p><p>{</p><p>username: “admin”,</p><p>password: “Admin@123”</p><p>},</p><p>{</p><p>username: “user1”,</p><p>password: “User@123”</p><p>}</p><p>];</p><p>Then you can loop through the data:</p><p>for (const user of loginUsers) {</p><p>await loginPage.login(user.username, user.password);</p><p>}</p><p><strong>Q.15) Generics</strong></p><p>Generics allow us to create reusable code that can work with different data types while still maintaining type safety.</p><h3>Simple example</h3><p>function getValue&lt;T&gt;(value: T): T {</p><p>return value;</p><p>}</p><p>let name = getValue&lt;string&gt;(“Manjiri”);</p><p>let age = getValue&lt;number&gt;(30);</p><p>Here:</p><ul><li>T is a <strong>generic type parameter</strong></li><li>T can represent string, number, or another type</li><li>The same function can be reused with different types</li></ul><p><strong>Q. 16) How do you handle errors using try/catch in TypeScript/Playwright?</strong></p><p>try/catch is used to <strong>handle errors without immediately stopping the entire program or test flow</strong>. We put the code that may cause an error inside try, and handle the error inside catch.</p><ul><li>try → contains the code that may fail.</li><li>catch → executes if an error occurs.</li><li>error → contains information about the error.</li></ul><h3>Playwright example</h3><p>async login() {</p><p>try {</p><p>await this.username.fill(“admin”);</p><p>await this.password.fill(“Admin@123”);</p><p>await this.loginButton.click();</p><p>} catch (error) {</p><p>console.log(“Login failed:”, error);</p><p>throw error;</p><p>}</p><p>}</p><p>Here, throw error is useful when we want to <strong>log the error but still let the Playwright test fail</strong>, rather than hiding the failure.</p><p><strong>Easy memory:<br></strong> try → perform action<br> catch → handle error<br> throw → pass the error back so the test can fail properly.</p><p><strong>Q.17) How do you use interfaces/types in API response or test data?</strong></p><p>I use interfaces or types to define the expected structure of test data and API responses. This provides type safety and makes the code easier to understand and maintain. For example, I can define an interface for login data with username and password, and then create test data based on that interface</p><p><strong>Q.18) What is the difference between let, const, and var?</strong></p><p>let, const, and var are used to declare variables. let allows reassignment and is block-scoped, while const does not allow reassignment and is also block-scoped. var is function-scoped and is generally avoided in modern TypeScript. I mainly use const by default and let when the value needs to change</p><p><strong>Q.19) What is the difference between == and ===?</strong></p><p>== compares values and can perform type conversion, while === compares both value and data type without type conversion. In TypeScript and modern JavaScript, I generally prefer === because it provides strict and predictable comparison</p><h3>1. == — Loose equality</h3><p>It compares the values after <strong>type conversion</strong> if necessary.</p><p>console.log(5 == “5”); // true</p><p>Although one is a number and the other is a string, == converts them before comparing.</p><h3>2. === — Strict equality</h3><p>It compares <strong>both value and data type</strong>.</p><p>console.log(5 === “5”); // false</p><p>Because:</p><ul><li>5 → number</li><li>“5” → string</li></ul><p>The types are different, so the result is false.</p><p><strong>Easy memory:</strong></p><p>== → value comparison with conversion</p><p>=== → <strong>value + type</strong> comparison</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a20cb4fb2d48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java]]></title>
            <link>https://manjiri-softwaretesting.medium.com/java-6d2ad09d460e?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d2ad09d460e</guid>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 11:45:42 GMT</pubDate>
            <atom:updated>2024-11-13T11:45:42.422Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Q.1) What is JAVA?</strong></p><p><strong>Answer:</strong> Java is a high-level programming language and is platform-independent.</p><p>Java is a collection of objects. There are a lot of applications, websites, and games that are developed using Java.</p><p><strong>Q #2) What are the features of JAVA?</strong></p><p><strong>Answer: Features of Java are as follows:</strong></p><ul><li><strong>OOPS concepts</strong></li></ul><p>· Object-oriented</p><p>· Inheritance</p><p>· Encapsulation</p><p>· Polymorphism</p><p>· Abstraction</p><ul><li><strong>Platform independent:</strong> A single program works on different platforms without any modification.</li><li><strong>High Performance:</strong> JIT (Just In Time compiler) enables high performance in Java. JIT converts the bytecode into machine language and then JVM starts the execution.</li><li><strong>Multi-threaded:</strong> A flow of execution is known as a Thread. JVM creates a thread which is called the main thread. The user can create multiple threads by extending the thread class or by implementing the Runnable interface.</li></ul><p><strong>Name the Java IDE’s?</strong></p><p><strong>Answer:</strong> Eclipse and NetBeans are the IDE’s of JAVA.</p><p><strong>Simple programs-</strong></p><p>Java Program to Add Two Integers</p><p><strong>Example: How to Print an Integer entered by an user</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*m3vuudkUo0dPbTcoEEZQXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/106/1*lYClueIabtMRn5Fhb6mzeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*6b3NPH8kq9V7Y81lmJtTYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*JNce74SYXTUckZmY3eFp4A.png" /></figure><p><strong>Example: How to Print an Integer entered by an user</strong></p><p>import java.util.Scanner;</p><p>public class HelloWorld {</p><p>public static void main(String[] args) {</p><p>// Creates a reader instance which takes<br> // input from standard input — keyboard<br> Scanner reader = new Scanner(System.in);<br> System.out.print(“Enter a number: “);</p><p>// nextInt() reads the next integer from the keyboard<br> int number = reader.nextInt();</p><p>// println() prints the following line to the output screen<br> System.out.println(“You entered: “ + number);<br> }<br>}</p><p>O/P:</p><p>Enter a number: 10<br>You entered: 10</p><p><strong>Steps to Implement Java Program</strong></p><p>Implementation of a Java application program involves the following step. They include:</p><p>1) Creating the program</p><p>2) Compiling the program</p><p>3) Running the program</p><p><strong>Example-</strong></p><p>// This is a simple Java program.</p><p>// FileName : “HelloWorld.java”.</p><p><strong>class</strong> HelloWorld {</p><p>// Your program begins with a call to main().</p><p>// Prints “Hello, World” to the terminal window.</p><p><strong>public</strong> <strong>static</strong> <strong>void</strong> main(String args[])</p><p>{</p><p>System.out.println(“Hello, World”);</p><p>}</p><p>}</p><p><strong>Class Definition</strong></p><p>This line uses the keyword class to declare that a new class is being defined.</p><pre>class HelloWorld {</pre><pre>    //</pre><pre>    //Statements</pre><pre>}</pre><p><strong>HelloWorld</strong></p><p>It is an identifier that is the name of the class</p><h4>Main Method</h4><p>In the Java programming language, every application must contain a main method.</p><p>The main function(method) is the entry point of your Java application, and it’s mandatory in a Java program. whose signature in Java is:</p><pre>public static void main(String[] args)</pre><p><strong>Explanation of the above syntax</strong></p><p>· <strong><em>public</em></strong><em>: So that </em><a href="https://www.geeksforgeeks.org/jvm-works-jvm-architecture/"><em>JVM</em></a><em> can execute the method from anywhere.</em></p><p>· <strong><em>static</em></strong><em>: The main method is to be called without an object. The modifiers are public and static can be written in either order.</em></p><p>· <strong><em>void</em></strong><em>: The main method doesn’t return anything.</em></p><p>· <strong><em>main()</em></strong><em>: Name configured in the JVM. The main method must be inside the class definition. The compiler executes the codes starting always from the main function.</em></p><p>· <strong><em>String[]</em></strong><em>: The main method accepts a single argument, i.e., an array of elements of type String.</em></p><pre>System.out.println(&quot;Hello, World&quot;);</pre><p>This line outputs the string “Hello, World” followed by a new line on the screen. Output is accomplished by the built-in println(<em> )</em> method. The <strong>System</strong> is a predefined class that provides access to the system and <strong>out</strong> is the variable of type output stream connected to the console.</p><h3>Compiling the Program</h3><pre>javac HelloWorld.java</pre><p>The compiler creates a HelloWorld.class (in the current working directory) that contains the bytecode version of the program. Now, to <strong>Execute</strong> our program, <strong>JVM</strong>(Java Virtual Machine) needs to be called using java, specifying the name of the <strong>class</strong> file on the command line, as shown:</p><pre>java HelloWorld</pre><p><strong>Q. 3) What do you mean by Constructor?</strong></p><p>The constructor name is always the same as the class name</p><p>Constructors are similar to the Method</p><p>A constructor can take arguments but never return value</p><p>Constructors are automatically called when we create object of class</p><p>Constructors are used for initialization</p><p>whatever task we want to perform at the start of class, we will place them in constructors.</p><p>//Constructor</p><p>public class A {</p><p>Public A()</p><p>{</p><p>System.out.println(“hello constructor”);</p><p>}</p><p><strong>To call the constructor in other class</strong></p><p><strong>A o = new A();</strong></p><p><strong>E.g.</strong></p><p><strong>public</strong> <strong>class</strong> LoginPage {</p><p>WebDriver driver;</p><p><strong>public</strong> LoginPage(WebDriver ldriver)</p><p>{</p><p><strong>this</strong>.driver=ldriver;</p><p>}</p><p><strong>To call the constructor in other class</strong></p><p>LoginPage loginPage=PageFactory.<em>initElements</em>(driver, LoginPage.<strong>class</strong>);</p><p>loginPage.loginToCRM(excel.getStringData(“Login”, 0, 0), excel.getStringData(“Login”, 0, 1));</p><p><strong>Q.4) What is meant by the Local variable and the Instance variable?</strong></p><p>· <strong>Answer:</strong></p><p>· <strong>Local variables</strong> are defined in the method and scope of the variables that exist inside the method itself.</p><p>· <strong>Instance variable</strong> is defined inside the class and outside the method and the scope of the variables exists throughout the class.</p><p><strong>Q.5) What is a Class?</strong></p><p><strong>Answer:</strong> All Java codes are defined in a Class. It has variables and methods. a <strong><em>class is a basic building block</em></strong>., the code should be write inside the class boundary</p><p><strong>Q.6) What is a Variable?</strong></p><p><strong>Variables — </strong>Variables are <strong>containers for storing data values, It is use to hold data ,variable value can be changed</strong></p><p>there are different types of variables, for example: int,float,char,boolean…</p><p>int marks=80;</p><p>int percentage;</p><p>float calc=11.2f</p><p>boolean b=true;</p><p>char c =’a’;</p><p><strong>Constants- It is use to hold data, it’s value can not change</strong></p><p>final int marks=80;</p><p><strong>Q.7) What is a Method?</strong></p><p><strong>Methods</strong> — A method is <strong>a block of code that only runs when it is called</strong>. It’s exact business logic has to be done. It contains a set of statements (or) instructions to satisfy the particular requirement.</p><p><strong>Example:</strong></p><p>public class Addition{ //Class name declaration</p><p>int a = 5; //Variable declaration</p><p>int b= 5;</p><p>public void add(){ //Method declaration</p><p>int c = a+b;</p><p>}</p><p>}</p><p><strong>Q. 8) What is an Object?</strong></p><p><strong>Answer:</strong> An instance of a class is called an object. Whatever method you want to call, check which class it belongs to create an object of a class and call the method</p><p>A o=new A();</p><p>o.testing();</p><p><strong>Example:</strong></p><p>public class Addition{</p><p>public static void main(String[] args){</p><p>Addition add = new Addition();//Object creation</p><p>}</p><p>}</p><p>The above code creates the object for the Addition class.</p><p><strong>Q.9) What are the OOP concepts?</strong></p><p><strong>Answer: OOPs concepts include:</strong></p><ul><li>Inheritance</li><li>Encapsulation</li><li>Polymorphism</li><li>Abstraction</li><li>Interface</li></ul><p><strong>Q. 10) What is Inheritance?</strong></p><p><strong>Answer:</strong> Inheritance means one class can extend to another class. So that the codes can be reused from one class to another class. The existing class is known as the Super class whereas the derived class is known as a sub class.</p><p><strong>Example:</strong></p><p>Super class:</p><p>public class Manupulation(){</p><p>}</p><p>Sub class:</p><p>public class Addition extends Manipulation(){</p><p>}</p><p>Inheritance is only applicable to the public and protected members only. Private members can’t be inherited.</p><p><strong>Q. 11) public</strong></p><p><strong>public is a Java keyword which declares a member’s access as public</strong>. Public members are visible to all other classes. This means that any other class can access a public field or method</p><p><strong>Q.12) private</strong></p><p>The private keyword is <strong>an access modifier used for attributes, methods and constructors, making them only accessible within the declared class</strong>.</p><p><strong>Q. 13) What is Encapsulation</strong></p><p>Encapsulation in Java refers to integrating data (variables) and code (methods) into a single unit.</p><p><strong>Purpose of Encapsulation:</strong></p><ul><li>Protects the code from others.</li><li>Code maintainability.</li></ul><p><strong>Q.14) What is Polymorphism?</strong></p><p><strong>Answer:</strong> Polymorphism means many forms. Means same name and different use.</p><p>A single object can refer to the super-class or sub-class depending on the reference type which is called polymorphism</p><p>Polymorphism is applicable for <strong>overriding </strong>and not for <strong>overloading</strong></p><p><strong>Q.15) What is meant by Method Overriding?</strong></p><p>method overriding <strong>occurs when a subclass (child class) has the same method as the parent class</strong>. In other words, method overriding occurs when a subclass provides a particular implementation of a method declared by one of its parent classes</p><p><strong>Answer: Method overriding happens if the sub-class method satisfies the below conditions with the Super-class method:</strong></p><ul><li>Method name should be the same</li><li>The argument should be the same</li><li>Return type should also be the same</li></ul><p>The key benefit of overriding is that the Sub-class can provide some specific information about that sub-class type than the super-class.</p><p><strong>Q.16) What is meant by Overloading?</strong></p><p>Method overloading in Java means <strong>having two or more methods (or functions) in a class with the same name and different arguments (or parameters)</strong>. It can be with a different number of arguments or different data types of arguments</p><p><strong>Answer:</strong> Method overloading happens for different classes or within the same class.</p><p><strong>For method overloading, sub-class method should satisfy the below conditions with the Super-class method (or) methods in the same class itself:</strong></p><ul><li>Same method name</li><li>Different argument types</li><li>There may be different return types</li></ul><p><strong>Q.17) What is meant by Interface?</strong></p><p>is defined as <strong><em>an abstract type used to specify the behavior of a class,</em></strong> It is a collection of abstract methods</p><p><strong>Q.18) What is meant by Abstract class?</strong></p><p>We can create the Abstract class by using the “Abstract” keyword before the class name. An abstract class can have both “Abstract” methods and “Non-abstract” methods that are a concrete class.</p><p><strong>Q.19) static Keyword in Java</strong></p><p>The static keyword in Java is mainly used for memory management. The static keyword in Java is used to share the same variable or method of a given class. The users can apply static keywords with variables, methods, blocks, and nested classes.<strong> Static variable is like a global variable and is available to all methods.</strong></p><p><strong>Q.20) Non-static Keyword in Java</strong></p><p>A non-static method in Java can access static methods and variables as follows: A non-static method can access any static method without creating an instance of the class.<strong> Non static variable is like a local variable and they can be accessed through only instance of a class.</strong></p><p>Static variable</p><p>Non static variable</p><p>Static variables can be accessed using class name</p><p>Non static variables can be accessed using instance of a class</p><p>Static variables can be accessed by static and non static methods</p><p>Non static variables cannot be accessed inside a static method.</p><p>Static variables reduce the amount of memory used by a program.</p><p>Non static variables do not reduce the amount of memory used by a program</p><p>Static variables are shared among all instances of a class.</p><p>Non static variables are specific to that instance of a class.</p><p><strong>Static variable is like a global variable and is available to all methods.</strong></p><p><strong>Non static variable is like a local variable and they can be accessed through only instance of a class.</strong></p><p><strong>Q.21) ‘Final’ Keyword</strong></p><p>The final keyword is <strong>a non-access modifier used for classes, attributes and methods, which makes them non-changeable (impossible to inherit or override)</strong>.</p><p><strong>Q.22) ‘This’ keyword</strong></p><p>This keyword can be used to refer current class instance variable. If there is ambiguity between the instance variables and parameters, this keyword resolves the problem of ambiguity.</p><p><strong>Q.23) Exception</strong></p><p><strong>An exception (or exceptional event) is a problem that arises during the execution of a program</strong></p><p>We have 2 types of error</p><p>- Compile time- Compile time error is syntactical error, grammar mistake in keyword, word in program</p><p>E.g. system.out.println(“Hi”);</p><p>In this sentence first ‘s’ should be capital</p><p>- Runtime- Run time error is called exception or logical error</p><p><strong>Types of Exception</strong></p><p>- <strong>Checked</strong> — exception which are find out by complier and complier displaying that exception could occur that kind of exception are called checked exception</p><p>- <strong>Unchecked</strong>- Only at a run time we get this exception</p><p><strong>Q.24) Exception handling</strong></p><p>Actions we want to perform in case of exception occurs at run time, we can exception handling</p><p>with <strong>Throws</strong> keyword- with help of this we can declare an exception and need to define exception classes</p><p>can throw only checked exceptions</p><p>Declare at method level</p><p>can use multiple classes separated by comma</p><p>With help of throws keywords we are not doing expecition handling ,It is just passing expection to somebody else and somebody else will handle that ,</p><p>Exception handling will be done by the try and catch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*Cag2LJS1qwXXE4-2eSRZKg.png" /></figure><p><strong>try-Catch</strong></p><p>Used for exception handling</p><p>code will not break in case of exception</p><p>If we get some exception code will jump to catch block, catch is used for exception handling</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*ecy1seMk_QuMtIIYtOFc-Q.png" /></figure><p><strong>Throw keyword</strong></p><p>to manually throw an exception</p><p>Need to place in body of the method</p><p>Only 1 exception can throw at a time</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*TM0njBFb7VYOwkVQsxCTtQ.png" /></figure><p><strong>Difference between Throws and Throw</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*l-b-zKEqDYLGZKA3F3JHMA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d2ad09d460e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assertion]]></title>
            <link>https://manjiri-softwaretesting.medium.com/assertion-e28939511e13?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e28939511e13</guid>
            <category><![CDATA[assertions]]></category>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 11:35:35 GMT</pubDate>
            <atom:updated>2024-11-13T11:35:35.404Z</atom:updated>
            <content:encoded><![CDATA[<p>Q. 1) <strong>What is Assertion?</strong></p><p>Asserts helps us to verify the conditions of the test and decide whether test has failed or passed.</p><p>A test is considered successful ONLY if it is completed without throwing any exception.</p><p>An assertion is used to compare the actual result of an application with the expected result</p><p>We can use this for Title, URL, Text, errormessage, Border</p><p>Q. 2) <strong>Types of Assertions:</strong></p><p>1) Hard Assertion</p><p>2) Soft Assertion</p><p>Q.3) <strong>What is the Hard Assertion</strong></p><p>Hard assertion is an assertion which throws the exception immediately upon failure of assertion.</p><p>Hard assertion means if the assert command is failed then rest of the statements will not be continued , the entire test method will be failed</p><p><strong>Hard Assertion types</strong></p><p>- Assert.assertTrue()</p><p>- Assert.assertFalse()</p><p>- Assert.assertEquals()</p><p><strong>Example</strong></p><p>Assert.<em>assertTrue</em>(EnterEmail.isDisplayed());</p><p>EnterEmail.sendKeys(“robert@yopmail.com”);</p><p>//<strong>Validation Compare the titles</strong></p><p>String Exptitle=”Home Page”;</p><p>Assert.<em>assertEquals</em>(Exptitle, driver.getTitle()); //Compare both the titles</p><p>Q.4) <strong>Exapmle</strong></p><p>// <strong>Title assertion</strong></p><p>String actaulTitle=driver.getTitle();</p><p>String expcectedTitle=”Log in to Facebook”</p><p>Assert.assertEquals(actualTitle, expectedTitle,”Title is mismatached”);</p><p>// <strong>URL assertion</strong></p><p>String actualUrl= driver.getCurrentUrl();</p><p>String expectedUrl=”https:/www.facebook.com/&quot;;</p><p>Assert.assertEquals(actualUrl, expectedUrl, “URL is mismatached”);</p><p>//<strong>Text assetion</strong></p><p>String actualText=driver.findelement(By.name(“email”)).getAttribute(“value”);</p><p>String expectedText=”Email”;</p><p>Assert.assertEquals(actualText, expectedText, “username is mismatached”);</p><p>// <strong>Error message </strong>— For error message inspect the error message on UI</p><p>String actualErrorMessage=driver.findElement(By.xpath(“//div[@id=”email”]).getText();</p><p>String expectedErrorMessage=”The email or mobile number you entered isn’t connected to an account”;</p><p>Assert.assertEquals(actualErrorMessage, expectedErrorMessage, “Username error message is mismatached”</p><p>Q.5) <strong>What is Soft Assertion</strong></p><p>Soft assertion means If a command is failed even though we continue the rest of the commands, throw the exception at the end of code</p><p>We need to create an object to use Soft Assertion</p><p><strong>Exapmle:</strong></p><p>SoftAssert sf=new SoftAssert();</p><p>sf.assertTrue(condition);</p><p>sf.assertAll();</p><p>SoftAssert sf=<strong>new</strong> SoftAssert();</p><p>@Test</p><p><strong>public</strong> <strong>void</strong> Tc002() {</p><p>sf.assertTrue(<strong>true</strong>); //passed</p><p>sf.assertEquals(“Selenium”, “Selenium”); // Passed</p><p>sf.assertEquals(“word”, “Word”); //Failed</p><p>System.<strong><em>out</em></strong>.println(“Successfully passed”);</p><p>sf.assertAll();</p><p>}</p><p>Q.6) <strong>What is the use of softAssert.assertAll()</strong></p><p>softAssert.assertAll() This command is the rest of the commands that will be execute even though the previous commands have failed. So that’s a reason we must specify softAssert.assertAll() at the end.</p><p>Q.7) <strong>When not to use assertions?</strong></p><p>Don’t use asserts to check inputs if the language can fail fast for you.</p><p>Don’t use asserts for user input validation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e28939511e13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git and Github]]></title>
            <link>https://manjiri-softwaretesting.medium.com/git-and-github-d1d004fa905d?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1d004fa905d</guid>
            <category><![CDATA[what-is-git-and-github]]></category>
            <category><![CDATA[git-and-github]]></category>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 11:33:33 GMT</pubDate>
            <atom:updated>2024-11-13T11:33:33.792Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Q. 1) What is Git?</strong></p><p>Git is a version control system that lets you manage and keep track of your source code history.</p><p><strong>Q. 2) What is GitHub?</strong></p><p>GitHub is a cloud-based hosting service that lets you manage Git repositories.</p><p><strong>Q. 3) What is the difference between Git and GitHub?</strong></p><p><strong>Git is the tool,</strong></p><p><strong>While GitHub is the service to use git.</strong></p><p><strong>Q. 4) What is the advantage of using GitHub for Selenium?</strong></p><p>GitHub is a cloud-based hosting service that lets you manage Git repositories.</p><p>It helps to have a backup code in case of physical failures.</p><p>· github supports branching, so we can have multiple versions of code.</p><p>· github supports project cloning, so it helps in easily distribution of project across multiple teams and multiple locations</p><p>· github supports code pull so anyone with access rights can pull code in local machine. This can also be integrated with jenkins.</p><p>· github supports code push so anyone with access rights can checking code in github central repository.</p><p><strong>Q.5) Different Terminologies with GitHub?</strong></p><p><strong>Repository</strong>: It is a storage area of your workplace that contains all your documentation files and the history of changes.</p><p><strong>Clone</strong>: Clones are literally clones (copies) of a repository .</p><p><strong>Commit</strong>: Whatever the changes you make in your files will come under commit.</p><p><strong>Push</strong>: Sending the committed changes to a remote repository such as GitHub.com.</p><p><strong>Pull Request</strong>: If you have made changes in code/script, to show the other collaborators you can send a pull request.</p><p><strong>Branching</strong>: When you extract a portion/section of code from the main or remote track of your software, then it is called ‘branch’ and the process is known as Branching.</p><p><strong>Merge</strong>: Merging takes the changes from one branch and applies them into another.</p><p><strong>Q. 6) Explanation</strong></p><p>In some companies following</p><p>The team lead is managing the github and multiple peoples are comes under team lead and they are working on different task.</p><p>so Team lead will create a new repository on github and new project just like a framwork from scratch, he will prepare the base the he will create and add the file in his git local repositry, then will commit and push the changes to the remote repository, Once done then he will inform to the entire team like i already created new project and pushed into the github repository, so plz clone that project and continued with your task</p><p>Cloning means team memeber will copy the project in their local system and then they can start the work, whatevr the task they allocated they can perform thoes task.</p><p>so team member clone remote repo to local repository,Import the project from git to workspace then they can add or modify the code, then they will have to create new branch in github and add files to staging ,commit and push the changes to the remote repository, then they will have to pull request for review code</p><p>The team lead will review the code and if the code is good then he will approve and he will inform the team member he can merge the code into the master branch, else he can merge</p><p>Suppose, he wants to change something, then they can just give a comment, again the team members will make changes then he will do all processes again like commit and push the code into the branch, so this communication keeps on going till the code is working well and lead should approve that code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*tVchw7V3WtUAAz45DD6V8g.png" /></figure><p><strong>Q. 7) How to create new local repository</strong></p><p>Either click from ‘Create a new repository’ from the git repository window</p><p>or, Once a project is done then right click on project &gt;&gt; Team &gt;&gt; Share project &gt;&gt; click on the checkbox of create repository in the parent folder of project &gt;&gt; Create repository &gt;&gt; finish</p><p><strong>Q. 8) How to add the project in the local repository?</strong></p><p>‘Add to Index’ this command will add the project to the Staging area</p><p>When you stage a file in Git, it means you instruct Git to track changes to the file in preparation for a commit.</p><p><strong>Q. 9) How to commit the program</strong></p><p>Right click on project &gt;&gt; Team &gt;&gt; Commit &gt;&gt; Add comment and then click on ‘Commit’</p><p><strong>Q.10) How to create new repository on the GitHub</strong></p><p>Click on ‘create new repository ‘ button or ‘+’ button from GitHub account</p><p><strong>Q. 11) How to Push the project into the github repository</strong></p><p>Either, you can push it from &gt;&gt; right click from git repository &gt;&gt; Remote &gt;&gt; Push &gt;&gt; Paste the github repository URL &gt;&gt; Creds as a User (Email) and password &gt;&gt; Select specifications for Push&gt;&gt; + Add Spec &gt;&gt;Finish &gt;&gt;Close</p><p>or</p><p>Right click on Project &gt;&gt; Team &gt;&gt; Remote &gt;&gt; Push &gt;&gt; Paste the github repository URL &gt;&gt; Creds as a User (Email) and password &gt;&gt; Select specifications for Push&gt;&gt; + Add Spec &gt;&gt;Finish &gt;&gt;Close</p><p><strong>Q.12 How ro clone the project</strong></p><p>In eclipse &gt;&gt; click on the ‘Clone a git repository’ button &gt;&gt;Clone URL &gt;&gt; Give the creds of test engineer account&gt;&gt;Finish &gt;&gt; Click on ‘Refresh’ button</p><p>Right click on Pacakge explorer any blank space&gt;&gt; Import&gt;&gt; Select ‘Git’ &gt;Select ‘ Project from Git’&gt;&gt; Select ‘Exisitng local repositpory’ &gt;&gt;Select the project &gt;&gt; Next&gt;&gt; Select radio button as ‘Import Existing Eclipse project &gt;&gt; Next &gt;&gt; click on checkboxes of project and seacrh for nested project&gt;&gt; Finish</p><p>Observe under the package explorer, the project is copied</p><p><strong>Q. 13) How to create new Branch</strong></p><p>Right click on local repository Branches&gt;&gt; Switch to&gt;&gt; New Branch&gt;&gt; Enter name of branch &gt;&gt; Finish</p><p><strong>Q. 14) How to push the code into the Created local branch</strong></p><p>Right click on Project &gt;&gt; Team &gt;&gt; commit</p><p>Right click on created branch name&gt;&gt; Push Branch&gt;&gt; Select Branch&gt;&gt; Preview &gt;&gt;Enter the creds of Test engineer &gt;&gt; Login&gt;&gt; Push</p><p><strong>Q.15) How to send the pull request</strong></p><p>Login of github repository as a test engineer account &gt;&gt; Select repository &gt;&gt; Select Branch&gt;&gt; New pull request&gt;&gt; Select the person name on request to review&gt;&gt; Enter message &gt;&gt; Click on ‘Create a pull request’</p><p><strong>Q.16) How to revirew the shared code by someone (as a lead)</strong></p><p>Log into the Lead account &gt;&gt; Select the branch from ‘master Branch ‘ dropdown&gt;&gt; Click on the comment</p><p><strong>Q.17) How to ‘Merge Pull Request’</strong></p><p>Log into the Lead account &gt;&gt; Select the branch from ‘master Branch ‘ dropdown&gt;&gt; Click on the comment &gt;&gt; Select ‘Create a merge commit’ from ‘Merge pull request’&gt;&gt; Enter comment&gt;&gt; Click on ‘Confirm Merge’</p><p><strong>Q. 18) Another Simple example for Github (From automationtestinginsider)</strong></p><p>Explain- Let’s an example there are three team members in team (QA1, QA2,QA3), they are working one project, and we have one team leader,</p><p>All the team members have git installed locally in their system. They have their own local repository</p><p>Some different task which given by team lead to all team member</p><p>QA1 is working on Registration</p><p>QA2 is working on Homepage</p><p>QA3 is working on Product</p><p>And team lead has framework access</p><p>Suppose QA2 team member need other code, suppose he need registration page code, so how will they share the code, how they will access framework</p><p>Team lead created the account ati.github.com and created the central repository now</p><p>He will push his framework to this central repository</p><p>Now all the team members can access the central repository , bcz team lead given the permission for access the central repository to all the team members.</p><p>So the team members can access the code from central repository thru Pull command.</p><p>Other team members have to work on their respective pages, once they are done with code then they will push the code to central repository</p><p><strong>How to work with Git and Github using Eclipse (From automationtestinginsider)</strong></p><p>Once project is done on eclipse then click on ‘Perspective’ from Eclipse then ‘Git repository’ window will open select Git and Git Repositories options</p><p>Then create new local repository.</p><p>Push the code into local repository, for Push right click on Project&gt;&gt;Team&gt;&gt;Share project&gt;&gt;Select repository mean location&gt;&gt;Finish</p><p>Create central repository on Github and login it, once logged then create new repository (Team lead share the creds and url for central repository)</p><p>Commit and Push from local repository into central repository, for that Right click on project&gt;&gt;team&gt;&gt;commit then ‘Git staging’ window will open in that write comment and click on ‘commit and push’</p><p>Copy the git project url and paste it,also enter creds for gits accounts and push the code then refresh the github page, you can see code on central repository.</p><p>Pull the code</p><p>Right click on project&gt;&gt;Team&gt;&gt;pull</p><p>See the project url and click on Close</p><p>and we can see the project from github central repository in eclipse.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1d004fa905d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API (Application programming interface)]]></title>
            <link>https://manjiri-softwaretesting.medium.com/api-application-programming-interface-a38cb7edd5c0?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a38cb7edd5c0</guid>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 05:18:47 GMT</pubDate>
            <atom:updated>2024-11-05T05:18:47.825Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Q.1) What is API (Application programming interface)</strong></p><p>API Testing aims to check the functionality, reliability, performance, and security of the programming interfaces.</p><p>API is a way for any two applications or modules to communicate.</p><p>The primary or most commonly used HTTP verbs (or methods, as they are properly called) are POST, GET, PUT, PATCH, and DELETE. These correspond to create, read, update, and delete (or CRUD) operations</p><p>APIs are everywhere</p><ul><li>Two APIs</li><li>Offline — those without internet — (Hardware)mic -&gt; API Testing(OS) -&gt; Software (voice)</li><li>Online — those who work with the internet — Instagram API</li></ul><p>Public APIs. — available to the public — Google Maps APIs</p><p>Private APIs — Gmail Api within Google is internal</p><p><strong>Q.2) Why API Testing?</strong></p><p>- All the modern application are using APIs (mandatory)</p><p>- API Testing is much cheaper as compared to the UI Testing</p><p>- Cost of Bugs is low because of early Testing.</p><p>- Ensure reliability</p><p>Request</p><ul><li>Client — Request -&gt; Server</li><li>Methods — GET /POST/ PUT /PATCH /DELETE</li><li>URL + Path Param(QP OR PP) + Headers + Authorization + Body / Payload/ Data</li></ul><p>Response</p><ul><li>Server -&gt; Client</li><li>Response Data</li><li>Status Code</li><li>Headers</li><li>Time(verify)</li></ul><p><strong>Q.3) What is a Test in APIs?</strong></p><ul><li>Checking response message content and structure.</li><li>Verifying data accuracy and consistency.</li><li>Validating response status codes, and headers.</li><li>Response times.</li><li>Ensuring proper error handling and security measures.</li><li>Validate the keys with the Min. and Max range of APIs (e.g maximum and minimum length)</li><li>Have a test case to do XML, and JSON Schema validation.</li><li>Keys verification. If we have JSON and XML APIs we should verify it’s that all the keys are coming.</li><li>Verify how the API error codes are handled.</li><li>Authorization would be check</li></ul><p><strong>Q.4) Why you should perform API Testing?</strong></p><ul><li>Developers make mistakes and they create buggy APIs.</li><li>Cost EFFECTIVE</li><li>initial Bug</li><li>Easy to Execute or Business early.</li></ul><p><strong>Q.5 ) Common Bugs in API?</strong></p><ul><li>Incorrect Status</li><li>Incorrect Response Data.</li><li>Incorrect parameter handling.</li><li>Inconsistent data formats.</li><li>Authentication issues, Headers.</li><li>Functional issues</li><li>Performance issues</li><li>Security issues.</li></ul><p><strong>Q.6) What challenges are included under API testing?</strong></p><p>- Parameter Selection</p><p>- Output verification and validation</p><p>- API Documentation</p><p>- Access to DB</p><p>- Authorization overhead</p><p><strong>Q.7) What are the advantages of API Testing?</strong></p><ul><li><em>Test for Core Functionality:</em> API testing provides access to the application without a user interface. The core and code-level functionalities of the application will be tested and evaluated early before the GUI tests</li><li><em>Time Effective: </em>API testing usually is less time-consuming than functional GUI testing</li><li><em>Language-Independent:</em> In API testing, data is exchanged using XML or JSON. These transfer modes are completely language-independent, allowing users to select any coding language when adopting automation testing services for the project.</li><li><em>Easy Integration with GUI:</em> API tests enable highly integrable tests, which is particularly useful if you want to perform functional GUI tests after API testing.</li></ul><p><strong>Q. 8) What are the common API testing types?</strong></p><p>Validation Testing</p><p>Functional Testing</p><p>UI testing</p><p>Load testing</p><p>Runtime/ Error Detection</p><p>Security testing</p><p>Penetration testing</p><p>Fuzz testing</p><p>Interoperability and WS Compliance testing</p><p><strong>Q.9) HTTP Methods</strong></p><p>HTTP which stands for Hypertext Transfer Protocol, is the protocol for transmitting data — such as HTML pages, images, and videos — between clients and servers on the internet.</p><p>Client -&gt; Server — It can use the pre-built way to communicate with the Server.</p><p>common HTTP methods:</p><ul><li>GET: Retrieve data from a specified resource</li><li>POST: Submit data to be processed to a specified resource</li><li>PUT: Update a specified resource</li><li>DELETE: Delete a specified resource</li><li>PATCH: Partially modify a resource</li></ul><p><strong>Q.10) HTTP Status Code (Signal shown by the server to the client)</strong></p><p>Signal -</p><ul><li>1xx (Informational): Request received, continuing process</li><li>2xx (Success): Request successfully received, understood, and accepted — GREEN color in the chrome</li><li>3xx (Redirection): Further action needs to be taken to complete the request</li><li>4xx (Client Error): The request contains bad syntax or cannot be fulfilled — red Color</li><li>5xx (Server Error): The server failed to fulfill a valid request</li></ul><p><strong>Q.11) SOAP</strong></p><p>Simple Object Access Protocol (SOAP) is an API that allows applications and software to communicate using XML data and Hypertext Transfer Protocol (HTTP).</p><p>- It’s just like, an envelope — information you need to wrap and open and close.</p><p>SOAP is an acronym for Simple Object Access Protocol.</p><p>It is an XML-based messaging protocol for exchanging information among computers.</p><p>SOAP is an application of the XML specification.</p><p>SOAP is a communication protocol designed to communicate via the Internet.</p><p>SOAP can extend HTTP for XML messaging.</p><p>SOAP provides data transport for Web services.</p><p>SOAP can exchange complete documents or call a remote procedure.</p><p>SOAP can be used for broadcasting a message.</p><p>SOAP is platform- and language-independent.</p><p>SOAP is the XML way of defining what information is sent and how.</p><p>SOAP enables client applications to easily connect to remote services and invoke remote methods</p><p><strong>Q.12) REST</strong></p><p>REST is representational state transfer, that follows the design principles of the REST architectural style.</p><p>The REST API is nothing but a Design Pattern for Web API</p><p>When a client request is made via a RESTful API, it transfers a representation of the state of the resource to the requester or endpoint.</p><p>This information, or representation, is delivered in one of several formats via HTTP: JSON (Javascript Object Notation), HTML, XLT, Python, PHP, or plain text.</p><p><strong>Q.13) REAL Example</strong></p><ol><li>restful-booker project-</li></ol><p>i) REST APIs, what you can — CRUD — Operation — Create Booking, Read a Booking, Update, Delete a Booking.</p><p>ii) Endpoints</p><p>Test Cases for the Create Booking</p><ol><li>Create a booking with valid Data.</li><li>Create a booking with an invalid firstName (null) — G</li><li>Invalid JSON</li><li>Invalid Total Price</li><li>Empty Values of all fields</li><li>Invalid mandatory</li><li>Min and Max values for all — Total — 1100000000000000000</li><li>Invalid URL -</li><li>Deposit false</li><li>Long name — dasdasdasdasdasdase2eeedasdasdad</li><li>Arabic Names — ع لبولندا، عل. , Chinese Name. 転張外。退</li><li>Special Char !@#$#@#$</li><li>Different date format — 31/2/23</li><li>Response Time</li></ol><p>Verify in the</p><ol><li>Response</li><li>Status Code</li><li>Time taken</li><li>Headers</li><li>JSON schema validation</li></ol><p><strong>Integration Scenario</strong></p><ol><li>Create a Booking -&gt; Update the Booking Name -&gt; Get the Booking by Id and verify.</li><li>Create a Booking -&gt; Delete the Booking with Id -&gt; Verify using GET request that it should not exist.</li><li>Create a BOOKING -&gt; Delete It.</li><li>Get an Existing Booking from Get All Bookings IDs -&gt; Update a Booking -&gt; Verify using GET by ID.</li></ol><p><strong>Q.14) API Testing vs Unit Testing?</strong></p><p><strong>API Testing</strong></p><p><strong>Unit Testing</strong></p><p>Conducted by the QA Team</p><p>Conducted by the development team</p><p>Mostly black-box testing</p><p>White box testing</p><p>Aimed to assess the full functionality of the system for it will be employed by the end-user (external developers who will use your API)</p><p>Used to verify whether each unit in isolation performs as expected or not</p><p>Often run after the build is ready and authors do not have access to the source code</p><p>Each of the code modules must be ensured to pass the unit test before being built by developers</p><p><strong>Q.15) API vs Web Service</strong></p><p><strong>API</strong></p><p><strong>Web Service</strong></p><p>not all APIs are Web services</p><p>All Web services are APIs</p><p>API may be exposed in multiple ways.</p><p>API can be communicated through SOAP, REST, XML-RPC and CURL calls as well.</p><p>API can also be exposed in a number of ways like JAR, DLL, XML over HTTP, JSON over HTTP, etc.</p><p>A Web service uses only three styles of use: SOAP, REST, and XML-RPC for communication</p><p>APIs don’t need a network for operation.</p><p>A Web service always needs a network to operate</p><p><strong>Q.16) REST Constraints</strong></p><p>Uniform Interface</p><p>Stateless</p><p>Cacheable</p><p>Client-Server</p><p>Layered System</p><p>Code on Demand (OPTIONAL)</p><p><strong>Q.17) SOAP Vs REST</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3q_T5O4aJcukGAqG" /></figure><p><strong>Q.18) What are common API errors that are often found?</strong></p><ul><li>Missing module errors</li><li>Documentation errors</li><li>Parameter validation errors</li></ul><p><strong>Q. 19) What is the API documentation?</strong></p><p>The API documentation is a complete, accurate technical writing giving instructions on how to effectively use and integrate with an API. It is a compact reference manual that has all the information needed to work with the API and helps you answer all the API testing questions with details on functions, classes, return types, arguments, and also examples and tutorials.</p><p><strong>Q. 20) Can we use GET request instead of PUT to create a resource?</strong></p><p>PUT or POST method is used to create a resource. GET is only used to request resources.</p><p><strong>Q.21) What is CURD operations</strong></p><p>‘Create’ — Post-It enables you to add data to an existing file or resource in a server, creating a new object on the server</p><p>Post is used for ‘Create’ capabilities</p><p>‘Update/Replace’ -PUT-It lets you replace an existing file or resource in a server, Update the object in the server with a new value</p><p>Put is used for ‘Update/Replace’ capabilities</p><p>The patch is used for ‘Update/Modify’ capabilities</p><p>‘Read’-Get-It enables you to retrieve data from a server</p><p>Get is used for ‘Read’ capabilities</p><p>‘Delete’-Delete-It lets you delete data from a server</p><p><strong>Q.22) How to use the Postman tool / What is the test environment of API?</strong></p><p>Developers shared one file and in that mentioned links and methods, so on postman tool and add link and its key, authorization and perform operation like get, post</p><p>The test environment of API is a bit complete and requires the configuration of the database and server, depending on the software requirements.</p><p>When the installation process is complete, the API is verified for proper operation. Throughout the process, the API called from the original environment is set up with different parameters to study the test results.</p><p>Postman tool- It is a simple Graphic User Interface for sending and viewing HTTP requests and responses.</p><p>Different status codes and their description</p><p>200- OK</p><p>201-Created</p><p>400-Bad request</p><p>401-Unautorized</p><p>404-Not found</p><p>405-Method not allowed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gus0Kpr8K9MxpDnf" /></figure><p>200 series status codes representing the — Successful request</p><p>400 series status codes representing like unauthorized access of APIs, if we need some authentication or token authentication, if you are not properly specified authentication you can not send a proper request</p><p>Related to the 500 series</p><p>If sending some request to the server, so maybe some problem with the network, sometimes the network is down or under maintenance so in those cases we will get a 500 series status code</p><p><strong>Q.23) Difference between PUT and POST methods?</strong></p><p>POST request- creating a new object on the server</p><p>PUT request-Update the object in the server with a new value</p><p><strong>Q.24) What are the advantages of API Testing?</strong></p><ul><li><em>Test for Core Functionality:</em> API testing provides access to the application without a user interface. The core and code-level functionalities of the application will be tested and evaluated early before the GUI tests</li><li><em>Time Effective: </em>API testing usually is less time-consuming than functional GUI testing</li><li><em>Language-Independent:</em> In API testing, data is exchanged using XML or JSON. These transfer modes are completely language-independent, allowing users to select any coding language when adopting automation testing services for the project.</li><li><em>Easy Integration with GUI:</em> API tests enable highly integrable tests, which is particularly useful if you want to perform functional GUI tests after API testing.</li></ul><p><strong>Q. 25) What is the best approach method to perform API testing?</strong></p><ul><li>Defining the correct input parameters</li><li>Verifying the calls of the mixture of two or more added value parameters</li><li>Defining the basic functionality and scope of the API program</li><li>Writing appropriate API test cases and making use of testing techniques such as equivalence class, boundary value, etc. to check the operability</li><li>Testing case execution</li><li>Comparing the test result with the expected result</li><li>Verifying the API behavior under conditions such as connection to files and so on.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a38cb7edd5c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDLC (Software development life cycle)]]></title>
            <link>https://manjiri-softwaretesting.medium.com/sdlc-software-development-life-cycle-312f4debec4a?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/312f4debec4a</guid>
            <category><![CDATA[sdlc]]></category>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Sat, 12 Oct 2024 19:27:32 GMT</pubDate>
            <atom:updated>2024-10-12T19:27:32.335Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s a process which is use for developing the software.</p><blockquote>1. Requirement gathering and analysis</blockquote><blockquote>2. Planning and Design</blockquote><blockquote>3. Coding</blockquote><blockquote>4. Testing</blockquote><blockquote>5. Deployment</blockquote><blockquote>6. Maintenance</blockquote><ol><li><strong>Requirement gathering and analysis</strong></li></ol><blockquote>Input- User requirements</blockquote><blockquote>Output- BRS,SRS documents</blockquote><p>Requirement- Capability of a s/w system to fulfill a goal as described by customer.</p><p>Requirement gathering- BA (Business Analyst) collect requirement from client and create BRS (Business requirement specification) / BRD (Business requirement document)/ CRS (Customer requirement specification)</p><p>Analysis- Analysis team will analyse the requirements of client and they will check whether the requirement is correct, complete cost and time estimation given by client as well as they will do feasible study for requirements.</p><p>After analysis senior BA will create SRS (Software requirement specification). SRS is a technical language in includes functional and non-functional requirements.</p><p><strong>2. Planning and Design</strong></p><blockquote>Input- SRS</blockquote><blockquote>Output- Project plan, HLD, LLD</blockquote><p>Project manager prepare project plan which consists of scope of project, environment of project, resource and scheduling as well as which model, we will use.</p><p>Design — It’s done by system architect/system designer. They will create detail design documentation</p><p>1) HLD (High level design)</p><ul><li>It’s system level design / Architectural design</li><li>It’s specific flow between the modules.</li></ul><p>2) LLD (Low level design)</p><p>- It’s known as unit/program level design</p><p>- It specifies flow of the data within the modules.</p><p><strong>3. Coding</strong></p><blockquote>Input- SRS,HLD,LLD</blockquote><blockquote>Output-Build</blockquote><p>The goal of the coding phase is to translate the design of the system into code in given programming language. It’s done by programmer/developer. They will generate source code (build)</p><p>4. <strong>Testing</strong></p><blockquote>Input- Build</blockquote><blockquote>Output- Test plan, Test Scenarios and cases, Defect report, Execution log, Test summary report.</blockquote><p>Done by tester. They prepare many documents</p><p>Function of testing is to find bugs, defects, issues, failures in the software and deliver the product a clean and reliable as possible as required by the customer or client.</p><p>Tester will test the build, report the defects, verify fixes during this phase, work produces of testing process. It includes -</p><p><strong>Test Plan</strong> — Test plan is a document describe the scope, approach, objective, resources and schedule of software testing effort.</p><p><strong>Test scenario</strong> — It provides an overview of what needs to be tested, A test scenario is a set of test cases that helps determine the positive and negative project characteristics.</p><p><strong>Test cases</strong> — A test case is a set of instructions on “HOW” to validate a particular test</p><p><strong>Defect report</strong> — Is detail information about defect. In this include like steps to reproduce, actual and expected result…</p><p><strong>Execution log</strong>- The execution log is a record of the steps executed in the test, whether they passed or failed, and in case they failed, then why.</p><p><strong>Test summary report</strong> -Test Report is a document which contains a summary of all test activities and final test results of a testing project.</p><p>5. <strong>Deployment</strong></p><blockquote>Input- End product (Build)</blockquote><blockquote>Output-Release</blockquote><p>In deployment deploying the application in the live environment.</p><p>Deployment/ Implementation/ Developer team will perform this task.</p><p>In this user manual is prepare by technical writers to help the user. User manual known as Help option, User guide.</p><p>6. <strong>Maintenance</strong></p><p>Maintenance deals with the changes, defect fixing after deployment.eg. Change in the environment, adding new features, Bug fixing.</p><p>In this change request document is prepared by client.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=312f4debec4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Testing]]></title>
            <link>https://manjiri-softwaretesting.medium.com/software-testing-2dd792363676?source=rss-ac30844b47c7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dd792363676</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[manual-testing]]></category>
            <category><![CDATA[quality-analyst]]></category>
            <category><![CDATA[software-test-engineer]]></category>
            <dc:creator><![CDATA[Manjiri kalkundrikar]]></dc:creator>
            <pubDate>Tue, 01 Oct 2024 10:41:03 GMT</pubDate>
            <atom:updated>2024-10-01T10:52:39.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*EVy5JhQtVSbouUd3SpAerQ.jpeg" /><figcaption>Img_1_Software testing</figcaption></figure><blockquote><strong>Software testing</strong> is a process used to help identify the <strong>correctness, completeness, and quality of developed computer software</strong>.</blockquote><p><strong>The need to do software testing:</strong></p><ul><li>Software testing is required to point out the defects and errors that were made during the development phases</li><li>It is important to ensure the quality of the product. Quality product delivered to the customer helps them gain confidence.</li><li>It’s important to ensure that the application does not fail because it can be costly in the future or at a later stage of development.</li><li>To check whether the software is working as per the client’s requirement</li><li>To check whether all the requirements are fulfilled or not.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dd792363676" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>