<?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 Atifali on Medium]]></title>
        <description><![CDATA[Stories by Atifali on Medium]]></description>
        <link>https://medium.com/@atif276ali?source=rss-09e7546483fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*f5Cpt37w6bSpQMy0</url>
            <title>Stories by Atifali on Medium</title>
            <link>https://medium.com/@atif276ali?source=rss-09e7546483fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 06:24:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atif276ali/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[Manual Testing 2]]></title>
            <link>https://medium.com/@atif276ali/manual-testing-2-7f57d5bbafd5?source=rss-09e7546483fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f57d5bbafd5</guid>
            <dc:creator><![CDATA[Atifali]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 08:15:26 GMT</pubDate>
            <atom:updated>2026-06-19T08:29:15.090Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Software </strong>is a collection of computer program which perform a specific task</p><p><strong>Types of Software</strong></p><p>1. System software- OS, drivers, utils</p><p>2. Programming softwares- compiler , debugger, interpreter</p><p>3. Application software- web app, mobile, desktop app</p><p><strong><em>Whats is Software testing</em></strong></p><p>Software testing is the process of evaluating software and identifying differences between expected and actual behavior, ensuring it meets req and is defect free. It performs verification (Are we building product right) and validation (are we building the right product)</p><p>It is sw dev process, objective is to release quality product to client</p><p><strong>Software Quality</strong></p><p>1. Bug Free</p><p>2. Delivery on time</p><p>3. Meet requirement</p><p>4. Maintainable</p><p>5. Within budget</p><p><strong><em>Project vs Product</em></strong></p><p>If software developed for a specific customer based on their own requirements then it is project. It’s a temporary effort with a start and end date. Highly customisable to clinet need. Client pays</p><p>If software developed for multiple customer based on market requirement it is called product, its an ongoing effort which is continious and evolve over time. Its generic . FuNDED roi through subscription or sales</p><p><strong>Error vs Bug vs Failure</strong></p><ol><li>Error- It is a mistake done by human which lead to incorrect result. It happens in head. Ex- Developer misunderstanding req</li><li>Bug (Defect)– The flaw in code/design/doc which is result of error, it sits in file even if no one runs the code. Defects found by tester. Cheaper to fix</li><li>Failure- it is the visible deviation when defected code is executed, it what the user experiences. Found in production. Expensive to fix</li></ol><p><strong>Why bugs</strong></p><ol><li>Lack of testers</li><li>Project complexity</li><li>Programming errors</li><li>Changing requirements</li></ol><p><strong>Functional Testing</strong></p><p>It ensures all the functions of a software operate as per requirements specification. Concerned with what sw does and not HOW. It is a type of black box testing</p><p>SDLC</p><p>It is a sw development process, where whole process divided into phases</p><ol><li>Requirement Gathering</li><li>Feasibility study- economic, technical and legally doable</li><li>Design- HLD and LLD</li><li>Coding implementation</li><li>Testing</li><li>Deployent</li><li>Maintainance</li><li>Waterfall model- sequential model, where each step must be completed before moving into next phase and there is no going back</li></ol><p>Advantage</p><ul><li>Easy to understand</li><li>Easy to manage</li><li>Works good for small project where req dont change</li><li>Cost and timeline upfront</li><li>Less chance of bugs as req dont change</li></ul><p>DIsadvantage</p><ul><li>Requirement changes not allowed</li><li>If there is a defect it will be propogated to below phases</li><li>Testing only start after codihg</li></ul><ol><li>Spiral Mode</li></ol><p>Spiral model is risk driven SDLC model. It combines interative nature of agile, phased nature of waterfall and risk analysis for each iteration</p><p>A. Planning phase- ra and define objective</p><p>B. Risk Analysis- identify risk and build prototype</p><p>C. Engineering- Develop and test</p><p>D. Evaluation- customer review and plan next loop</p><p>After each iteration project move to next spiral (bigger scope and commitment) until risk too high.</p><p>Each iteration software release to customer</p><p>Advantage</p><ul><li>Suitable for products which require risk analysis</li><li>Can cater change of requirements</li><li>Testing is done, errors can be detected early</li><li>Sw built in iterative- Customer are involved and sdlc cycle</li></ul><p>Disadvantage</p><ul><li>It is expensive</li><li>Complex to manage</li><li>Not suitable for small project</li></ul><ol><li>V Model</li></ol><p>Its a waterfall model where each development phase has an equivant testing phase</p><p>Verification — validation model , left side is verification (devlopemtn) and right is validation (testing) running in parallel</p><p>Requirements User Acceptance Testing</p><p>System Design System testing</p><p>Architecture Integration Testing</p><p>Model Design Unit testing</p><p>Coding (bottom of V)</p><p>Adv</p><ul><li>Detect error early</li><li>Early test planning</li><li>Good docs</li></ul><p>Expensive</p><ol><li>Agile Model</li></ol><p>Its a model where sw is built in iteratively and incrementally , in small interations called sprints, it focus on feed back and ability to adapt chaning customer requirement</p><p>Scrum and kanban are framework of agile</p><p>Adv</p><ul><li>Active feedback</li><li>Adapt to change req</li><li>Good quality- meet req</li><li>Reduce risk</li></ul><p>Dis</p><ul><li>Hard to estimate cost and timeline upfront</li><li>Expensive</li><li>Less doc</li><li>Req exp workers</li></ul><p>Scrum is sprint based, fixed length sprint, product owner scrum master</p><p>Kanban is continious flow , no length,</p><p><strong>Verification vs Validation</strong></p><p>Static- No code execution Dynamic- Require code execution</p><p>reviews functional, uat</p><p>Done by QA done by tester / user</p><p>Cheaper to fix issue more expensive</p><p>Static Testing: No execution — review of documents, code, requirements (e.g., walkthrough, inspection).</p><p>Dynamic Testing: Code is executed with input — observe output (e.g., functional, performance testing).</p><p><strong>QA vs QC vs QE</strong></p><p>Quality Assurance (QA)</p><ul><li>Process oriented, define standard and process the prevent defects.</li></ul><p>Each commit has peer review and must pass unit test before merge</p><p>Quality Control (QC)</p><ul><li>Product oriented, it aim is to detect defects by testing the product</li></ul><p>Tester run regression suite on new build, logs defects in jira, retests after fix</p><p>Quality Engineering (QE)</p><ul><li>Engineering oriented, build quality in system through automation and CI/CD</li></ul><p>Create Selenium framework that run regression suite on each commit , integrate it with jenkins</p><p><strong>STLC</strong></p><p>Its the sequence of operation performed by QA at testing step</p><ol><li>Requirement Gathering- identify testing req</li><li>Test planning- choose testing approach, define scope</li><li>Test case design- prepare test data</li><li>Test env setup- through smoke test</li><li>Test Execution- log in jira</li><li>Test Closure- generate test result</li></ol><p>Each phase in STLC has entry and exit criteria , condition</p><p>Black, White and Grey based on tester knowledge of code</p><p><strong>BLACK BOX</strong></p><p>Black box testing, where tester focus on what the system does and not how, tester treat application as closed box with input and ouput. Tester has no idea about implementation or internal structure.</p><ol><li>Regression Testing- Where existing test cases are run again to ensure, recent code changes has not bring defects in previously working functionality</li><li>Sanity Testing- Narrow and deep test conducted after a minor change or bug fix so to ensure specific change work correctly without breaking current functionality</li><li>Smoke Testing- Wide and shallow testing after new build to ensure basic functionality is working</li><li>UAT- WHere actual user or business representative test the application to ensure if it meets business req and is ready for production</li><li>System testing- Ensure entire integrated system works end to end as per requirement in SRS. To ensure app work as expected</li></ol><p><strong><em>WHITE BOX</em></strong></p><p>White box testing focus on how the system works and not what system does, the tester examine the code, structure and workflow</p><ol><li>Unit Testing — Lowest level of testing, where individual units of code such as functions, classes are tested in isolation, dependencies are mocked</li><li>Integration Testing — Type of testing which validate interaction bw 2 or more module to ensure they work correctly</li><li>Code Coverage Testing- it measures how much source code is exercised by test</li></ol><p><strong>Agile</strong></p><p>Agile is an iterative software development philosophy that delivers working software in small increments, responds to change over following a fixed plan, and emphasizes collaboration over documentation.</p><p>It is <em>not</em> a process — it’s a <strong>mindset</strong></p><p><strong>Scrum</strong></p><p>It is popular agile framework used to manage and deliver project through fixed length iteration cycle called sprint</p><p>3 Pillars</p><ul><li>Transparency — work and progress known by all</li><li>Inspection — Regular checks</li><li>Adaptation — Adjust based on feedback</li></ul><p>Team members</p><ol><li>Product owner -</li></ol><p>Own product backlog- list of priority of work</p><p>Prioritize work based on business value</p><p>act as bridge between team and stakeholder</p><p>Define what need to built and in what order</p><ol><li>Scrum master -</li></ol><p>Servant leader, not a manager</p><p>Fascilates scrum events,</p><p>removes blockers</p><p>coaches team on agile practices</p><ol><li>Development team-</li></ol><ul><li>Self-organizing — decides <em>how</em> to do the work</li><li>Cross-functional — collectively has all skills needed</li></ul><p>Jargons</p><ol><li><strong>Sprint </strong>is a fixed length iteration cycled during which the Scrum Team works to build a potentially shippable product increment. At end sf must be deliverable</li></ol><p>Sprint can be cancelled by product owner only when sprint goal become obselete, deviated from goal</p><ol><li><strong>User story</strong> is the requirement written from end user perspective, written in format</li></ol><p>As a [user_type] i want [goal] so that [reason]</p><p>Focus on what the user need and why rather than technical impl detail</p><p>Acceptance criteria are the conditions that user story must satisfy to be considered completed</p><ol><li>Story point is the relative unit of measure of effort or complexity of user story, it is not time.</li></ol><p>But can be made sense in relative, 4 and 8 points are double complex</p><p>It follows</p><p>Planning Poker- estimation technique</p><ol><li>Velocity- Velocity is the amount of work a team completes in a spring</li></ol><p>Average story point completed per sprint. Used as sprint capacity for preparing future sprints</p><ol><li>Definition of Ready- A checklist of criteria, that a story must satisfy to be pulled into a sprint, ensure story is well understood and actionable</li></ol><p>+ Story is written in user story format</p><p>+ Well understood by team</p><p>+ Acceptable criteria are clearly defined</p><ol><li>Definition Of Done- A shared agreement, which describe what “complete” means for an increment of work</li></ol><p>+ Unit test pass <br>+ Integration test pass</p><ol><li>Product Backlog- list of desired work, owned by product owner</li><li>Sprint Backlog- Selected item, plan for current sprint</li></ol><p>Steps in Sprint (Sprint events)</p><ol><li>Spring planning –</li></ol><p>beginning of sprint</p><p>Entire sprint team</p><p>team select stories from project backlog</p><p>set goal for sprint</p><ol><li>Standup-</li></ol><p>Everyday, same time, 15min , Development team synchronizes with each other</p><p>What did i do yesterday <br>What will i do today <br>Any blockers</p><ol><li>Backlog Refinement- <br>MId sprint <br>PO and dev team <br>break stories into small <br>clarifying acceptance criteria and estimate upcoming stories</li><li>Sprint review — <br>at end of sprint, <br>demo of deliverable shown to stakeholder <br>feedback collected</li><li>Sprint Retrospective — <br>after sprint review before next sprint planning, inspet the sprint</li></ol><p>What went well</p><p>What didnt went well</p><p>What will we improve in next sprint</p><p>Defect Life Cycle</p><ol><li>New</li><li>Assigned</li><li>Open</li><li>Fixed</li><li>Retest</li><li>Reopen</li><li>closed</li></ol><h3>Html</h3><p>HTML</p><ol><li>&lt;!DOCTYPE html&gt; — a <strong>declaration</strong> at the very top of an HTML document. It tells the web browser <strong>what version of HTML the page is written in</strong> so the browser can render it correctly. HTML 5</li><li>HTML vs XHTML -</li></ol><p>+ Html is Hypertext markup language for creating web pages</p><p>XHTML is Extensive Hypertext markup language, STRICTER, XML based of HTML</p><p>+ HTML is forgiving and flexibile, errors are ignored, XHTML follow strict XML rules, breaking rule break page</p><p>+ Some tags can be left unclosed in HTML and unclosed, quotes of attribute are optional while in XHTML all tag must be closed and be self closing , <br>&lt;h1&gt; hello X</p><p>&lt;br&gt; X &lt;br/&gt;</p><ol><li>A tag attribute target</li></ol><p>_self default same window</p><p>_blank new window</p><p>_parent in parent frane</p><p>_top in full body window</p><p><a href="/service/mailto:email@gmail.com">mailto:email@gmail.com</a></p><p>Tel:8240971901</p><ol><li>Visbility: hidden -&gt; takes space but not visble</li></ol><p>Display: none -&gt; not visible not visible</p><ol><li>&lt;br&gt; &lt;hr&gt; &lt;b&gt; &lt;strong&gt; &lt;i&gt; &lt;em&gt; semantic italic</li></ol><p>&lt;sub&gt; subsrcript &lt;sup&gt; superscript</p><ol><li>Alt for seo, accessibility and broken links,</li></ol><p>Img isnt container tag its void element</p><ol><li>&lt;table&gt;</li></ol><p>&lt;tr&gt;</p><p>&lt;th&gt;</p><p>&lt;td&gt;</p><p>Colspan and rowspan to merge</p><ol><li>For attribute of label should match the id attribute of input</li><li>Semantic tags in HTML convey meaning to developer and browser, improve code readibility, accesibility and SEO</li><li>&lt;header&gt; top section of the website, contain navbar, logo, search bar, Once per page, once per article</li><li>&lt;nav&gt; a block of navigation links</li><li>&lt;main&gt; dominant content of the page, once per page</li><li>Footer copyright, legal rights</li><li>&lt;aside&gt; sidebar or extra info</li></ol><p>A. Article- article is self contained, independent piece of content, publish on its own, blogs, tweet</p><p>B.section- thematic grouping of content that require a heading</p><ol><li>&lt;backquote&gt; quoted content</li><li>&lt;aside&gt; sidebar or extra info</li><li>&lt;mark&gt; highlight text</li><li>&lt;figure&gt; self contained content, which wrap the media files</li><li>&lt;figcaption&gt; caption for the figure, first or last child of &lt;figure&gt;</li><li>&lt;fieldset&gt; group related form elements.</li><li>&lt;legend&gt; draws box around realted elements,</li></ol><p>&lt;fieldset&gt;</p><p>&lt;legend&gt; User Info &lt;/legend&gt; <br>&lt;fieldset&gt;</p><ol><li>&lt;strong&gt; is semantic tag add meaning IMPORTANT CONTENT, used in seo and accesibility while &lt;b&gt; just bold, non semantic tag</li></ol><p>&lt;em&gt; emphasised content, &lt;i&gt; just italic</p><ol><li>head contain &lt;title&gt;, &lt;meta&gt;- charset, description, keywords, link to external site, &lt;link ref=”stylesheet” href=””&gt;, &lt;style&gt; , &lt;script&gt;</li></ol><p>&lt;script&gt; can be placed in end of body, first html load then , if in head block rendering until loaded</p><ol><li>Elements without closing tags are void elements</li><li>&lt;link&gt; is used for linking extternal resources not clickable, not clickable</li></ol><p>&lt;a&gt; is used for creating hyperlinks clickable for navigation purpose</p><ol><li>Html entities, show reserved characters like &amp;lt; &amp;gt; &amp;amp;</li><li>HTML 5 contain semantic tags for seo, accesibility and readibility, localstorage and session storage, media tags &lt;video &lt;audio</li></ol><p>DBMS Interview</p><ol><li><strong>What is the difference between DELETE, TRUNCATE, and DROP in SQL? When would you use each?</strong></li></ol><p><strong>🔹 1. DELETE</strong></p><p>DELETE FROM employees WHERE department = ‘HR’;</p><ul><li><strong>Type</strong>: DML (Data Manipulation Language)</li><li><strong>Purpose</strong>: Removes <strong>specific rows</strong> from a table</li><li><strong>Triggers</strong>: ✅ Fired</li><li><strong>Rollback</strong>: ✅ Possible (if within transaction)</li><li><strong>WHERE clause</strong>: ✅ Supported (can filter rows)</li><li><strong>Logging</strong>: Fully logged (row-by-row deletion)</li><li><strong>Table structure</strong>: Remains intact</li><li><strong>Performance</strong>: Slower (due to logging and row-by-row operation)</li><li><strong>Auto-increment/Identity</strong>: It does not reset the auto-increment counter.</li></ul><p>✅ <strong>When to use:</strong></p><ul><li>When you want to delete <strong>specific records</strong></li><li>When rollback capability is needed</li><li>When triggers must be executed</li></ul><p><strong>🔹 2. TRUNCATE</strong></p><p>TRUNCATE TABLE Employees;</p><ul><li><strong>Type</strong>: DDL (Data Definition Language)</li><li><strong>Purpose</strong>: Removes <strong>all rows</strong> from a table</li><li><strong>Rollback</strong>: ❌ Not possible (generally, auto-commit in most DBs)</li><li><strong>Triggers</strong>: ❌ Not fired</li><li><strong>WHERE clause</strong>: ❌ Not supported</li><li><strong>Logging</strong>: Minimally logged (faster)</li><li><strong>Table structure</strong>: Remains intact</li><li><strong>Performance</strong>: Very fast as Instead of deleting row-by-row, it deallocates the data pages</li><li><strong>Auto-increment/Identity</strong>: ✅ Reset</li></ul><p>✅ <strong>When to use:</strong></p><ul><li>When you want to delete <strong>all data quickly</strong></li><li>When you don’t need rollback</li><li>When resetting identity values is required</li></ul><p><strong>🔹 3. DROP</strong></p><p>DROP TABLE Employees</p><ul><li><strong>Type</strong>: DDL (Data Definition Language)</li><li><strong>Purpose</strong>: Removes <strong>entire table structure + data</strong></li><li><strong>Rollback</strong>: ❌ Not possible</li><li><strong>Triggers</strong>: ❌ Not applicable</li><li><strong>WHERE clause</strong>: ❌ Not applicable</li><li><strong>Logging</strong>: Minimal (metadata operation)</li><li><strong>Table structure</strong>: ❌ Deleted completely</li><li><strong>Performance</strong>: Fast</li><li><strong>Auto-increment/Identity</strong>: ✅ Removed with table</li></ul><p>✅ <strong>When to use:</strong></p><ul><li>When the table is <strong>no longer needed</strong></li><li>When you want to completely remove both schema and data</li></ul><p>Deletes Data, Schema, Index, Triggers, Constraint</p><ol><li>All Keys in DBMS</li><li>Super Key</li></ol><p>It is a set which contains one or more attributes which uniquely identify each row in table. Each value of this set can have redundant(extra) attribute in it</p><p><strong>Example:</strong> Table: Student (ID, Email, Phone)</p><ul><li>Super keys:</li><li>{ID}</li><li>{ID, Email}</li><li>{ID, Phone}</li></ul><ol><li>Candidate Key</li></ol><p>It is the minimal super key, which uniquely identify each row, Does not have redundant attribute in it. A table can have multiple candidate keys</p><ul><li>{ID}, {Email} <br>(if both uniquely identify records)</li></ul><ol><li>Primary Key</li></ol><p>One Candidate key is chosen as the primary key of table, can have only one primary key per table</p><p>+ Cannot Be NULL</p><p>+ Has to be UNIQUE</p><ol><li>Alternate Key</li></ol><p>Candidate key which are not picked as primary key are alternate key</p><ul><li>If {ID} is PK, and {Email} is also unique → Email becomes <strong>Alternate Key</strong></li></ul><ol><li>Foreign Key</li></ol><p>It is key used to link two tables, Refers to primary key of another table, Maintains Referential Integrity</p><ol><li>Composite Key</li></ol><p>A key made up of <strong>two or more columns</strong>. A single column is not enough to uniquely</p><p>identify records</p><p>PRIMARY KEY (StudentID, CourseID)</p><ol><li>Unique Key</li></ol><p>Ensures uniqueness of column, unlike primary key it allows null values</p><p>Email VARCHAR(100) UNIQUE</p><p>A table can have multiple unique keys but single primary key</p><ol><li>Surrogate Key</li></ol><p>Artificial(System Generated) key which has no business meaning</p><p>Auto-Inc ID</p><p>UUID</p><ol><li>Indexing</li></ol><p>+ Indexing is an optimization process, which reduces disk reads operation while query is processed. Speed up query with Select and Where clause</p><p>+ Instead of searching whole table, DB use index to find the data in the table</p><p>+ Index is a data structure which holds search key and data reference</p><p>Search key contains the primary key / candidate key or sm else</p><p>Data reference is pointer holding reference of disk block holding value for the corresponding search key</p><p>+ Index File is always sorted</p><p>Index Table:</p><p>Name Pointer</p><p>Ali -&gt; Row 5</p><p>Atif -&gt; Row 10</p><p>Zara -&gt; Row 20</p><p>+ Index File is always sorted</p><p>Classification of Indexes</p><ol><li>Based on physical ordering of data → Clustered, Non-Clustered</li><li>Based on density of entries → Dense, Sparse</li><li>Based on the indexed attribute → Primary, Secondary, Clustering</li><li>Based on number of levels → Single-level, Multi-level</li><li>Based on the data structure used → B-Tree, B+ Tree, Hash</li></ol><p>Based on physical ordering of data</p><p><strong>A. Clustered Index</strong></p><p>The table is physically sorted by the index key</p><ul><li>Only <strong>one clustered index per table</strong> is possible, because data can be physically sorted in only one order.</li><li>The leaf nodes of a clustered index contain the <strong>actual data rows</strong></li><li><strong>Index May or may not be primary key</strong></li><li>In a clustered index, the table itself is organized as a B-tree, where the leaf nodes contain the actual data</li></ul><p><strong>B. Non-Clustered Index</strong></p><ul><li>A non-clustered index is a <strong>separate structure</strong> from the data file.</li><li>Data structure, which contain a search key and pointer to actual row.</li><li>The actual data is stored in some other order</li><li><strong>Many non-clustered indexes per table</strong> are allowed.</li><li><strong>Sorted on the indexed column</strong></li><li>Leaf nodes contain:</li><li>Key (indexed column value)</li><li>Pointer to actual data</li><li>Clustered is faster than non-clustered index</li></ul><p><strong>Based on density of entries</strong></p><p><strong>A. Dense Index</strong></p><p><strong>B. Sparse Index</strong></p><ul><li>Each Search key point to a block of</li><li>Data file must be sorted on indexed attribute</li><li>To find desired record, locate appropriate block then scan the block</li><li>Slower as it has to search the block aswell</li><li>Page file size is small as search key points to a block of entries</li></ul><p><strong>Based on the indexed attribute</strong></p><p><strong>A. Primary Index</strong></p><p><strong>B. Secondary Index</strong></p><ul><li>Built on <strong>any column</strong> — key or non-key — <strong>other than the one the data file is sorted by</strong>.</li><li>The data file is <strong>not sorted</strong> by this attribute, so the index must have <strong>one entry for every record</strong> → <strong>dense index</strong>.</li></ul><p><strong>C. Clustering Index</strong></p><ul><li>Built on a <strong>non-key attribute</strong></li><li>The data file is <strong>physically sorted</strong> by this attribute, so records with the same value are stored together (clustered).</li></ul><p><strong>Based on number of levels</strong></p><p><strong>A. Single Level Index</strong></p><p><strong>B. Multilevel Index</strong></p><p><strong>Based on the data structure used</strong></p><p>Multilevel indexing is one application of B and B+ Trees</p><p>Order= Max no of children a node can have (p)</p><p>Root have max p children and minimum 2</p><p>Intermediate node can have max p children and minimum n/2 children</p><p>Keys in sorted order</p><p>Record pointer point at memory</p><p>Block Pointer point at children node</p><p><strong>A. B Tree</strong></p><p><strong>A. B+ Tree</strong></p><p>B+ tree are preferred, as it is fast for range queries</p><p>driver.manage().window().maximize();</p><p>Locator</p><p>Locator is a stratergy to identify a web element in the DOM, so selenium can interact with it. A <strong>locator</strong> is a way to identify and find HTML elements (like buttons, textboxes, links) on a web page.</p><p>WebElement el= driver.findElement(By.id(“username”));</p><ul><li><strong>FindElement()</strong> -</li></ul><p>finds first matching element (WebElement)</p><p>throws NoSuchElementException if not found</p><ul><li><strong>FindElements()</strong>-</li></ul><p>return List&lt;WebElement&gt;</p><p>returns empty list if no matching element found</p><p><strong>Interview point:</strong> Always prefer findElements() when presence is uncertain — avoids exception handling overhead.</p><p>Priority Order</p><p>ID -&gt; Name -&gt; Css -&gt; XPath -&gt; others</p><p>8 Built-in locator stratergy</p><ol><li>By.id() -&gt; Fastest, High stability (if id unique) <br>In Selenium, the <strong>ID locator</strong> is used to find an element using the id attribute of an HTML element.</li></ol><p>+ It is fastest as it uses browser native getElementById()</p><p>+ If not unique, Selenium will return <strong>first matching element</strong> → risky Better to avoid and use XPath/CSS</p><ol><li>By.name() -&gt; Fast, Med stability</li></ol><p>The <strong>Name locator</strong> finds a web element using the HTML name attribute.<strong> Name is NOT always unique. </strong>You can have multiple elements with same name:</p><p>Use name when id not present or dynamic</p><ol><li>By.linkTest() -&gt; Fast, Med stability</li></ol><p>Link Test selects a link with exact visible text inside &lt;a&gt; tag</p><p>&lt;a href=”login.html”&gt;Login&lt;/a&gt;</p><p>driver.findElement(By.linkText(“Login”)).click(); <br>‘</p><p>It matches <strong>exact text</strong>: “Login” ✅ “log” ❌ “Login Now” ❌</p><ol><li>By.partialLinkTest()-&gt; Fast, Med stability</li></ol><p>Located link with partial link text inside &lt;a&gt; tag</p><p>&lt;a href=”login.html”&gt;Click here to Login&lt;/a&gt;</p><p>driver.findElement(By.partialLinkText(“Login”)).click();</p><p>It matches <strong>partial text</strong>: “Login” ✅ “Click” ✅ “here to” ✅</p><p>+ Substring match on anchor text</p><p>+ Risk: matches multiple if substring isn’t unique</p><p>Picks the first matching element, Action may not be accurate</p><p>Use className and tagName when you need group of web elements</p><ol><li>By.className() -&gt; Fast, Low stability (often reused)</li></ol><p>ClassName locator finds elements using the HTML class attribute. Selenium matches <strong>exact class name (single token)</strong></p><p>❗ If element has <strong>multiple classes</strong>, you CANNOT use full value with space</p><p>By.className(“btn primary”) // ❌ ERROR</p><ol><li>By.tagName()-&gt; Fast, Low stabality</li></ol><p>TagName locator finds elements using their <strong>HTML tag name</strong>.</p><p>Selenium scans DOM and finds elements with that tag</p><p>Returns <strong>first matching element in case of findElement</strong></p><p>Mostly used with <strong>findElements()</strong> to get all elements as tag element not unique</p><p>Use case- counting element, iterating element, finding group</p><ol><li>By.cssSelector() -&gt; Fast, High Stability</li></ol><p>CSS Selector is used to locate elements using <strong>CSS rules</strong>.</p><p>driver.findElement(By.cssSelector(“#username”));</p><p>Faster than XPath <br> ✅ Supports complex patterns <br> ✅ Cleaner and shorter syntax <br> ✅ Most preferred in modern automation</p><p>1. By id — driver.findElement(By.cssSelector(“#hero”))</p><p>2. By className- driver.findElement(By.cssSelector(“.input-field”))</p><p>3. By tagName-</p><p>4. tag + id — driver.findElement(By.cssSelector(“div#header”))</p><p>5. tag + classname- driver.findElement(By.cssSelector(“input.text-input”))</p><p>6. tag + attribute — input[type=”text”]</p><p>6. Multiple classes- driver.findElement(By.cssSelector(“.btn.btn-primary”))</p><p>7. Patent -&gt; child</p><p>div &gt; input</p><p>8. Descendant (Any level)</p><p>div input</p><ol><li>By.xPath()-&gt; Slowest, High stability</li></ol><p>XML Path language, used to locate element using HTML DOM structure. Traverse dom.. It is like address of element in DOM</p><ol><li>Absolute xPath (Root xPath) — 👉 Starts from root (/html/body/…) traverse direct children, start from / and continue to the target element</li></ol><p>Ex: /html/body/div[6]/header/div[2]/div[2]/form/input</p><ol><li>Relative Xpath (Partial xPath)</li></ol><p>Relative vs Absolute</p><ol><li>Absolute xpath start with / (forward slash) — starts from html tag to the target tag inc whole path</li></ol><p>Relative start with // — jumps directly to the element</p><ol><li>Absolute path donot use attribute, Relative path work with atrribute</li><li>Absolute xpath traverse through each node till it finds the element</li></ol><p>Relative xpath directly jump and find target element using atrribute</p><p>Starts anywhere using // , Jumps directly to that element</p><p>//*[@id=”small-searchterms”]</p><p>For tag name you can use *</p><ol><li>By attribute</li></ol><p>//tag[@attribute=’’]</p><ol><li>Multiple attribute</li></ol><p>//tag[@attribute=’’ and @attribute=’’]</p><ol><li>Condition</li></ol><p>//tag[@attribute=’’ or @attribute=’’]</p><ol><li>Dynamic element (attribute change)</li></ol><p>//tag[contains(@id,’user’)]</p><ol><li>With inner Text</li></ol><p>//tag[text()=’val’]</p><ol><li>Starts-with</li></ol><p>//tag[starts-with(@attribute,’val’)]</p><ol><li>Chained Xpath (no attribute or inner text)</li></ol><p><strong>Chained XPath</strong> means <strong>locating an element step</strong>‑<strong>by</strong>‑<strong>step</strong>, moving from a <strong>parent</strong></p><p><strong>element to its child/descendant</strong> instead of writing one long XPath.</p><p>WebElement product =driver.findElement(By.xpath(“//div[@id=’product’]”));</p><p>WebElement price =product.findElement(By.xpath(“.//span”));</p><p>driver.findElement(By.xpath(“//div[@id=’product’]//span”));</p><p>Difference bw xpath and cssSelector is css follow top down approach to select element while xapth can follow any approach top or bottom up</p><p>Webdriver method</p><p>Webdriver is an interface in selenium, which allow us to interact with browsers programatically</p><ol><li><strong>Get methods- we can access these methods through webdriver instance</strong></li></ol><p>.get(url) — open the url on browser</p><p>.getTitle()- return title of the page</p><p>.getCurrentUrl() — return url of the page</p><p>.getPageSource() — return source code of the page</p><p>.getWindowHandle() — return ID of single browser window</p><p>.getWindowHandles() — return ID’s of multiple browser window, Set&lt;String&gt;</p><p>Close() — closes window which is focused by driver, Closes <strong>current browser window</strong></p><p>Quit() — closes all windows, Closes <strong>all browser windows</strong> + ends session</p><p>To close particular, then traverse window id and get the title, based on title match close the window</p><p>Driver do not switch to another page unless we explicitly do it, even if it open a new page link still driver focused on existing page</p><ol><li><strong>Conditional methods- accessible on web element and not driver</strong></li></ol><p>IsDisplayed() — we can check display status of the element</p><p>IsEnabled() — we can check enable/disable status of the element/operational element (allow to put data)</p><p>isSelected()- we can use to check the element is selected or not (checkbox, select)</p><ol><li><strong>Wait commands</strong></li></ol><p>Wait in selenium is used to solve synchronization issues bw selenium script and web pages, In web pages element are loaded asynchronously, when selenium try to execute code faster before rendering, it try to access element which donot exist yet in DOM</p><p>Throwing:</p><ul><li><strong>NoSuchElementException </strong>— when element doesnt exist in DOM</li><li><strong>StaleElementReferenceException</strong>- hold reference to an element which no longer exists in DOM</li><li><strong>ElementNotInteractableException</strong>- element in dom but not visible or clickable</li></ul><p>Thread.sleep(time in ms)</p><p>Adv:</p><p>1) easy to use</p><p>DisAdv</p><p>1) Fixed Waiting it will wait for maximum time out. this will reduce the performace script.</p><p>1. Implicit Wait-</p><p>Applies to all element, selenium waits upto given time before throwing exception. Implicit wait is applied every time WebDriver tries to findan element, and each call gets its own timeout</p><p>Disadvantge:</p><p>if the time is not sufficient then you will get exception</p><p>Tells WebDriver to poll the DOM for a specified time when trying to find an element</p><p>Driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));</p><ul><li>Set once → applies to <strong>every</strong> findElement / findElements call for the driver’s lifetime</li><li>Selenium polls every ~250ms until element is found OR timeout expires</li><li>If element found early → returns immediately (does NOT wait full duration)</li><li>If timeout exceeded → throws NoSuchElementException</li><li>All or None: Same Wait applies to all element</li><li>Only check presence of element in DOM — not visibility of clickability</li></ul><p>2. Explicit Wait-</p><p>Explicit wait is a type of wait, wait for a specific condition to be true for specific element within maximum timeout</p><p>You first declare the wait with driver and duration, and then you can use it multiple time with conditions which return an element, can wait for only one element</p><ul><li>Polls every ~500ms (default)</li><li>Returns as soon as condition is met</li><li>Throws TimeoutException if condition not met within timeout</li></ul><p>We use wait.util(condition) -&gt; this wait till condition true then return the element, if condition fails after given time then we get TimeoutException</p><ol><li>Conditional based, it will work more effectively.</li><li>finding element is inclusive</li><li>it will wait for condition to be true, then consider the time</li><li>we need to write multiple statements for multiple elements</li></ol><p>WebDriverWait wait= new WebDriverWait(driver,Duration.ofSeconds(10));</p><p>Wait.until();</p><p>ExpectedConditions</p><p>1. Element state conditions</p><ol><li><strong>PresenceOfElementLocated</strong>(locator)- element present in DOM (may not be visible)</li><li><strong>VisibilityOfElementLocated</strong>(locator)- element present in DOM and visible (heigh/width &gt;0)</li><li><strong>VisibilityOf</strong>(WebElement)</li><li>InvisibilityOfElementLocated(locator)- element no longer visible</li><li>ElementToBeClickable(locator);</li><li>ElementToBeSelected(locator);</li></ol><p>2. Text Conditiion</p><ol><li>TextToBePresentInElement(WebElement,text)</li><li>TextToBePresentInElementLocated(locator,text)</li><li>TextToBe()</li></ol><p>3. Navigation</p><ol><li>ExpectedConditions.titleIs(“Dashboard”);</li><li>ExpectedConditions.titleContains(“Home”);</li><li>ExpectedConditions.urlToBe(“https://example.com/home&quot;);</li><li>ExpectedConditions.urlContains(“/dashboard”);</li><li>ExpectedConditions.urlMatches(“.*/user/\\d+”);</li></ol><p>WHen we have implicit and explicit wait, it wait for combined wait or behave unpredictably</p><p><em>4. Fluent Wait</em></p><p>A more configurable explicit wait. WebDriverWait is actually a subclass of FluentWait.</p><p><strong>Fluent Wait in Selenium</strong> is a dynamic waiting mechanism that lets you define:</p><ul><li><strong>Maximum wait time (withTimeout)</strong></li><li><strong>Polling frequency</strong> (how often Selenium checks for the condition) (pollingEvery)</li><li><strong>Exceptions to ignore</strong> while waiting (ignoring())</li></ul><p>Wait&lt;WebDriver&gt; wait= new FluentWait&lt;&gt;(driver) <br> .withTimeout(Duration.<em>ofSeconds</em>(10)) <br> .pollingEvery(Duration.<em>ofSeconds</em>(2)) <br> .ignoring(NoSuchElementException.class);</p><p><strong>Feature</strong></p><p><strong>Description</strong></p><p>withTimeout()</p><p>Max time to wait</p><p>pollingEvery()</p><p>Delay between retries</p><p>ignoring()</p><p>Exceptions to skip</p><p>until()</p><p>Condition to be met</p><p>.until() take instance of functional interface take WebDriver and return WebElement. Can use lambda expression here</p><p>wait.until() accepts a <strong>functional interface</strong> called ExpectedCondition&lt;T&gt;.</p><p>Until() keep on polling the apply(driver) every polling interval until</p><p>Takes webdriver and return type T, Keep up polling unit</p><ol><li>Non null value returned</li><li>True returned</li><li>Timeout expires, TimeoutException</li></ol><p><strong>Rule:</strong></p><ul><li>null → keep polling</li><li>false → keep polling</li><li>any non-null object → stop, return it</li><li>true → stop</li></ul><p>Navigation</p><p>Navigation methods are present on .navigation() on driver</p><ol><li>navigate().to(url);</li></ol><p>Works with:</p><ul><li>URL as String</li><li>URL object</li></ul><p>get() waits for the entire page to load, making it more reliable, while navigate().to()</p><p>may not wait completely and is part of the Navigation interface used for browser history</p><p>operations.</p><ol><li>navigate().back();</li><li>navigate().forward();</li><li>Navigate().refresh();</li></ol><p>Window Handle- unique id for each window (driver.getWindowHandle())</p><p>GetWindowHandles() return Set of IDs</p><p>These ID are String</p><p>Switch window using</p><p>Driver.switchTo().window(id)</p><p><strong>Dropdown</strong></p><ol><li>Select dropdown with select tag and options tag underneath with all the values</li></ol><p>Store Select web element using findElement</p><p>Create Select Object by passing the web element</p><p>SelectByVisibileText()</p><p>SelectByIndex()</p><p>SelectByValue()</p><p>GetOptions() — return list of option web elements</p><p>It return all the option web element</p><p>select.deselectByVisibleText(“Java”);</p><p>select.deselectByValue(“js”);</p><p>select.deselectByIndex(1);</p><p>Select.deselectAll</p><p><strong>IFrame</strong></p><p>Iframe is an html doc embedding inside current html page, Selenium treats it as seperate context, so need to switch to before interacting with it.</p><p>Driver.switchTo().frame()</p><p>Go back</p><p>Driver.switchTo().parentFrame()</p><p>Driver.switchTo().defaultContent()</p><p><strong>Alert</strong></p><p>Alert is browser based pop, not present in dom, so selenium cant find using locator, different context, so switch to. It is generated by javascript. Window.alert() window.prompt()</p><p>Alert alert= driver.switchTo().alert();</p><p>Alert.getText()</p><p>Alert.accept();</p><p>Alert.dismiss();</p><p>Alert.sendKeys()</p><p><strong>Shadow DOM</strong></p><p>Shadow DOM is a feature in browser, which allows a component to have its own isolated DOM tree. It is isolated and independent from the main webpage DOM. Elements inside Shadow DOM is not accessible by selenium directly.</p><p>It encapsulates HTML, CSS, JS into a single unit and keep component safe and independent.</p><p>Normal Locator fails, as element not present in the main dom, seperate shadow DOM tree</p><ol><li>Shadow Host — the dom element that hosts the shadow dom</li><li>Shadow Root- Root of shadow dom tree</li></ol><p>Const shadow_host = document.querySelector(“#host”);</p><p>Const shadow_root= shadow_host.attachShadow({model:’open’}) // model = open +&gt; accessible</p><p>Shadow_root.innerHtml= ‘’;</p><p>WebElement shadowHost;</p><p>SearchContext shadowRoot = shadowHost.getShadowRoot();</p><p>Use shadow root to access elements and interact with em</p><p>ONLY cssSelector() work inside shadow dom, none other than it work</p><p>#shadow-root (open) ← this label means it’s shadow DOM</p><p>Xpath doesnt support in shadow dom, as it operates from the root, since shadow dom is isolated and independent , seperate encapsulated tree</p><p>Action</p><p>Action class is selenium, simulates advanced user actions like mouse movement, keyboard actions, which cannot be achieved using .click() or .sendKeys()</p><p>Actions builds a chain of user interactions and execute them as a atomic sequence using perform()</p><p>Use build() — when you want to build an action once</p><p>Action is an interface and .build() return type of Action</p><p>Actions actions1= <em>new </em>Actions(driver); <br><em>Action </em>actionBuild= actions1.keyDown(Keys.<strong><em>CONTROL</em></strong>).sendKeys(“A”).build(); <br>actionBuild.perform();</p><p>+ Actions is a class , It is builder class which builds chain, .perform() execute the chain as composite and .build() return Action type</p><p>+ Action is an interface, single reusable executable</p><p>Pause() adds a wait in between chain interactions , After hovering wait for tooltip</p><p>WebElement canvas;</p><p><strong>Apache POI</strong></p><p>Workbook -&gt; Xlxs file itself</p><p>Sheet -&gt; a tag within workbook</p><p>Row -&gt; a horizontal row (0-indexed)</p><p>Cell -&gt; A single cell (0 indexed)</p><p>Cell Value-&gt; String, number, boolean</p><p>FileInputStream</p><p>FileOutputStream</p><p>XSSFWorkbook- workbook</p><p>XSSFSheet- sheet</p><p>XSSFRow- row</p><p>XSSFCell- cell</p><p>Old binary → .xls → HSSWorkbook format POI class (Horrible Style Sheet)</p><p>OOXML (zipped xml) -&gt; .xlsx -&gt; XSSWorkbook format POI class (XML Style Sheet)</p><p>poi alone gives you <strong>HSSF </strong>(.xls). You need poi-ooxml for <strong>XSSF </strong>(.xlsx). Adding poi-ooxml transitively pulls in poi, so you only need to declare both for clarity.</p><p>Add both dependency</p><ol><li>sheet.getLastRowNum() — starts 0th based indexing, header row is the 0th index</li><li>Row.getLastCellNum()- starts 1 based indexing</li></ol><p><strong>Storing Col titles</strong></p><p>XSSFRow headerRow= sheet.getRow(0);</p><p>Store all header col name in list of string using c=0 to c&lt;headerRow.getLastCellNum()</p><p>XSSFCell cell= headerRow.getCell(c)</p><p>Val=Cell.getStringValue()</p><p>Header.add(val)</p><p><strong>Storing Rows detail in list of hashmap</strong></p><p>Int r = 1 r&lt;=sheet.getLastRowNum()</p><p>XSSFRow row= sheet.getRow(r)</p><p>For each row create hashmap</p><p>C=0 c&lt;row.getLastCellNum()</p><p>XSSFCell cell= row.getCell(c)’</p><p>Map.put(header.get(c), cell.getStringValue)</p><p>Add map to the list</p><p>Always close workbook and file using .close</p><p><strong>The type of Cell can be anything</strong></p><p>Get it using .getCellType()</p><p>It can be of STRING, NUMERIC, BOOLEAN</p><p>These enum come from import org.apache.poi.ss.usermodel.*;</p><p>Write File</p><p>Sheet= Workbook.createSheet(“data”)’</p><p>Row=Sheet.createRow(rowNo)</p><p>Cell= row.createCell(cellNo)</p><p>Cell.setCellValue()</p><p>Method overloading done, can set type based on value bassed</p><p><strong>TestNG</strong></p><p>TestNG (Test NextGeneration) is a java unit testing framework, it makes test automation powerful, flexible and mangeable. It is widely used along with Selenium for functional, integration and regression testing.</p><p>Why TestNG</p><ol><li>Test Cases and Test Suits</li><li>Grouping of test cases</li><li>Define Flow of Test execution (Prioritize)</li><li>Parallel Test Execution</li><li>Generate reports</li><li>Manage dependency bw tests</li></ol><p>In TestNG we downt have main method, we mark methods as @Test</p><ol><li>@Test — . It is used to <strong>define a test method</strong> that TestNG will executed, we dont have a main method, TestNg Execute test methods in alphabetical order</li></ol><p>TestNG only execute method, only annotated with @Test</p><p>Method name should be textXYZ()</p><p>Attributes of @Test</p><ol><li>Priority- @Test(priority= num)</li></ol><p>TestNg Execute test methods in alphabetical order, we can define the order in which test methods are executed</p><p>📌 Lower priority runs first <br> 📌 Default = 0</p><p>📌 If priority of method is same, they are executed in alphabetical order</p><p>📌 We can have negative number in priority</p><p>📌 Priority can be random, doesnt need to be consequitive</p><p>The writing order doesnt matter</p><ol><li>Enabled @Test(enabled=true)</li></ol><p>Enable or disable test execution</p><ol><li>DependsOnMethods @Test(dependsOnMethods=””)</li></ol><p>Run test only after certain test case pass</p><ol><li>Groups @Test(@groups=”regression”)</li></ol><p>Parellel, dependency management, priority execution, grouping, enabled/distable;.</p><p>You can convert the class into XML using ‘</p><p>Through XML u can run single test or group(suite)</p><p>Report generated- test-output -&gt; index.html or emailable-report</p><ol><li>Automatically- eclipse converts using plugin</li></ol><p><strong>@BeforeMethod @AfterMethod</strong></p><p>Runs <strong>before and after each @Test method</strong></p><p>✅ Used for:</p><ul><li>Login/logout</li><li>Reset test state</li></ul><p>Login -&gt; BeforeMethod</p><p>This is search</p><p>Logout -&gt; AfterMethod</p><p>Login -&gt; BeforeMethod</p><p>This is advanced search</p><p>Logout -&gt; AfterMethod</p><p><strong>@BeforeClass @AfterClass</strong></p><p>Runs <strong>once before/after all methods</strong> in a class</p><p>✅ Used for:</p><p>+ Browser setup &amp; close</p><p>Login -&gt; BeforeClass</p><p>This is search</p><p>This is advanced search</p><p>Logout -&gt; AfterClass</p><p><strong>@BeforeTest @AfterTest</strong></p><p>Runs <strong>before &amp; after &lt;test&gt; tag</strong> in XML</p><p>A method annotated with @BeforeTest Run before the &lt;test&gt;</p><p>@BeforeSuite ──► runs ONCE before all tests in the suite</p><p>@BeforeTest ──► runs ONCE before each &lt;test&gt; tag</p><p>@BeforeClass ──► runs ONCE before the first method of a class</p><p>@BeforeMethod ──► runs BEFORE every @Test method</p><p>@Test ──► the actual test</p><p>@AfterMethod ──► runs AFTER every @Test method</p><p>@AfterClass ──► runs ONCE after the last method of a class</p><p>@AfterTest ──► runs ONCE after each &lt;test&gt; tag</p><p>@AfterSuite ──► runs ONCE after all tests in the suite</p><p><strong><em>When to use each — the practical mapping</em></strong></p><p><strong>Annotation</strong></p><p><strong>Real use case</strong></p><p><strong>Cost of running</strong></p><p>@BeforeSuite</p><p>Start a Docker container (DB, Kafka), spin up a shared WireMock server, load global config</p><p>Very expensive — run once, period</p><p>@BeforeTest</p><p>Switch environment (staging vs prod URL), select a browser per &lt;test&gt; group</p><p>Moderate</p><p>@BeforeClass</p><p>Initialize a WebDriver, open a DB connection, load class-specific test data</p><p>Expensive, but tied to one class’s tests</p><p>@BeforeMethod</p><p>Reset application state, log in a fresh user, clear cookies, seed a row in DB</p><p>Cheap-ish, runs constantly</p><p><strong>Assertions</strong></p><p>Assertions are used to validate expected vs actual result in test cases, they determine whether test cases pass or fail</p><ol><li>Hard Assertions</li></ol><p>Test stop immediately whenever assertion fails</p><p>Assert.assertEquals(actual, expected);</p><p>Assert.assertNotEquals(actual,expected);</p><p>Assert.assertTrue(cond)</p><p>Assert.assertFalse(cond)</p><p>Assert.assertNull(obj)</p><p>Assert.assertNotNull(obj)</p><p>Assert.fail()</p><ol><li>Soft Assertion</li></ol><p>If Assert fail, test continue execution</p><p>Must call assertAll() at end</p><p>SoftAssert sa= new SoftAssert();</p><p>Sa.assertEquals(10,5);</p><p>Sout(“Will Run”);</p><p>Sa.assertAll()</p><p>You can do coditionally</p><p>If(true) Assert.assertTrue(true)</p><p>Else Assert.assertFalse(false)</p><p><strong>Dependency Methods</strong></p><p>By default, TestNG execute all test methods,</p><p>So if a test is dependent on some other test which failed, it still get executed</p><p>We need to skip all the dependent test aswell</p><p>DependsOnMethods is used to create dependency bw test methods</p><p>It make sure a test method only run when the dependent test method runs successfully</p><p>Goes to skipped category the test method</p><p>@Test(dependsOnMethods=”openApp”)</p><p>@Test(dependsOnMethods={“openapp”,”login”})</p><p>You can also depend on groups:</p><p>@Test(groups = “smoke”)</p><p>public void test1() {}</p><p>@Test(dependsOnGroups = “smoke”)</p><p>public void test2() {}</p><p><strong>Groups</strong></p><p>Grouping in TestNG allow us to categorize test methods into group and execute them selectively</p><ul><li>Run only specific tests (smoke, regression, sanity)</li></ul><p>@Test(groups = {“smoke”, “regression”})</p><p>@Test(groups = “regression”)</p><p>Inside &lt;test&gt;</p><p>Place</p><p>&lt;groups&gt;</p><p>&lt;run&gt;</p><p>&lt;include name=”group_name”/&gt;</p><p>&lt;exclude name=”group_name”</p><p>&lt;/run&gt;</p><p>&lt;/groups&gt;</p><p>Inside</p><p>&lt;tests&gt;</p><p>&lt;groups&gt;</p><p>&lt;run&gt;</p><p>&lt;include name=”group_name”/&gt;</p><p>&lt;exclude name=””/&gt;</p><p>&lt;run&gt;</p><p>&lt;/groups&gt;</p><p>&lt;/tests&gt;</p><p><strong>Parameterization</strong></p><p>Exeute same test script multiple times using different data set</p><p>+ Improve test coverage</p><p>+ Avoid hard codding test data</p><ol><li>@DataProvider — its way to provide data to test data in form of 2d array of Object to test method. The DataProvider method must return Object[][] , Each row is a one test execution, column is one of the parameter for test case</li></ol><p>Only the method must be annotate by</p><p>@DataProvider(name=”dp_name”)</p><p>And test method contain the attribute</p><p>@Test(dataProvider=”dp_name”, dataProviderClass =LoginDataProvider.class)</p><p>2.</p><p>&lt;parameter name=”browser” value=”chrome” /&gt;</p><p>@Parameters(“browser”)</p><p>@Test</p><p>Public void test(String browser)</p><p>LISTNERS-</p><p>1. ITestListners — fires event at every method level</p><p>Class TestListner extends ItestListner{</p><p>@override</p><p>Public void onTestStart(){}</p><p>@override</p><p>Public void onTestSuccess(){}</p><p>@override</p><p>Public void onTestFailure(){}</p><p>}</p><p>ExtentReport- one instance</p><p>OnTestStart — create extenttest</p><p>On that extenttest log sucess failure(attach screenshot) skipp</p><p>We listner in xml</p><p>&lt;listent</p><p>.then()</p><p>.body(“user.email”,equalTo(1))</p><p><strong><em>POM (Page Object Model)</em></strong></p><p>POM is a design pattern in selenium to create an object repository for web elements</p><p>Improve code reusabiluty, readability, maintainability and scalability.</p><p>POM means for EACH web page there is one class, all web element and action are stored in that class and another class which contains the test methods</p><p><strong>Without Pom:</strong></p><p>driver.findElement(By.id(“username”)).sendKeys(“user”);</p><p>driver.findElement(By.id(“password”)).sendKeys(“pass”);</p><p>driver.findElement(By.id(“login”)).click();</p><ul><li>Problem with duplication of web elements and actions on different test files</li><li>Updation is tedious, if web element attribute change, the locator logic must also be changed everywhere</li></ul><p><strong>With Pom:</strong></p><p>LoginPage page = new LoginPage(driver);</p><p>page.enterUsername(“user”);</p><p>page.enterPassword(“pass”);</p><p>page.clickLogin();</p><p><strong>Structure:</strong></p><p>src/test/java | |</p><p>— pages | |</p><p>— LoginPage.java | |</p><p>— HomePage.java | |</p><p>— tests | |</p><p>— LoginTest.java</p><p><strong>1. Page Classes</strong></p><ul><li>Represent individual web pages</li><li>Contain:</li><li>Web element locators</li><li>Methods to interact with elements</li></ul><p><strong>2. Test Classes</strong></p><ul><li>Contain:</li><li>Test logic</li><li>Assertions</li><li>Use page classes to perform actions</li></ul><p><strong>3. Driver Handling</strong></p><ul><li>WebDriver instance is passed to page classes</li><li>Ensures consistent browser interaction</li></ul><p>Page Object has</p><p>1. Constructor- initiate the web driver</p><p>2. Locators- all the locator required are defined</p><p>3. Action methods- Test method call these methods</p><p>2 Approach to create Page Object</p><ol><li>Without PageFactory</li><li>With PageFactory</li></ol><p><strong>Without PageFactory</strong></p><p>Define all the locators using By, the locator metadata is store in By type variable and the action method find element using these locators</p><p>You manually define:</p><ul><li>Locators (By)</li><li>Methods using driver.findElement()</li><li>Direct interaction with WebDriver</li></ul><p>Page Class:</p><p>- WebDriver instance</p><p>- Locators using By</p><p>- Action methods using findElement()</p><p>Test Class:</p><p>- Calls page methods</p><p>❌ More code (repeated findElement) <br>❌ Less readable <br>❌ Harder maintenance in large projects</p><p><strong>With PageFactory</strong></p><ul><li>Uses annotations (@FindBy) to locate elements</li><li>Uses PageFactory class to initialize elements</li></ul><p>Page Class:</p><p>- WebElements defined using @FindBy</p><p>- Constructor initializes elements</p><p>- Methods use WebElements directly</p><p>Test Class:</p><p>- Uses page methods only</p><ul><li><strong>Initialized at runtime</strong></li><li>Stored as WebElement variables</li><li>Can use lazy loading (loaded when used)</li></ul><p><strong>PageFactory.initElements()</strong> is a <strong>method used to initialize WebElements</strong> that are defined using @FindBy annotations in a Page Object class. PageFactory.initElements()</p><p>It <strong>connects</strong> your @FindBy elements with the actual elements in the browser.</p><p>PageFactory.initElements(WebDriver driver, Object pageClass);</p><p>(driver,this)</p><ul><li>Finds all @FindBy elements</li><li>Locates them in the DOM</li><li>Assigns them to WebElement variables</li></ul><p><strong>Step-by-step:</strong></p><ol><li><strong>Scans the class</strong></li><li>Looks for all @FindBy annotations</li><li><strong>Creates proxy objects</strong></li><li>Not actual elements yet</li><li>Uses <strong>lazy initialization</strong></li><li><strong>Element is located only when used</strong></li><li>Example: username.sendKeys() triggers actual search</li></ol><p><strong>Automation Framework</strong></p><p>Automation Framework are set of guidelines, tools , practices and standards followed to design and execute automated test scripts.</p><p>+ Reusability</p><p>+ Maintainability</p><p>+ Readability</p><p>+ Scalability</p><p>Types:</p><ol><li>Built-in — testng, junit, cucumber</li><li>Customized (user-defined)</li></ol><p>Modular framework, Data driven, keyword driven, hybrid driven</p><ol><li>Data Driven Framework</li></ol><p>Test script are seperate from test data</p><p>Test data is stored externally (excel) and same test script run multiple times with different data sets</p><p>+ No duplication of test scripts</p><p>+ No hardcoding</p><p>Apache POI + DataProvider in TestNG</p><p>@DataProvider(name=”loginData”)</p><p>Public Object[][] getLoginData(){</p><p>Return ExcelUtil.getSheet(“loginData”);</p><p>}</p><p>@Test(dataProvider=”loginData”, dataProviderClass=LoginData.class)</p><p>Public void testLogin(String username, String password){}</p><p>Public Object[][] getSheetData(String sheetName){</p><p>FileInputStream fis= new FileInputStream(path);</p><p>XSSFWorkbook wb= new XSSFWorkbook(fis);</p><p>XSSFSheet sheet= wb.getSheet(sheetName);</p><p>Int rows= sheet.getLastRowNum();</p><p>Int cols= sheet.getRow(0).getLastCellNum();</p><p>For(int r=1;r&lt;=rows;r++){</p><p>For(int c=0;c&lt;cols;c++){</p><p>XSSFCell cell= sheet.getRow(r).getCell(c);</p><p>}</p><p>}</p><p>}</p><ol><li>Keyword Driven Testing’</li></ol><p>Action to be performed is abstracted into a keyword stored in external file, keyword engine read the file and call the corresponding method.</p><p>+ Keyword= openBrowser, navigate, click, type</p><p>+ Locator= name</p><p>+ value</p><ol><li>Modular Testing framework</li></ol><p>It involves breaking down application into independent and reusable modules, test script are written for each module, each are combined in main driver script to build end to end test cases</p><ol><li>Hybrid framework</li></ol><p>Combines multiple framework- data driven, keyword driven, modular</p><p>HybridFramework/</p><p>├── src/</p><p>│ ├── base/ ← BaseTest (driver init, teardown)</p><p>│ ├── pages/ ← Page Object classes</p><p>│ ├── tests/ ← TestNG test classes</p><p>│ ├── utilities/</p><p>│ │ ├── ExcelUtils.java ← Apache POI for data</p><p>│ │ ├── KeywordEngine.java ← keyword execution</p><p>│ │ └── ReportUtils.java ← ExtentReports</p><p>├── testdata/</p><p>│ └── testdata.xlsx</p><p>├── config/</p><p>│ └── config.properties ← browser, URL, credentials</p><p>├── testng.xml</p><p>└── pom.xml</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f57d5bbafd5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Manual Testing]]></title>
            <link>https://medium.com/@atif276ali/manual-testing-65951c3904ff?source=rss-09e7546483fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/65951c3904ff</guid>
            <dc:creator><![CDATA[Atifali]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 08:14:29 GMT</pubDate>
            <atom:updated>2026-06-19T08:14:29.664Z</atom:updated>
            <content:encoded><![CDATA[<ol><li><strong><em>Regression Testing</em></strong></li></ol><p>Testing done on modified build to make sure there is no negative effect on existing functionality because of addition/removal/modification of feature (recent code change)</p><p>Previously working features not broken after modification</p><ol><li>Unit Regression Testing</li></ol><p>Testing only the changes/modification done by developer (Module)</p><ol><li>Regional Regression Testing</li></ol><p>Modified module aswell as the impacted module are tested</p><p>Impact Analysis meeting to detect impacted modules with QA and dev team</p><ol><li>Full regression Testing</li></ol><p>Testing is done on main functionality aswell as other functionality, when developer have modified code in multiple module, Impact analysis is not done, one round of full regression testing is done</p><ol><li><strong><em>Re-testing</em></strong></li></ol><p>Testing where the specific bug is tested again after being fixed to verify the issue is resolved or not. Close the bug if it work or reopen and send to dev</p><ol><li><strong><em>Smoke vs Sanity Testing</em></strong></li></ol><p>After Build Release Smoke and Sanity Testing come into the picture</p><p>+ Smoke testing is made to ensure, the build received from development team is stable enough for further testing, Ensure critical functionality are working</p><p>Sanity Testing is focused testing on a particular functionality, after minor change or bug fix</p><p>+ Smoke Testing is done by developers and testers</p><p>Sanity Testing is done by testers</p><p>+ Smoke Testing is Broad and shallow</p><p>Sanity Testing is narrow and deep</p><p>+ Smoke Testing Done after each build</p><p>Sanity Testing done after bug fix or minor change</p><p>+ Smoke Testing is basic testing</p><p>Sanity Testing is part of regression testing</p><p>+ Smoke Testing is done on initial builds, may be stable or unstable</p><p>Sanity Testing is done on relatively stable builds</p><ol><li>Exploratory Testing</li></ol><p>Type of testing, tester explore the application, learn about it, and design test cases on the spot without pre defined test script. Done when app ready but no docs</p><p>Drawback- misunderstand a bug as feature or feature as bug</p><ol><li>AdHoc Testing</li></ol><p>It is a type of informal testing, Random testing done without test case or business requirement doc, Done with the aim of breaking application</p><ol><li>Monkey/Gorilla Testing</li></ol><p>Testing application without any test case or businees req doc, no knowledge of application</p><ol><li>Positive and negative testing</li></ol><p>Positive testing is Testing the application with valid input, checks if application behaves as per expected with positive input</p><p>Negative testing is testing application with invalid input to test if application behave as expected with negative input</p><ol><li>End to End Testing</li></ol><p>Testing to verify entire flow of application from starting to ending. Including data integration between all the modules</p><ol><li>Globalization Testing- Testing ensure application support multiple language,culture, region without breaking functionality</li><li>Localization- Application adapted to particular language, region and culture</li><li><strong><em>Test Design</em></strong></li></ol><p>Test Design is the process of creating test scenario and test cases based on the requirement to ensure proper validation. Min data and max coverage</p><p>+ Test Scenario — High level idea of what to test</p><ol><li><strong><em>Test Design Techniques (TDT)</em></strong></li></ol><p>Structured approach to Prepare testcases with maximum coverage and minimum effort</p><p>+ Data- less data</p><p>+ Coverage — how much of ur application — logic, input and functionality is the current test cases actually testing</p><p>Equivant Class Partitioning and Border Value Analysis are input domain testing</p><p>Equivalent Cass Partitioning, Border Value Analysis and Decision Table are black box testing test design technique</p><ol><li><strong><em>Equivalence Class Partitioning (ECP)</em></strong>- Divide the input values into classes (valid and invalid group), test with value from each class</li></ol><p>Age input: 18–60 valid</p><p>Test: 25 (valid), 10 (invalid), 70 (invalid)</p><ol><li>Border Value Analysis (BVA)- Test the boundary of input range. Check total 6 inputs, 4 valid and 2 invalid</li></ol><p>Min (pass) max(pass) min+1(pass) max-1(pass) min-1 (fail) max+1(fail)</p><ol><li>Decision Table- Called Cause-Effect Table, Test Design technique to represent combination of condition and their corresponding actions</li><li>Conditions</li><li>Condition Values</li><li>Action</li><li>Rules- comb of conditions</li><li>State Transition- Design technique which verifies how system behaves from one state to another based on the conditions/event</li><li>Error Guessing technique is where tester find bug in sw based on testers prior experience.</li></ol><p>Testers analytics skill and experience</p><p>Ex- Empty form submit</p><ol><li><strong><em>STLC</em></strong></li></ol><p>The sequence of phases followed by the testing team to ensure software quality</p><p>1. Requirement Analysis- Understand the requirements (SRS),</p><p>identify testable requirements,</p><p>O/P is RTM (Requirement Tracibility Matrix)</p><p>2. Test Planning</p><p>Plan Test stratergy, scope, timeline</p><p>O/P is test plan document</p><p>3. Test Case Development</p><p>Write Test case, Test Scenraio, Test Data</p><p>4. Environmental Setup</p><p>Prepare s/w h/w and testing tool</p><p>5. Test Execution</p><p>Run Test case, identify bug, Log Defects</p><p>O/P test report, defect repot</p><p>6. Test Closure</p><p>Evaluate Testing process</p><p>Generate Test Summary report</p><ol><li>TEST PLAN</li></ol><p>Test plan is a formal document that describe test objective, stratergy, resources, scope</p><ol><li>Use Case</li></ol><p>Diagram which describe requirements</p><ol><li>Actors — interacting</li><li>Action</li><li>Goal/Outcome</li><li>Entry and Exit Criteria in Test Plan</li></ol><p>Precondition that must met before testing can be started</p><p>COndition that must be met to conclude testing</p><p>Scope defines what to test and what not to</p><p>Test Scenarios- Positive, Negative, Boundary</p><ol><li>Test Suite, Test Scenario and Test Case</li></ol><p>Test suite is a collection of test cases, aim to test a particular module</p><p>Test Scenario is high level description of what is needed to be tested. It focuses on user actions</p><p>Test Case is detailled set of steps, input and expected result</p><p><strong>Example — BRISK App Login Module:</strong></p><ul><li>TS_001: Verify user can log in with valid credentials</li><li>TS_002: Verify login fails with an incorrect password</li><li>TS_003: Verify login fails when fields are left empty</li><li>TS_004: Verify password field enforces minimum length boundary</li><li>TS_005: Verify account lockout after multiple failed login attempts</li></ul><p>Test Case is the steps to perform a particular functionality, Test Case contains test step, actual result, expected result</p><p><strong>Example — derived from TS_001 (valid login):</strong></p><ul><li>Test Case ID: TC_LOGIN_001</li><li>Scenario: Verify user can log in with valid credentials</li><li>Precondition: User account exists and is active; BRISK app is accessible</li><li>Steps:</li><li>Navigate to BRISK login page</li><li>Enter valid email: <a href="/service/mailto:testuser@brisk.com">testuser@brisk.com</a></li><li>Enter valid password: Test@1234</li><li>Click Login button</li><li>Expected Result: User is redirected to BRISK dashboard; username is displayed in the header</li><li>Status: Pass / Fail</li></ul><p><strong>Test Suite:</strong> Login Module Suite</p><p><strong>Test Scenario:</strong> TS_002 — Verify login fails with an incorrect password</p><p><strong>Test Cases derived from TS_002:</strong></p><ul><li>TC_LOGIN_002A — Login attempt with correct email and wrong password</li><li>TC_LOGIN_002B — Login attempt with wrong email and correct password</li><li>TC_LOGIN_002C — Login attempt with both email and password incorrect</li></ul><ol><li>TEST CASE REPORT</li><li>Test Scenaio ID</li><li>Test Case ID</li><li>Test Case Description</li><li>Prerequisites</li><li>Test Steps</li><li>Expected Result</li><li>Actual Result</li><li>Pass/Fail Status</li><li>Defect Id</li><li>Test Scenario Report</li><li>Module Name</li><li>Test Scenario ID</li><li>Test Scenario Title</li><li>Test Scenario Description</li><li>Requirement ID</li></ol><p>The One-Line Distinction (Interview-Ready)</p><ul><li><strong>Test Suite</strong> — the container that groups related test cases for a module or feature</li><li><strong>Test Scenario</strong> — the high-level “what to test” statement derived from a requirement</li><li><strong>Test Case</strong> — the detailed “how to test” specification with steps and expected result</li><li><strong>Test Data</strong> — the exact input values used to execute a test case</li></ul><p>Requirement Tracability Matrix (RTM)</p><p>Describe the mapping of requirements with test cases.</p><p>Purpose is to ensure all test cases are covered so no functionality is missed during testing</p><p>1. Requirement id</p><p>2. Requirement Description</p><p>3. Test Scenario Id</p><p>4. Test Case Id</p><p>5. Defect Id</p><p>10. Defect Report</p><ol><li>Defect Id</li><li>Defect Description</li><li>Reproducibility</li><li>Steps to reproduce</li><li>Severity</li><li>Priority</li><li>Reported by</li><li>Reported date</li><li>Status</li></ol><p>Test Summary</p><p>It is a summary document generated after test execution</p><ol><li>Test Cases Executed</li><li>No of pass/fail</li><li>Defect Found</li><li>Test Coverage</li><li>Summary of test</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65951c3904ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>