<?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 N Nidhish Karkera on Medium]]></title>
        <description><![CDATA[Stories by N Nidhish Karkera on Medium]]></description>
        <link>https://medium.com/@nnidhishkarkera?source=rss-cced440605e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7TyYLZtGPX8tJGvk</url>
            <title>Stories by N Nidhish Karkera on Medium</title>
            <link>https://medium.com/@nnidhishkarkera?source=rss-cced440605e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 04:36:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nnidhishkarkera/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[Day 1]]></title>
            <link>https://medium.com/@nnidhishkarkera/day-1-85a2acea0f5f?source=rss-cced440605e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/85a2acea0f5f</guid>
            <dc:creator><![CDATA[N Nidhish Karkera]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 04:39:45 GMT</pubDate>
            <atom:updated>2022-10-22T06:23:22.668Z</atom:updated>
            <content:encoded><![CDATA[<h3>Testing Training</h3><p>My first day of my new career in the IT industry.</p><p>In the morning session, Ranjitha thought us, what is software,types of software. Followed by , what is software testing, Quality, etc. I got to learn about SDLC , Spiral , Verification and validation model.</p><p>Software:- A Collection of computer programs that helps us to perform a task.</p><p><strong>Types of softwares: 3 types-</strong></p><ol><li>System s/w :- Device drivers, OS.. It helps to run the system.</li><li>Programming s/w:- compilers, Intepreters.</li><li>Application software:- Web Apps, mobile Apps, desktop Apps.</li></ol><blockquote>webs apps- Anything that we access using URL.</blockquote><blockquote>mobile apps- Instagram, flipkart.</blockquote><blockquote>Desktop- Inbuilt apps of desktop(Notepad, word, snipping tool.)</blockquote><p><strong>Software Testing:- </strong>is a method to check whether the actual software product matches expected requirements and to ensure that software product is<a href="https://www.guru99.com/defect-management-process.html"> Defect </a>free. It involves execution of software/system components using manual or automated tools to evaluate one or more properties of interest. The purpose of software testing is to identify errors, gaps or missing requirements in contrast to actual requirements.</p><p><strong>Software Quality:- How good the project is working. It is based on some of the parameters.</strong></p><p>(i) Bug free. (ii) Delivered on time. (iii) Within Budget. (iv) Meets requirements. (v) Maintainance.</p><p><strong>Project and Product:</strong></p><p>Project:- If s/w is developed based on specific customer requirements.(service based companies)</p><p>Product:- If s/w is developed based on market based requirements.(product based company)</p><p>Why do we need testing?</p><ul><li>To verify and validate if the project/product meets the specified requirements.</li></ul><p><strong>Error-</strong> It is created by human.</p><p><strong>Bug/Defect-</strong> If tester finds that a functionality is not working.</p><p><strong>Failure-</strong> If tester missed to tell the presence of bug, but moved to the end user, and when the end user finds that bug then that is Failure.</p><p>Why software has Bugs?</p><ul><li>Miscommunication or no communication.</li><li>Lack of resources, less time.</li><li>S/W complexity / No Understanding leads to bugs.</li><li>Programming errors.</li><li>Lack of skilled testers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*NJlUVFEXshkK6ClWGAwwSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*1ZNyWBWQLHodQKxKZnA1nA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*GXI4WRSi7mIVF4hlqOJBdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*ISFBI8A4EKR2ucrIP-u5Wg.png" /></figure><p>In the Afternoon , I had my lunch. Then coming back to the session, Ashok continued the training with Automation part. He talked about company, client, end user. What is automation, introduction to selenium. thought us about data types in any programming language. The day ended at 6:00 pm. It was a good day, My first day at testing training.</p><p>-&gt;Company and client.</p><p>-&gt;Automaton- no manual intervention is present.</p><p>-&gt;performance testing :-</p><p>function automation and performance testing.</p><p>-&gt;reasons to move to automation.</p><p>-&gt;Below are the common / basic futures of any programming language:<br>1. Data Types<br>2. Variables<br>3. Operators<br>4. Conditional Statements<br>5. Control Statements (loops)<br>6. Arrays<br>7. Functions / Methods</p><p>1st one is Data types are used to allocate memory and specify what type of data you are using in the<br>program.</p><p>creating new project in java — file, new, project, java, java project, create module.</p><p>Creating a package-:- Right click src in project -&gt; new -&gt;package.</p><p>Creating class-&gt; right click src-&gt;class-&gt;class name-”Class_name”</p><p>Assignment 1:-</p><p>public class Addition {</p><p>public static void main(String[] args) {</p><p>// TODO Auto-generated method stub</p><p>float a= (float) 10.00;</p><p>float b= (float) 5.30;</p><p>float res=a+b;</p><p>double c=5.43333;</p><p>double d=5.4444;</p><p>double res2=c+d;</p><p>System.out.println(“result of two float numbers are “+res);</p><p>System.out.println(“result of two Double numbers are “+res2);</p><p>//System.out.println(c);</p><p>//System.out.println(d);</p><p>}</p><p>}</p><h3>day 2-Static Testing and Dynamic Testing.</h3><p>Static Testing:-</p><p>1.Review</p><p>2.Walkthrough</p><p>3. Inspection.</p><p>Dynamic Testing:-</p><ol><li>Unit Testing</li><li>Integration Testing</li><li>System Testing</li><li>UAT</li></ol><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*tHmiqCSrkhMd2Kr-fGv5bQ.png" /></figure><p>Terminologies in Agile Methodology:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*PC6Rwd6VTxrE_hO0GI1i-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*bcQu3Pf85qKzM8OK4k13xg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*5rO0JFzTWfhpCqfna9yCdw.png" /></figure><p>Software Testing :- Process of verifying and validating the software to check if meets the requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*fFgdxShYhKSApRSKyqZX3Q.png" /></figure><p>Types of software Testing:-</p><p>White Box Testing- Testing performed based on knowledge of the internal program design and code.</p><p>Black Box Testing- Testing performed based on the Requirements/Functionalities and performed by Software Testers.</p><p><strong>Black Box Testing Techniques</strong>: Techniques used while writing test cases in order to have better test case coverage.<br><strong>1. Error Guessing:-</strong> Is a technique in which testers use their skills and try to find bugs.</p><p>Example: Requirement 1: Pin code Field- should be integer field and length =6.</p><p>List down the negative scenarios where it may lead to defect.</p><p>Solution: Requirement 1</p><blockquote> Other than integer if any other alpha characters entered.</blockquote><blockquote> If entered data is less than 6 digits</blockquote><blockquote> If entered data more than 6 digits</blockquote><blockquote> If special characters entered in Pin Code field</blockquote><blockquote> If other characters entered along with integers</blockquote><blockquote> Is space considered?</blockquote><p><strong>2. Boundary Value Analysis: </strong>Boundary testing is the process of testing between extreme ends or boundaries between partitions of<br>the input values.</p><p>Example:- Requirement 3:</p><p>To vote valid age is 18. Divide input need to be provided to different classes and find the boundary<br>values need to tested.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*i_rPQ_wDh45H5xgWCx6E3w.png" /></figure><p>3. Decision Table Technique:- Is a software testing technique used to test system behavior for different input combinations, conditions<br>and rule criteria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*zKSZxsVu98SCVFwe2VtRTQ.png" /></figure><p>4. State Transition Technique:- Is a software testing technique in which input provided causes the change in state changes.</p><p>Example:</p><p>Write state transition diagram for the below scenario (Login amazon).<br>1. If user name and password is correct — user able to login<br>2. If user provided wrong user name / password 1st time — login failed<br>3. If user provided wrong user name / password 2nd time- login failed<br>4. If user provided wrong user name / password 3rd time- Account Locked</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*BmS0yvIAruKZ8i9WfCYFVA.png" /></figure><p>5. Equivalence Partitioning:- Is a technique in which testers divide the input data into equal classes of data through test case<br>can be derived.</p><p>Example: Requirement 2:</p><p>To vote valid age is 18 or more. Divide input need to be provided to different classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*r1xcnk4Os8PeMEl7ZMRn6g.png" /></figure><blockquote>Unit Testing- It is a process of testing a small components of an application individually by developers.</blockquote><blockquote>Integration testing-Testing the communication between the modules by adding the modules incrementally.</blockquote><p>Types of Integration Testing:</p><p>1. Incremental Integration Testing<br>2. Non Incremental Integration Testing</p><p>Different approaches of Incremental Integration Testing:<br>1. Top Down Incremental Integration Testing<br>2. Bottom Up Incremental Integration Testing<br>3. Hybrid/Sandwich Incremental Integration Testing</p><blockquote>System Testing- It is a process of testing end to end functionality against the given requirements.</blockquote><p>System Testing focus on:<br>1. User Interface Testing(GUI)<br>2. Functional Testing<br>3. Non Functional Testing<br>4. Usability Testing</p><blockquote>User Acceptance Testing- Form of testing performed by end user/ customer .</blockquote><p>Levels of UAT:<br>1. Alpha Testing<br>2. Beta Testing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*Ib1P4Xneph1tQAto2fjj6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*7crb1b8JeR_6k0chb4Fliw.png" /></figure><p><strong>Afternoon</strong>: by Ashok</p><p><strong>Conditional statements:</strong> are used to execute set of statements based on the condition<br>satisfaction.<br>1. if<br>2. if else<br>3. else if<br>4. nested if</p><p><strong>Switch</strong>: Unlike if-then and if-then-else statements, the switch statement can have a number of<br>possible execution paths. A switch works with the byte, short, char, and int.</p><p><strong>Control statements (loops)</strong>: are used to execute set of statements as per defined number of<br>times. All the programming languages have below 3 types of loops.</p><p>1. while<br>2. for<br>3. do-while</p><p><strong>Methods / Functions:</strong> Method is a set or group of statements which can be used to repeat<br>any number of times. Methods are written for specific task / purpose. Methods have following:<br>1. Method / Function calling (goes to method definition), if we don’t call function definition will<br>not be executed. We need to call a function with object name dot function name.<br>2. Method / Functions definition (here you write the code for which purpose method is written)<br>Recursive method: A method which is calling itself is known as recursive method.<br>Syntax: return type function_name(parmeters list)<br>{<br>Code<br>}<br>void add()<br>{<br>Code<br>}</p><p>Assignments:-</p><ol><li>Switch:</li></ol><p>public class Switch {</p><p>public static void main(String[] args) {<br> // TODO Auto-generated method stub<br> int day=4;<br> switch(day) {<br> case 1:<br> System.out.println(“Monday”);<br> break;<br> case 2:<br> System.out.println(“tuesday”);<br> break;<br> case 3:<br> System.out.println(“wednesday”);<br> break;<br> case 4:<br> System.out.println(“thursday”);<br> break;<br> case 5:<br> System.out.println(“friday”);<br> break;<br> case 6:<br> System.out.println(“Saturday”);<br> break;<br> default:System.out.println(“Day is not valid”);<br> <br> }}}</p><p>Control Statements:-</p><p>public class Loopss {</p><p>public static void main(String[] args) {</p><p>// TODO Auto-generated method stub</p><p>int i=1;</p><p>while(i&lt;=10);</p><p>{</p><p>System.out.println(“hi”);</p><p>}</p><p>System.out.println(“hi”);</p><p>}</p><p>}</p><p>(day 3 is combined above)</p><p>User Story- General Explanation of software feature in the software users perspective/customers.</p><p>Day 4-</p><p>Morning(Ranjitha)-</p><p>Test Plan-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*kxyAvDCqfp7MopNGbEZGVQ.png" /></figure><p>Afternoon —</p><blockquote><strong>Arrays:</strong> Arrays are nothing but set of similar elements stored in single variable.</blockquote><p>If we take normal variable (int x;) it will take / store only one value at a time and we cannot store more<br>than one value.<br>Let’s say I would like to write a program where I want to store student rule numbers for college in which<br>there are 1000 students available. If I use normal variable I have to declare thousand variables like<br>below:<br>int rolno1=1;<br>int rolno2=2;<br>int rolno3=3<br>And it goes on till<br>int rolno1000=1000;<br>Here you are spending more time in declaring variable rather than writing actual program. So to avoid<br>this we can go for using arrays where you can declare only one array variable and store 1000 values in<br>this variable.<br>Declaration of Arrays:<br>Data type variablename []<br>Example: int rolno[];<br>Allocating Memory for Arrays:<br>int rolno[] = new int[1000];<br>From above line we are declaring rolno variable as an array and we specifying size as 1000<br>which means rolno variable can be used to store 1000 values in one array variable.<br>We are using “new” here new is a key word which basically used to allocate the memory. We<br>will discuss about “new” key word in coming topics in detail.<br>Initializing / assigning the values for Arrays:<br>In above we understand that we have allocated size of array as 1000 and we can story 1000<br>integer values in the variable called rolno.<br>Let’s assign values for array: arrays index always starts with zero<br>rolno[0]=1;<br>rolno[1]=2;<br>rolno[2]=3;<br>rolno[3]=4;<br>And it goes on….. Till<br>rolno[999]=1000;</p><p>Since arrays starts with indexing zero last value will be stored always size — 1 which is 1000–1=<br>999<br>Types of array<br>1. Single dimension array: Example int rolno[] = new int[1000];<br>2. Multi dimension array: Example int x[][]=new int[2][4];</p><p>AGILE-</p><p>product owner →SRS</p><p>Most of the time in agile -no SRS — only user stories.</p><p>product owner writes the user stories. Scrum master assigns 1–2 user stories to each sprint based on the priority of US which is prioritized by the product owner.</p><blockquote>String grooming- Product owner explains us(testers) the user stories.</blockquote><p>Product owner-</p><ol><li>Creation of user stories.</li><li>Giving priority to user stories.</li><li>Grooming user stories.</li><li>signoff of each US.</li></ol><p>Day 5-</p><h3>put jira screen shots of creation of user stories etc.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*MN_TA2eIiodb0HiqoKyh9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*27lnuJ47_5gjiqN_swyu8A.jpeg" /></figure><h3>Day 6-</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kIgE_rd254nbrun47l9kSg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXVxA5Wf4JkfH4vPx94LVQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*wUyOkOj2v9_eEwR4ZuA-jQ.png" /></figure><p><strong>Afternoon</strong>-</p><ul><li>Ashok</li></ul><h3>Add assignment codes here*</h3><p>OOPS: If any programming language that supports below futures then that language is known<br>as OOPS language.<br>1. Class<br>2. Object<br>3. Polymorphism<br>4. Inheritance<br>5. Encapsulation</p><blockquote>1. Class:<br>A class is a group of data members and functions which has common properties.</blockquote><p>Syn: class Class_Name<br>{<br>Data members(variables)<br>Data functions<br>}</p><blockquote>Objects:<br>An entity that has state and behavior is known as an object e.g. chair, bike, marker, pen, table, car etc. It can be physical or logical. Object is an instance of a class. So object is the instance(result) of a class.</blockquote><p>Syn: Class_Name objname = new Class_Name();<br>Ex: Car maruthi = new Car();<br>Car Skoda = new Car();</p><p><strong>Constructors:</strong><br>Constructor is a special type of method which has same name of the class. Constructor is invoked at the time of object creation and no need to call the constructors like functions.<br>Constructors will not return a value not even void also.<br>If there is no constructor in a class, compiler automatically creates a default constructor</p><p>Two rules defined for the constructor.<br> 1. Constructor name must be same as its class name<br> 2. Constructor must have no explicit return type</p><p><strong>Types of constructors:<br></strong>1. Default constructor (no-arguments constructor)<br>2. Parameterized constructor</p><p><strong>Default Constructor:</strong><br>Constructor that have no parameter is known as default constructor.<br>Syntax of default constructor:<br>class_name()<br>{<br>Initilization statements;<br>}</p><p><strong>Parameterized constructor:<br></strong>A constructor that have parameters is known as parameterized constructor.<br>Syntax of Parameterized constructor:<br>class_name(data type variable name, data type variable name)<br>{<br>Initialization statements;<br>}</p><blockquote>Why use parameterized constructor?<br>Parameterized constructor is used to provide different values to the distinct objects.</blockquote><p><strong>Day 7-</strong></p><p>We learnt-</p><ol><li>Adding users to jira project using administration (right top of home page).</li><li>Creating test cases in jira project.</li></ol><p>create-&gt;test&gt;summary&gt;add test case steps(open browser,open link..like that)</p><blockquote><strong>What is Defect Life Cycle?</strong></blockquote><blockquote>Journey in which raised bug will be fixed, retested and closed.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*_mFBFo7tcyKrkIthO7mHmg.png" /></figure><p>Defect States:<br>1) New: This is the first state of a defect in the defect life cycle. When any new defect is found, it falls in a ‘New’ state and validations and testing are performed on this defect in the later stages of the defect life cycle.<br>2) Assigned: In this stage, a newly created defect is assigned to the development team for working on the defect. This is assigned by the project lead or the manager of the testing team to a developer.</p><p>3). Open- Raised defect is considered by developers and ready to fix. <em>Rejected</em>- Raised defect is considered as not a defect.<br><em>Duplicate</em>- Already similar defect is raised.<br><em>Deferred</em>- Developer considered the defect but postponed to fix it in next release.</p><p>4)Fixed- Developers worked on the raised defect and now it is ready to be tested</p><p>5)Closed- Tested by testers and if it is working as expected, defect will be closed</p><p>6)Reopen- Tested by testers and if it is not working as expected, defect will be reopened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*scDJ8cFc1iFueMFDEMz-jw.png" /></figure><p>Learnt About Defect sheet.</p><p><strong>Afternoon-</strong></p><ul><li>Ashok</li></ul><p><strong>Polymorphism:</strong><br>Means many forms. More than one method will have same name.<br>Polymorphism is achieved in two ways<br> 1. Compile time polymorphism<br> 2. Run time polymorphism</p><p><strong>Compile time polymorphism:</strong> is achieved using method overloading and constructor overloading.<br><strong>Method overloading:</strong> If a class have multiple methods by same name but different parameters, it is known as Method Overloading.<br>Suppose you have to perform addition of the given numbers but there can be any number of arguments, if you write the method such as add1(int,int) for two parameters, and add2(int,int,int) for three parameters then it may be difficult for you as well as other programmers to understand the behavior of the method because its name differs. So, we perform method overloading to figure out the program quickly.</p><p>Advantages of method overloading: Method overloading increases the readability of the<br>program<br>Different ways to overload the method<br>1. By changing number of arguments<br>2. By changing the data type</p><p><strong>Constructor Overloading:<br></strong>Constructor overloading is a technique in Java in which a class can have any number of constructors that differ in parameter lists. The compiler differentiates these constructors by taking into account the number of parameters in the list and their type.<br><strong>Run time polymorphism:</strong> is achieved using method overriding and this concept is implemented<br>using inheritance.</p><blockquote>JVM- Java Virtual Machine- calls the main method.</blockquote><p>JVM needs access to call the main method, that’s why public keyword is used with main.</p><h3>Day 8-</h3><p>Morning- Ranjitha</p><p>We wrote Jira test cases and did its review.</p><p>After a break- Test cases- Execution</p><p><strong>Afternoon</strong>- Ashok</p><p>Static key word in java:<br>The static keyword is used in java mainly for memory management. We may apply static keyword with variables, methods, blocks and nested class. The static keyword belongs to the class than instance of the class.</p><ol><li>variable (also known as class variable)<br>2. method (also known as class method)<br>3. block</li></ol><p><strong>Static variable:<br></strong>If you declare any variable as static, it is known static variable.<br>The static variable can be used to refer the common property of all objects (that is not unique for each object) e.g. company name of employees, college name of students etc.<br>The static variable gets memory only once in class area at the time of class loading.<br><strong>Advantage of static variable:<br></strong>It makes your program memory efficient (i.e it saves memory).<br>Suppose there are 500 students in my college, now all inx x xstance data members will get memory each time when object is created. All student have its unique rollno and name so instance data member is good. Here, college refers to the common property of all objects.If we make it static,this field will get memory only once.</p><p><strong>Static method/function:<br></strong>If you apply static keyword with any method, it is known as static method<br>A static method belongs to the class rather than object of a class.<br>A static method can be called without the need for creating an instance(object) of a class.<br>Static methods called by classname. ex classname.methodName();<br>Static method can access only static data member and can change the value of it.<br>Restrictions for static method:<br> The static method cannot use non static data member or call non-static method directly.<br> this and super keywords cannot be used in static context.</p><blockquote><strong>This</strong>” Keyword:- It represents at object level.</blockquote><p>Ex- void init(int empid,int n){</p><p>this.empid=empid;</p><p>this.n=n;</p><p>}</p><p>Here this refers to the object using which the method is called.<br><strong>Static block:<br></strong>Is used to initialize the static data member.<br>It is executed before main method at the time of class loading</p><p>Why main method is static?<br>Because object is not required to call static method if it were non-static method, jvm create<br>object first then call main() method that will lead the problem of extra memory allocation</p><p>Inheritance:<br>Inheritance is a mechanism in which one object acquires all the properties and behaviors of parent object.<br>The idea behind inheritance is that you can create new classes that are built upon existing classes. When you inherit from an existing class, you reuse (or inherit) methods and fields, and you add new methods and fields to adapt your new class to new situations.</p><blockquote>Why use Inheritance?<br> For Method Overriding (So Runtime Polymorphism).<br> For Code Reusability.</blockquote><p>Syntax of Inheritance<br>class Subclass-name extends Superclass-name<br>{<br>//methods and fields<br>}<br>The keyword extends indicates that you are making a new class that derives from an existing<br>class. In the terminology of Java, a class that is inherited is called a superclass. The new class is<br>called a subclass.</p><p><strong>Types of Inheritance<br></strong>1. Single:</p><p>class Father<br>{<br>//methods and fields<br>}<br>class Child extends Father<br>{<br>//methods and fields<br>}<br>2. Multilevel:</p><p>class GrandFather<br>{<br>}<br>class Father extends GrandFather<br>{<br>//methods and fields<br>}<br>class Child extends Father<br>{<br>//methods and fields<br>}</p><p>3. Multiple: Java does not support multiple inheritance directly but we can achieve it using interfaces.<br>4. Hybrid: Combination of two type of inheritance.</p><h3><strong>Day 9:-</strong></h3><p>Morning-Ranjitha- jira</p><p>Jira process explained by Ranjitha:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SbAG-fnRrGSY_bcXikIyKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LvWK_WnI2aFoHSCtGSpuIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZaMg4mz1pyDirSzIRRhfBg.png" /><figcaption>fig(1)Here we create a project in Jira(Company managed). Fig(2) Click on “Backlog” fig(3) creating version.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Crx6ayVTj-EUEzt2GhjjAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPT5aNWHLHlMmxtVH0HwuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BpBf87AvJ_6s_5r9PrlHug.png" /><figcaption>fig(1) Create Epic. Fig(2)creating Epic fig(3) Create issue(story) using create button at the top.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HY-bjNuWNASBc6fXC3EjyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIguOteMpodh98TKZ37Gaw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3EMvNAty3kKOJF-LEwmRkw.png" /><figcaption>fig(1)creating user story. Fig(2) User story is created. fig(3) Click on create sprint.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_a8WOnsEJYcbF3LG1QBbYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifq2AJO7pu-qCHTcPJdI9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjzMeNfSlCKiHdePNU9DZA.png" /><figcaption>fig(1)A Sprint is created. Fig(2) Click on Create button again. fig(3) creating Test cases for the user story.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YxwGtFqNMHSh6XFs2YoVLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4q8X9gO5nLwM9d8HxSqTpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3wnCYYuHiPcdN15_lr-aA.png" /><figcaption>fig(1)Creating test cases for the user story. Fig(2) A test case is created. fig(3) Click on Zephyr squad.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0K-YXzrTvZX3kxunw9s1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6qimT7c3bWAOs_6_RXLQhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JVUrPWF2zxB6ycOy3UyThg.png" /><figcaption>fig(1)Click on create new cycle. Fig(2) Enter as mentioned above. fig(3) This test case should be added to cycle.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i1AP3kM20Nm0DNxo52TyHw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7yto6wwPX2c2hTzu9pd2_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKfgsy-aW3B9-mLdx2v8kg.png" /><figcaption>fig(1)Click on add test on right side. Fig(2) Add the test cases. fig(3) Test cases are added.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opIPZ-8XBdM6dOsXdfoSpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7o12lP20J27t7zkJty0OlA.png" /><figcaption>fig(1)Click on Execute test. Fig(2) choose version etc.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ICnXfLrn4BST-bF1G9q9ZQ.png" /><figcaption>Fig(1). Test execution.</figcaption></figure><p><strong>Afternoon-Ashok</strong></p><p><strong>Function/Method Overriding-</strong></p><p>(Same name and same parameters in super class and sub class method)</p><p><strong>Code-</strong> package javaexamples;</p><p>//Write a program to implement method over riding using super keyword</p><p>class animal2 {</p><p>void fourlegs() {</p><p>System.out.println(“Super class animal”);}</p><p>}</p><p>public class Overriding extends animal2 {</p><p>void fourlegs() {</p><p>super.fourlegs(); //super keyword is used to to call super class object</p><p>System.out.println(“Sub class cat”);</p><p>}</p><p>public static void main(String[] args) {</p><p>// TODO Auto-generated method stub</p><p>Overriding obj= new Overriding();</p><p>obj.fourlegs();</p><p>}</p><p>}</p><p><strong>Abstract class and Abstract methods:-</strong></p><ol><li>A class that contains at least one abstract method is called as Abstract Class.</li><li>2.A abstract method is one which contains no definition or which doesn’t contain any definition.</li><li>An abstract class can contain both abstract method and normal non abstract methods.</li></ol><p><strong>Interfaces:<br></strong>An interface is a blueprint of a class. It has static constants and abstract methods.<br>The interface is a mechanism to achieve fully abstraction in java. There can be only abstract methods in the interface. It is used to achieve fully abstraction and multiple inheritance in Java<br>It cannot be instantiated just like abstract class.</p><blockquote>Why use Interface?<br>•It is used to achieve fully abstraction.<br>•By interface, we can support the functionality of multiple inheritance.</blockquote><p>The java compiler adds public and abstract keywords before the interface method and public, static and final keywords before data members.<br>Multiple inheritance in Java by interface:<br>If a class implements multiple interfaces, or an interface extends multiple interfaces i.e. known as multiple inheritance.</p><blockquote>Note: A class implements interface but One interface extends another interface</blockquote><p>Differences between abstract and interface:-</p><ol><li>Abstract keyword is used But The java compiler adds public and abstract keywords before the interface method and public, static and final keywords before data members.</li><li>Abstract class can contain both abstract and non abstract methods but in interface ,it only includes abstract methods.</li></ol><blockquote><strong>Multiple Inheritance:</strong> Java does not support multiple inheritance directly but we can achieve it using interfaces.</blockquote><p>class A<br>{<br>Void m1()<br>{<br>}<br>}<br>class B<br>{<br>void m2<br>{<br>}<br>}<br>class C extends A,B<br>{<br>void m2()<br>{</p><p>}<br>}</p><h3>Day<strong> 10</strong></h3><ul><li>ranjitha</li></ul><p>jira steps explained again..</p><p>Afternoon-</p><p>push and pull in git:</p><blockquote>To push-</blockquote><blockquote>$git add .</blockquote><blockquote>$git commit -m “Added project to git”</blockquote><blockquote>$git push -u origin master</blockquote><p>Package in Java:<br>A package is a group of similar types of classes, interfaces and sub-packages.<br>Package can be categorized in two form, built-in package and user-defined package. There are<br>many built-in packages such as java, lang, awt, javax, swing, net, io, util, sql etc.</p><p>It is used to use one package in another package.</p><p>syntax- 1.import packagename.*;</p><p>2. import packagename.classname;</p><p>3.using fully qualified name;</p><p><strong>Access Modifiers:<br></strong>The access modifiers specifies accessibility (scope) of a data member (variables), method, constructor or class.<br>There are 4 types of access modifiers:<br>1.<strong>private</strong>- The private access modifier is accessible only within class.<br>2.<strong>default</strong>- If you don’t use any modifier, it is treated as default by default. The default modifier is accessible only within the package.<br>3.<strong>protected</strong>-The protected access modifier is accessible within package and outside the package but through inheritance only.<br>4.<strong>public</strong>- The public access modifier is accessible everywhere. It has the widest scope among all other modifiers.</p><p><strong>Exception Handling:<br></strong>The exception handling is one of the powerful mechanism provided in java. It provides the mechanism to handle the run time errors so that normal flow of the application can be maintained.</p><p>{} are compilation error.</p><p>Example- The syntax will be correct, but when executing throws an error.</p><p>There are mainly two types of exceptions: checked and unchecked where error is considered as unchecked exception.</p><ol><li>Checked Exception- A checked exception is an exception that is typically a user error or a problem that cannot be foreseen by the programmer.</li><li>Unchecked Exception- A runtime exception is an exception that occurs that probably could have been avoided by the programmer.</li><li>Error- These are not exceptions at all, but problems that arise beyond the control of the user or the programmer.</li></ol><p>Common scenarios of Exception Handling where unchecked exceptions may occur:</p><ol><li>int a=50/0;//Arithmetic Exception.</li><li>String s=null;</li></ol><p>System.out.println(s.length());//NullPointerException.</p><p>3. String s=”abc”;</p><p>int i=Integer.parseInt(s);//NumberFormatException</p><p>4. int a[]=new int[5];</p><p>a[10]=50; //ArrayIndexOutOfBoundsException</p><blockquote><strong>Five keywords used in Exception handling:</strong></blockquote><blockquote>1.try</blockquote><blockquote>2.catch</blockquote><blockquote>3.finally</blockquote><blockquote>4.throw</blockquote><blockquote>5.throws</blockquote><p><strong>Syntax of try with catch block</strong></p><p>try</p><p>{</p><p>Enter value for a;</p><p>Enter value for b</p><p>int div=a/b;</p><p>statements;20/0</p><p>}</p><p>catch(ArithmeticException e)</p><p>{</p><p>System.out.println(“Cannot divided by zero please enter value other than zero);</p><p>Enter value for a;</p><p>Enter value for b</p><p>int div=a/b;</p><p>handle exception here;</p><p>}</p><p><strong>Syntax of try with finally block</strong></p><p>try</p><p>{</p><p>statements;</p><p>}</p><p>finally</p><p>{</p><p>handle exception here;</p><p>}</p><p>Rules:</p><ul><li>At a time only one Exception is occurred and at a time only one catch block is executed.</li><li>All catch blocks must be ordered from most specific to most general i.e. catch for ArithmeticException must come before catch for Exception.</li></ul><p><strong>Finally block:</strong></p><p>The finally block is a block that is always executed. It is mainly used to perform some important tasks such as closing connection, stream etc.</p><blockquote>Note:Before terminating the program, JVM executes finally block(if any).</blockquote><blockquote>For each try block there can be more catch blocks, but you can have only one finally block.</blockquote><p><strong>Throw</strong>:</p><p>The throw keyword is used to throw an exception explicitly. The throw keyword is mainly used to throw custom exception.</p><p><strong>Throws keyword:</strong></p><p>The throws keyword is used to declare an exception. It gives an information to the programmer that there may occur an exception so it is better for the programmer to provide the exception handling code so that normal flow can be maintained.</p><p><strong>Syntax of throws keyword:</strong></p><p>void method_name() throws exception_class_name</p><p>{</p><p>statements;</p><p>}</p><p><strong>Day 11:</strong></p><p>Activities in the morning.</p><p>Afternoon session by- Ashok</p><p>What is Selenium?<br>Selenium is an open source automation testing tool for testing only web based applications. It cannot test your desktop application. Selenium supports multiple browsers. It’s easy to use, strong and is very flexible. You can work on many operating systems and you can code in many programming languages using selenium.</p><p>What is Selenium?<br>Selenium is an open source automation testing tool for testing only web based applications. It cannot test your desktop application. Selenium supports multiple browsers. It’s easy to use, strong and is very flexible. You can work on many operating systems and you can code in many programming languages<br>using selenium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*L2WoqG9Sj0_vlaro8PflZg.png" /></figure><ol><li><strong>Selenium IDE:</strong> Is an add on to Mozilla Firefox and Chrome. It’s got a strong feature of record and playback. It supports HTML as source language. It only works on Mozilla Firefox browser.<br><strong>2. Selenium RC: </strong>This is the older version of selenium. It works on multiple browsers. RC can be implemented in any one of the programming languages mentioned above.<br><strong>3. Selenium Web Driver: </strong>Is the new version of selenium. It also works on multiple browsers. Its removed many drawbacks and issues in Selenium RC. It also supports Android and IPhone Testing.<br><strong>4. Selenium Grid:</strong> Grid is used to run test cases parallel on multiple machines and browsers. It is used for Compatibility Testing</li></ol><blockquote>Selenium IDE: Features:<br> Easy record and playback<br> Intelligent field selection will use IDs, names, or XPath as needed<br> Auto complete for all common Selenium commands<br> Debug and set breakpoints<br> Save tests as HTML, Ruby scripts, or any other format<br> Option to automatically assert the title of every page</blockquote><p>Installation of IDE:<br>1. Install Firefox Browser OR Chrome and open Firefox / Chrome browser<br>2. Go to site <a href="https://www.selenium.dev/downloads/">https://www.selenium.dev/downloads/</a><br>3. Click on the link latest or latest version under Selenium IDE<br>4. Click on Install and once installed restart browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*Ckc9u-vDVdNRSlfhCaVNCg.png" /><figcaption>Fig(1) as seen in the website</figcaption></figure><h4>Maven:</h4><p>Maven is a powerful project management tool that is based on POM (project object model). It is used for projects build, dependency and documentation. It simplifies the build process like ANT. But it is too much advanced than ANT.<br>In short terms we can tell maven is a tool that can be used for building and<br>managing any Java-based project. maven make the day-to-day work of Java<br>developers easier and generally help with the comprehension of any Java-<br>based project.</p><p>Maven does a lot of helpful task like<br>1. We can easily build a project using maven.<br>2. We can add jars and other dependencies of the project easily using the<br>help of maven.<br>3. Maven provides project information (log document, dependency list, unit test reports etc.)<br>4. Maven is very helpful for a project while updating central repository of<br>JARs and other dependencies.<br>5. With the help of Maven we can build any number of projects into output<br>types like the JAR, WAR etc without doing any scripting.<br>6. Using maven we can easily integrate our project with source control<br>system (such as Subversion or Git).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDPHv9q8JNpdwpk0gZULnw.png" /><figcaption>Maven project created</figcaption></figure><p><strong>Day 12:</strong></p><p><strong>Morning session </strong>by Ranjitha( Recalled some topic that were covered.).</p><p>Interface will have all abstract methods.</p><p><strong>Afternoon Session:</strong></p><p>Webdriver- An interface, which has methods like, get, findElement etc.</p><p>Every browser in the market has one class which is predefined, that implements webdriver.</p><blockquote>What do you want to do- sendKeys()</blockquote><blockquote>where do you want to do- findElement()</blockquote><p>Example:-package seleniumexamples;</p><p>import org.openqa.selenium.By;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;</p><p>public class OpenBrowser {</p><p>public static void main(String[] args) {<br> // TODO Auto-generated method stub<br> System.setProperty(“webdriver.chrome.driver”,“C:\\nidhish\\chromedriver.exe”);<br> WebDriver driver = new ChromeDriver();<br> driver.get(“<a href="https://www.google.com/">https://www.google.com/</a>&quot;);<br> driver.findElement(By.name(“q”)).sendKeys(“selenium”);<br> }</p><p>}</p><p><strong>Day 13-</strong></p><p><strong>Morning- </strong>Activity by Arun — Cooking</p><p>Ranjitha reviewed team 3 test cases.</p><p><strong>Afternoon session-</strong></p><p>Xpath:</p><ol><li>Selenium users can leverage this powerful language to target elements in their web applications.</li><li>Reasons for using XPath is when I don’t have a suitable id or name attribute for the element I wish to locate. You can use XPath to either locate the element in absolute or relative to an element that does not have an id or name attribute.</li></ol><p>There are two types of xpath:</p><blockquote>Xpath locators be used to specify elements via attributes other than id and name.</blockquote><ol><li><strong>Absolute xpath</strong> Starting from root ex: //Html/body/H1/input.(sometimes it has chances to fail if slightest adjustments to the application.)</li><li><strong>Relative xpath-</strong> if xpath is calculated with <strong>nearest unique value</strong> then it is known as relative x path. ex: xpath=//@frames/id=submit.</li></ol><p>By finding a nearby element with an id or name attribute (ideally a parent element) you can locate your target element based on the relationship. This is much less likely to change and can make your tests more robust.</p><blockquote>Since only xpath locators start with “//”, it is not necessary to include the xpath= label when specifying an XPath locator.</blockquote><p>Syn:</p><p>a. //tagname[@atriburtname=’value’] ex: //input[@type=’Submit’]</p><p>b. //parenttagname[@parentattributevalue=’value’]/childtagname</p><p>c. //form[@id=’login’]/input[1]</p><p>here [1] points to first input field.</p><blockquote>When more than 1 field have same name then use multiple “[ ]”.</blockquote><p>Ex: input[@name= ‘Continue’][@value=’clear’]</p><h4>In java code, to open browser — get() and navigate().to() methods can be used.</h4><p><strong>Difference</strong>-</p><ol><li>get() — doesn’t store history.</li><li>navigate().to(“google.com”) Stores yours browser history, so that we can use navigate().back() , navigate().forward() and navigate().refresh().</li></ol><p>Selecting the drop down values= Select is used.</p><h4>Webelement ele = driver.findElement(By.id(“Dropdown Locator Value”));</h4><h4>Select select = new Select(ele);</h4><ol><li>“Select” is a pre-defined class.</li><li>Methods= selectByVidibleText(“20”); selectByIndex(9);</li></ol><p><strong>Synchronization in Web Driver:</strong></p><p>There are three kinds of waits:</p><ol><li><strong>Implicit Wait</strong> — Used to set the default waiting time throughout the program. not recommended. Not dynamic.</li></ol><p><strong>2. Explicit Wait </strong>— Used to set the waiting time for a particular instance only.(I want to wait explicitly on particular condition.</p><p><strong>3. Fluent Wait </strong>— Used to set the waiting time but it will keep checking for element present in given interval of times. As soon as object found it continue of execution of code.</p><blockquote>Note: We have Thread.sleep() (not recommended bcoz it is static)method which also provides same mechanism but it is not dynamic and your scrip will go sleep for specified time.</blockquote><p><strong>Implicit wait- </strong>Import package import.java.util.concurrent.TimeUnit;</p><p>Inistantiation: driver.manage().timeouts().implicitlywait(10,TimeUnit.SECONDS);</p><p><strong>Explicit wait-</strong> Inistation: WebDriver driver=new FirefoxDriver();</p><p>WebDriverWait myWaiVar=new WebDriverWait(driver,10);</p><blockquote><strong>Let us discuss a few of them at length:</strong></blockquote><blockquote><strong>#1) elementToBeClickable()</strong> — The expected condition waits for an element to be clickable i.e. it should be present/displayed/visible on the screen as well as enabled.</blockquote><blockquote><strong>Sample Code</strong><br> <em>wait.until(ExpectedConditions.elementToBeClickable(By.xpath(“//div[contains(text(),’COMPOSE’)]”)));</em></blockquote><blockquote><strong>#2) textToBePresentInElement() </strong>— The expected condition waits for an element having a certain string pattern.</blockquote><blockquote><strong>Sample Code</strong><br> <em>wait.until(ExpectedConditions.textToBePresentInElement(By.xpath(“//div[@id= ‘forgotPass’”), “text to be found”));</em></blockquote><blockquote><strong>#3) alertIsPresent()-</strong> The expected condition waits for an alert box to appear.</blockquote><blockquote><strong>Sample Code</strong><br> <em>wait.until(ExpectedConditions.alertIsPresent()) !=null);</em></blockquote><blockquote><strong>#4) titleIs()</strong> — The expected condition waits for a page with a specific title.</blockquote><blockquote><strong>Sample Code</strong><br> <em>wait.until(ExpectedConditions.titleIs(“gmail”));</em></blockquote><blockquote><strong>#5) frameToBeAvailableAndSwitchToIt()</strong> — The expected condition waits for a frame to be available and then as soon as the frame is available, the control switches to it automatically.</blockquote><p><strong>Sample Code</strong><br> <em>wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id(“newframe”)));</em></p><p><strong>Fluent wait- </strong>To put it simply, Fluent Wait looks for a web element repeatedly at regular intervals until timeout happens or until the object is found.</p><p>Fluent Wait commands are most useful when interacting with web elements that can take longer durations to load. This is something that often occurs in Ajax applications.</p><p>While using Fluent Wait, it is possible to set a default polling period as needed. The user can configure the wait to ignore any exceptions during the polling period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*eTlfO87PwqTvLQdbLLQZEg.png" /></figure><p><strong>Contains()</strong></p><p>Contains method is used when we know about the partial attribute value or partial text associated with the web element.</p><p><strong>Syntax:</strong></p><p>To find the “Create an account” hyperlink, consider the following variations of contains() method.</p><p><strong>By Text</strong></p><p>– //a[contains(text(),’Create’)]</p><p><strong>By Attribute</strong></p><p>– //a[contains(@id,’signup’)]</p><p><strong>Starts-with()</strong></p><p>starts-with() method is used when we know about the initial partial attribute value or initial partial text associated with the web element.</p><p><strong>Syntax:</strong></p><p>To find the “Create an account” hyperlink, consider the following variations of starts-with() method.</p><p><strong>By Attribute</strong></p><p>– //a[starts-with(@id,’link-si’)]</p><h4>Alert Class:-</h4><p>To handle Alert window.</p><p>Alert alert=driver.switchTo().alert();</p><ol><li>accept():- It is going to click on OK button on the alert window.</li><li>dismiss():- Cancel button.</li><li>getText():- To get message displayed in alert window.</li></ol><h4>Frame class:-</h4><p>used to go into a frame section in web page.(you can know this by right clicking on the webpage page)</p><p>driver.switchTo().Frame(“login_page”) — -HDFC ex: this is.</p><h4>switchTo().defaultContent();</h4><p>to go back to normal after Frame or alert ig.</p><p>Asserts: Assertion determines the state of the application whether it is the same what we are expecting or not. If the assertion fails, then the test case is failed and stops the execution.</p><p>To use the Assertion(Soft Asssertion particularly) in Web Driver, you need to download the Testng jar file and add it to the eclipse.</p><blockquote>How to install TestNg in eclipse — <a href="https://www.guru99.com/install-testng-in-eclipse.html">https://www.guru99.com/install-testng-in-eclipse.html</a></blockquote><blockquote>Import the following, import org.testng.*; and then place your mouse over the import text, there will an option to add testng library.</blockquote><blockquote><strong>There are two types of Assertion:</strong></blockquote><blockquote>Hard Assertion</blockquote><blockquote>Soft Assertion</blockquote><h4>Hard Assertion ( Deprecated)</h4><p>Hard Assertion is an Assertion that throws the <strong>AssertException</strong> when the test case is failed. In the case of Hard Assertion, we can handle the error by using a catch block like a java exception.</p><h4>Soft Assertion ( Recommended)</h4><p>Soft Assert collects errors during Test. Soft Assert does not throw an exception when an assert fails and would continue with the next step after the assert statement.</p><h3>Day 14-</h3><p>new joining, presentation..</p><p>Afternoon- Ashok:</p><p><strong>Table:</strong> Only xpath can be used.</p><p>&lt;table&gt;&lt;tbody&gt;</p><p>&lt;tr&gt;&lt;td&gt;&lt;/td&gt;</p><p>&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;</p><p>&lt;/tbody&gt;&lt;/table&gt;</p><p>xpath= //table/table/tr[1]/td[1]</p><p>(indexing starts from [1]….;</p><p>Example 1 code: package seleniumexamples;<br>//Write HRM Login using XPATH for all the fields<br>import org.openqa.selenium.By;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;</p><p>public class TableExample {</p><p>public static void main(String[] args) {<br> // TODO Auto-generated method stub<br> System.setProperty(“webdriver.chrome.driver”, “C:\\nidhish\\chromedriver.exe”);<br> WebDriver driver = new ChromeDriver();<br> //driver.manage().window().maximize();<br> <br> driver.get(“C://nidhish/WebTable.html”);<br> <br> <br> driver.findElement(By.xpath(“//table//tbody/tr[5]/td[1]/input”)).click();// selects selenium option</p><p>}</p><p>}</p><p>Example 2-for Method overloading in java selenium:- Write a program to implement method overloading using HRM application for searching user details from admin tab<br>search:<br>1. With user name<br>2. With user name &amp; employee name :</p><p>Solution- <a href="https://github.com/nnidhish/Maven1/blob/master/src/test/java/seleniumexamples/SearchInHrmLogin.java">Maven1/SearchInHrmLogin.java at master · nnidhish/Maven1 (github.com)</a></p><h4>Day 15:</h4><p>Morning:- Importing Test Cases in JIRA. by Ranjitha</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2GeOguvBFVqUZUcmGVYVlg.png" /><figcaption>1. Go to Zephyr squad in the bottom left.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gOoX1HtvbjW7JK52h9BXLA.png" /><figcaption>Click on “Import tests”.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0C-Ns3CAp-3sWt24vwp_dQ.png" /><figcaption>Import the Excel sheet</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifE4VrP0Z_TXoGkM1oN4Cw.png" /><figcaption>Enter the values mentioned in the above figure.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNqqG4jCgwmaWs0RGKjDTw.png" /><figcaption>link the column names.(5 links in this case.)</figcaption></figure><p><strong>Afternoon-</strong></p><p>Mouse actions:- driver.switchTo().frame(driver.findElement(By.className(“demo-frame”)));</p><p>Actions mouse=new Actions(driver);<br> mouse.dragAndDropBy(driver.findElement(By.id(“draggable”)),100,100).build().perform();</p><p>Example 1: package pack1;</p><p>import java.util.concurrent.TimeUnit;</p><p>import org.openqa.selenium.By;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;<br>import org.openqa.selenium.interactions.Actions;</p><p>public class MouseActions {</p><p>public static void main(String[] args) throws InterruptedException {<br> // TODO Auto-generated method stub<br> System.setProperty(“webdriver.chrome.driver”, “C:\\Ashok\\chromedriver.exe”);<br> WebDriver driver = new ChromeDriver();</p><p>driver.get(“http://www.jqueryui.com/&quot;);<br> driver.manage().window().maximize();<br> //driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);<br> driver.findElement(By.linkText(“Draggable”)).click();<br> driver.switchTo().frame(driver.findElement(By.className(“demo-frame”)));<br> //Thread.sleep(20000);<br> Actions mouse=new Actions(driver);<br> mouse.dragAndDropBy(driver.findElement(By.id(“draggable”)),100,100).build().perform();<br> Thread.sleep(10000);</p><p>}</p><p>}</p><p>Example 2: package pack1;</p><p>import org.openqa.selenium.By;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;<br>import org.openqa.selenium.interactions.Actions;</p><p>public class MouseOver {</p><p>public static void main(String[] args) throws InterruptedException {<br> // TODO Auto-generated method stub<br> String baseUrl;<br> //driver = new FirefoxDriver();<br> System.setProperty(“webdriver.chrome.driver”, “C:\\Ashok\\chromedriver.exe”);<br> WebDriver driver = new ChromeDriver();</p><p>driver.get(“http://www.aptransport.org/&quot;);<br> // d.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);<br> Actions mouse=new Actions(driver);<br> driver.manage().window().maximize();<br> //Thread.sleep(1000);<br> mouse.moveToElement(driver.findElement(By.linkText(“REGISTRATION”))).build().perform();<br> Thread.sleep(1000);<br> }</p><p><strong>DAY 16:</strong></p><p><strong>Apache POI: </strong>The Apache POI in Selenium is a widely used API for selenium data driven testing. It is a POI library written in Java that gives users an API for manipulating Microsoft documents like <strong>.xls and .xlsx.</strong> Users can easily create, modify and read/write into excel files. POI stands for “Poor Obfuscation Implementation.”</p><p>To Read and Write Excel file in Java, Apache provides a very famous library<br>POI. This library is capable enough to read and write both XLS and XLSX file format of Excel.</p><blockquote>To read XLS files, an <strong>HSSF</strong> implementation is provided by POI library.<br>To read XLSX, <strong>XSSF</strong> implementation of POI library.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*y9wJywjktPlvIhgva2wIyg.png" /></figure><p>Classes and Interfaces in POI:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*Xdc5_oIiiV3Ku2ZbCkrn9w.png" /></figure><p>Following is a list of different Java Interfaces and classes in POI for<br>reading XLS and XLSX file-<br> Workbook: XSSFWorkbook and HSSFWorkbook classes implement<br>this interface.<br> <strong>XSSFWorkbook</strong>: Is a class representation of XLSX file.<br> <strong>HSSFWorkbook</strong>: Is a class representation of XLS file.<br> <strong>Sheet</strong>: XSSFSheet and HSSFSheet classes implement this interface.<br> <strong>XSSFSheet</strong>: Is a class representing a sheet in an XLSX file.<br> <strong>HSSFSheet</strong>: Is a class representing a sheet in an XLS file.<br> <strong>Row</strong>: XSSFRow and HSSFRow classes implement this interface.<br> <strong>XSSFRow</strong>: Is a class representing a row in the sheet of XLSX file.<br> <strong>HSSFRow</strong>: Is a class representing a row in the sheet of XLS file.<br> <strong>Cell</strong>: XSSFCell and HSSFCell classes implement this interface.<br> <strong>XSSFCell</strong>: Is a class representing a cell in a row of XLSX file.<br> <strong>HSSFCell</strong>: Is a class representing a cell in a row of XLS file.</p><p><strong>Some of the features:</strong><br>1. JXL is able to read Excel file in Selenium for 95, 97, 2000, XP, 2003<br>workbook.<br> 2.We can work with English, French, Spanish, German.<br> 3.Copying a Chart and image insertion in Excel is possible<br><strong>Drawback</strong>:<br>1. We can write Excel 97 and later only (writing in Excel 95 is not<br>supported).<br>2. JXL does not support XLSX format of excel file.<br>3. It Generates spreadsheet in Excel 2000 format.</p><p>Files-</p><p>Example for read data from excel and login to OrangeHRM:</p><p>String filePath=”//C://Users//karkenni//Downloads”;</p><p>String fileName=”cred.xlsx”;</p><p>String sheetName=”Sheet1&quot;;</p><p>File file = new File(filePath+”\\”+fileName);</p><p>FileInputStream inputStream = new FileInputStream(file);</p><p>Workbook workBook = null;</p><p>String fileExtensionName = fileName.substring(fileName.indexOf(“.”));</p><p>if(fileExtensionName.equals(“.xlsx”)){</p><p>workBook = new XSSFWorkbook(inputStream);</p><p>}</p><p>else if(fileExtensionName.equals(“.xls”)){</p><p>workBook = new XSSFWorkbook(inputStream);</p><p>}</p><p>Sheet sheet = workBook.getSheet(sheetName);</p><p>int rowCount = sheet.getLastRowNum()-sheet.getFirstRowNum();</p><p>System.out.println(“Row count “ +rowCount);</p><p>Row row = sheet.getRow(0);</p><p>driver.findElement(By.xpath(“//input[@type=’text’]”)).sendKeys(row.getCell(0).getStringCellValue());</p><p>driver.findElement(By.xpath(“//input[@type=’password’]”)).sendKeys(row.getCell(1).getStringCellValue());</p><p>driver.findElement(By.xpath(“//button[@value=’1&#39;]”)).click();</p><p>GitHub Link for the above program- <a href="https://github.com/nnidhish/Maven1/blob/master/src/test/java/seleniumexamples/ReadDataFromExcel.java">Maven1/ReadDataFromExcel.java at master · nnidhish/Maven1 (github.com)</a></p><p>Screenshot in Java automation:</p><p>File screenshot= getScreenshotAs(outputType.FILE);</p><p>try{ FileUtils.copyFile(screenshot,new File(“//C:);}</p><p>catch{}</p><p>Importing Maven project in Eclipse:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*-4NYBckxdiIiUmaZKfMB3Q.png" /><figcaption>Click on import</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*C4sF5w4hHZBoJzGDS4AHwA.png" /><figcaption>Select as shown above.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*ENd4i1qmcRqQUpbI7Z1WOw.png" /><figcaption>Add the location where you have saved the project and click on finish.</figcaption></figure><h4>Day 17:</h4><p>Cucumber:- BDD( Behavior Driven Development).</p><p>Cucumber:<br>Cucumber is a testing framework which supports Behaviour Driven Development (BDD). It lets us define application behaviour in plain meaningful English text using a simple grammar defined by a language called Gherkin. Cucumber itself is written in Ruby, but it can be used<br>to “test” code written in Ruby or other languages including but not limited to Java, C# and Python.<br><strong>Behavior Driven Development</strong><br> Tests are written in plain descriptive English type grammar<br> Tests are explained as behavior of application and are more user-focused<br> Using examples to clarify requirements.</p><p>Steps: <a href="https://drive.google.com/file/d/1jjqaOGIoBVSdaluLPc5bilihnKxCGmkH/view?usp=drive_web&amp;authuser=0">https://drive.google.com/file/d/1jjqaOGIoBVSdaluLPc5bilihnKxCGmkH/view?usp=drive_web&amp;authuser=0</a></p><ol><li>Right click on your project in Eclipse and create new folder with name as Features</li><li>2. Right click on Features folder and create new file with name sprint1.feature</li><li>add the below code in sprint1.feature file.</li></ol><blockquote>Feature: HRM Login Test Case</blockquote><blockquote>Scenario: Verify user is able to login with valid user id and</blockquote><blockquote>password</blockquote><blockquote><strong>Given</strong> browser is open and application is in login page</blockquote><blockquote><strong>When</strong> user enters user name and password</blockquote><blockquote><strong>Then</strong> home page is displayed</blockquote><p>Create a new package called “stepdefinations” under src/test/java in eclipse Create new class in above package and add the below code in the class.<br>Open feature file and run this file to execute your code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*2-PMnOnQ_h1znC5AW12kvA.png" /></figure><p>java code:- <a href="https://github.com/nnidhish/Maven1/blob/master/src/test/java/stepdefinations/Cucumber1.java">Maven1/Cucumber1.java at master · nnidhish/Maven1 (github.com)</a></p><p>feature file:- <a href="https://github.com/nnidhish/Maven1/blob/master/Features/sprint1.feature">Maven1/sprint1.feature at master · nnidhish/Maven1 (github.com)</a></p><h4>Day 18:-</h4><p>Morning test case discussion.</p><p>Afternoon-</p><p>Collections: Collections in java is a framework that provides an architecture to store and manipulate the group of objects.</p><p>All the operations that you perform on a data such as searching, sorting, insertion, manipulation, deletion etc. can be performed by Java Collections.</p><p>Java Collection simply means a single unit of objects. Java Collection framework provides many<br>interfaces (Set, List, Queue, Deque etc.) and classes (ArrayList, Vector, LinkedList, PriorityQueue,<br>HashSet, LinkedHashSet, TreeSet etc).</p><blockquote>Framework-&gt; Ready made architecture.</blockquote><h4>Let us see the hierarchy of collection framework.The java.util package contains all the classes and Interfaces for Collection <strong>framework</strong>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kdpa6ZxLXSzrBrbwbM0Etg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*F9FUPeyJ4wXXMPEMSisJjg.png" /></figure><p>ArrayList :- Dynamic memory alloction. can contain different types of datatype variables.</p><p>Array List example code- <a href="https://github.com/nnidhish/Maven1/blob/master/src/test/java/collections/ArrayListExample.java">Maven1/ArrayListExample.java at master · nnidhish/Maven1 (github.com)</a></p><p>Linked List example code- <a href="https://github.com/nnidhish/Maven1/blob/master/src/test/java/collections/LinekdList.java">Maven1/LinekdList.java at master · nnidhish/Maven1 (github.com)</a></p><p>Vectors example code- <a href="https://github.com/nnidhish/Maven1/blob/master/src/test/java/collections/VectorExample.java">Maven1/VectorExample.java at master · nnidhish/Maven1 (github.com)</a></p><p><strong>TestNG</strong>-</p><p>TestNG is an open source automated testing framework; where NG of TestNG means Next Generation. TestNG is similar to JUnit, but its not a JUnit extension. Its inspired by JUnit. It is designed to be better than JUnit, especially when testing integrated classes.</p><p><strong>Annotations-</strong></p><pre><strong>@Test(priority=0): Highest priority, executes first.</strong></pre><pre><strong>@Test(priority=1): low priority, higher the number lower the priority.</strong></pre><pre>What are the benefits of using annotations?<br><br>Following are some of the benefits of using annotations:<br><br>    TestNG identifies the methods it is interested in by looking up annotations. Hence, method names are not restricted to any pattern or format.<br><br>    We can pass additional parameters to annotations.<br><br>    Annotations are strongly typed, so the compiler will flag any mistakes right away.<br><br>    Test classes no longer need to extend anything</pre><pre>@BeforeSuite: The annotated method will run before all tests in this suite have.<br>@AfterSuite: The annotated method will run after all tests in this suite have.<br>@BeforeTest: The annotated method will run before any test method belonging to the classes inside the &lt;test&gt; tag is run.<br>@AfterTest: The annotated method will run after all the test methods belonging to the classes inside the &lt;test&gt; tag have run.<br>@BeforeGroups: The list of groups that this configuration method will run before. This method is guaranteed to run shortly before the first test method that belongs to any of these groups is invoked.<br>@AfterGroups: The list of groups that this configuration method will run after. This method is guaranteed to run shortly after the last test method that belongs to any of these groups is invoked.<br>@BeforeClass: The annotated method will run before the first test method in the current class is invoked.<br>@AfterClass: The annotated method will be run after all the test methods in the current class have been run.<br>@BeforeMethod: The annotated method will be run before each test method.<br>@AfterMethod: The annotated method will be run after each test method. <br><strong>@Test</strong>: This we need to use for test cases<br>@DataProvider:	Marks a method as supplying data for a test method. The annotated method must return an Object[][] where each Object[] can be assigned the parameter list of the test method. The @Test method that wants to receive data from this DataProvider needs to use a dataProvider name equals to the name of this annotation.</pre><pre>import org.testng.annotations.Test;<br>import org.testng.annotations.BeforeMethod;<br>import org.testng.annotations.AfterMethod;<br>import org.testng.annotations.BeforeClass;<br>import org.testng.annotations.AfterClass;<br>import org.testng.annotations.BeforeTest;<br>import org.testng.annotations.AfterTest;<br>import org.testng.annotations.BeforeSuite;<br>import org.testng.annotations.AfterSuite;<br> <br>public class TestNGExampleTest {<br> <br>@Test<br>       public void testCase1() {<br>              System.out.println(&quot;in test case 1&quot;);<br>       }<br> <br>       // test case 2<br>       @Test<br>       public void testCase2() {<br>              System.out.println(&quot;in test case 2&quot;);<br>       }<br> <br>       @BeforeMethod<br>       public void beforeMethod() {<br>              System.out.println(&quot;in beforeMethod&quot;);<br>       }<br> <br>       @AfterMethod<br>       public void afterMethod() {<br>              System.out.println(&quot;in afterMethod&quot;);<br>       }<br> <br>       @BeforeClass<br>       public void beforeClass() {<br>              System.out.println(&quot;in beforeClass&quot;);<br>       }<br> <br>       @AfterClass<br>       public void afterClass() {<br>              System.out.println(&quot;in afterClass&quot;);<br>       }<br> <br>       @BeforeTest<br>       public void beforeTest() {<br>              System.out.println(&quot;in beforeTest&quot;);<br>       }<br> <br>       @AfterTest<br>       public void afterTest() {<br>              System.out.println(&quot;in afterTest&quot;);<br>       }<br> <br>       @BeforeSuite<br>       public void beforeSuite() {<br>              System.out.println(&quot;in beforeSuite&quot;);<br>       }<br> <br>       @AfterSuite<br>       public void afterSuite() {<br>              System.out.println(&quot;in afterSuite&quot;);<br>       }<br>}</pre><p><strong>TestNG Parallel Execution:<br></strong>It means that if you want to execute test cases Parallel then we can go for using this option. TestNG provides this option and saves time as test cases are executing Parallel.It is manily used to save time and for compatibility testing<br> <br>Threads in TestNG: By default in TestNG it will have 5 threads and will be used for upto 5 methods. But if you have more methods you need to mention thread count in testng.xml file.</p><pre>Running test cases using groups in testng.xml file<br>&lt;?xml version = &quot;1.0&quot; encoding = &quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE suite SYSTEM &quot;http://testng.org/testng-1.0.dtd&quot; &gt;<br><br>&lt;suite name = &quot;Suite1&quot;&gt;<br>   &lt;test name = &quot;test1&quot;&gt;<br><br>      &lt;groups&gt;<br>         &lt;run&gt;<br>            &lt;include name = &quot;functest&quot; /&gt;<br>         &lt;/run&gt;<br>      &lt;/groups&gt;<br><br>      &lt;classes&gt;<br>         &lt;class name = &quot;GroupTestExample&quot; /&gt;<br>      &lt;/classes&gt;<br><br>   &lt;/test&gt;<br>&lt;/suite&gt;</pre><h4>Day 19</h4><p>Afternoon- ashok</p><p>CSS (Cascading Style Sheets) is a language for describing the rendering of HTML and XML documents. CSS uses Selectors for binding style properties to elements in the document. These Selectors can be used by Selenium as another locating strategy.CSS Selectors in Selenium are string patterns used to identify an element based on a combination of HTML tag, id, class, and attributes.</p><p>CSS Selectors in Selenium are string patterns used to identify an element based on a combination of HTML tag, id, class, and attributes. Locating by CSS Selectors in Selenium is more complicated than the previous methods, but it is the most common locating strategy of advanced Selenium users because it can access even those elements that have no ID or name.</p><p>CSS Selectors in Selenium have many formats, but we will only focus on the most common ones. The different types of CSS Locator in Selenium IDE</p><ul><li>Tag and ID</li><li>Tag and class</li><li>Tag and attribute</li><li>Tag, class, and attribute</li></ul><ol><li>Tag and ID<br>Syntax: tagname#id<br>Example: input#email</li></ol><ul><li>tag = the HTML tag of the element being accessed</li><li># = the hash sign. This should always be present when using a Selenium CSS Selector with ID</li><li>id = the ID of the element being accessed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CbGci92d-RCw3q-TffeVDw.png" /></figure><p>2. Tag and class<br>Syntax: tag.classname<br>Example: CSS selector: input. Inputtext._55r1._6luy<br>Xpath: //input[<a href="http://twitter.com/class">@class</a>=”inputtext _55r1 _6luy”]</p><ul><li>. = the dot sign. This should always be present when using a CSS Selector with class</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*luCIF9M9gm86IL_fVfKhmw.png" /></figure><p>3. Tag and attribute<br>Syntax: tagname[attributename=’value’]<br>Example: CSS Selector: input[name=’email’]<br>Xpath: //input[<a href="http://twitter.com/name">@name</a>=’email’]</p><ul><li>[ and ] = square brackets within which a specific attribute and its corresponding value will be placed</li><li>attribute = the attribute to be used. It is advisable to use an attribute that is unique to the element such as a name or ID.</li><li>value = the corresponding value of the chosen attribute.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMyqW7rLuFVi-cwiJgztyw.png" /></figure><p>4. tag, class, and attribute<br>Syntax: tagname.class[attribute=’value’]<br>Example: 1) input.inputtext[id=’email’]<br>2) input.inputtext[id=’pass’]</p><ul><li>tag = the HTML tag of the element being accessed</li><li>. = the dot sign. This should always be present when using a CSS Selector with class</li><li>class = the class of the element being accessed</li><li>[ and ] = square brackets within which a specific attribute and its corresponding value will be placed</li><li>attribute = the attribute to be used. It is advisable to use an attribute that is unique to the element such as a name or ID.</li><li>value = the corresponding value of the chosen attribute.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yn6LVykOaVo16oHsz0LvBw.png" /></figure><p>package seleniumexamples;<br>//Update HRM login test case using CSS selector</p><p>import org.openqa.selenium.By;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;</p><p>public class HrmLoginUsingCssSelector {</p><p>public static void main(String[] args) {<br> // TODO Auto-generated method stub<br> System.setProperty(“webdriver.chrome.driver”, “C:\\nidhish\\chromedriver.exe”);<br> WebDriver driver = new ChromeDriver();<br> driver.manage().window().maximize();<br> <br> driver.get(“<a href="https://opensource-demo.orangehrmlive.com/web/index.php/auth/login">https://opensource-demo.orangehrmlive.com/web/index.php/auth/login</a>&quot;);<br> try {<br> Thread.sleep(1000);<br> }<br> catch(Exception e) {}<br> <br> driver.findElement(By.cssSelector(“input[name=’username’]”)).sendKeys(“Admin”); //CSS selectors <br> driver.findElement(By.cssSelector(“input[name=’password’]”)).sendKeys(“admin123”);//CSS selector <br> try {<br> Thread.sleep(1000);<br> }<br> catch(Exception e) {}<br> driver.findElement(By.cssSelector(“button.oxd-button.oxd-button — medium.oxd-button — main.orangehrm-login-button”)).click();//CSS selector</p><p>}</p><p>}</p><p>Data driven testing:</p><p>DataProvider(name=”mytest”) here we can have many test data ,in the form of array. Ashok gave an example of Wikipedia where</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*FI8d6yRPLsQOdMx_ve45UA.png" /></figure><pre>ASHOKS CODE:<br>package testng;import java.util.concurrent.TimeUnit;<br>import org.openqa.selenium.By;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;<br>import org.testng.Assert;<br>import org.testng.annotations.AfterMethod;<br>import org.testng.annotations.BeforeMethod;<br>import org.testng.annotations.DataProvider;<br>import org.testng.annotations.Test;public class DataProviderExample {private WebDriver driver;<br>   //private String baseUrl;<br>   <br>   @DataProvider(name = &quot;myTest&quot;)<br>   public Object[][] createData1() {<br>           return new Object[][] {<br>             { &quot;India&quot;},<br>             { &quot;Brazil&quot;},<br>             { &quot;Canada&quot;},<br>             { &quot;Sri Lanka&quot;},<br>             { &quot;England&quot;},<br>             { &quot;United Kingdom&quot;},<br>             { &quot;United States&quot;},           <br>           };<br>   }<br>   <br>   @BeforeMethod<br>   public void setUp() throws Exception {<br>     //driver = new FirefoxDriver();<br>     //baseUrl = &quot;http://www.wikipedia.org/&quot;;<br>     <br>   }<br>  <br>   @Test(dataProvider = &quot;myTest&quot;)<br>   public void testSearchCountry(String country) throws Exception {<br>  <br>  System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;C:\\Ashok\\chromedriver.exe&quot;);<br>  driver = new ChromeDriver();<br>     driver.get(&quot;http://www.wikipedia.org/wiki/Main_Page&quot;);<br>     driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);<br>     driver.findElement(By.id(&quot;searchInput&quot;)).clear();<br>     driver.findElement(By.id(&quot;searchInput&quot;)).sendKeys(country);<br>     driver.findElement(By.id(&quot;searchButton&quot;)).click();<br>     Thread.sleep(1000);<br>     String actualResult = driver.findElement(By.id(&quot;firstHeading&quot;)).getText();<br>     System.out.println(&quot;Actual result Value is : &quot;+actualResult);<br>     Assert.assertTrue(country.equals(actualResult.trim()));<br>   }<br>  <br>  @AfterMethod<br>   public void tearDown() throws Exception {<br>     driver.quit();   <br>}<br>}</pre><p><strong>Testng.xml: A common xml document which can be used to execute multiple test cases from different classes.</strong></p><p>&lt;?xml version=”1.0&quot; encoding=”UTF-8&quot;?&gt;<br>&lt;!DOCTYPE suite SYSTEM “<a href="http://testng.org/testng-1.0.dtd">http://testng.org/testng-1.0.dtd</a>&quot;&gt;<br>&lt;suite name=”Suite”&gt;<br>&lt;test name=”Test”&gt;<br>&lt;classes&gt;<br>&lt;class name=”testngexamples.TestNGExampleTest”/&gt;<br>&lt;class name=”testngexamples.TestNgExample2&quot;/&gt;<br>&lt;class name=”seleniumexamples.NewHrmLogin”/&gt;</p><p>&lt;/classes&gt;<br>&lt;/test&gt; &lt;! — Test →<br>&lt;/suite&gt; &lt;! — Suite →</p><h4>Day 20</h4><p>Morning :I did a presentation on mouse actions in selenium webdriver.</p><p>Afternoon:</p><p><strong>White paper by Nidhish Karkera: Xpath Sibling:</strong></p><p>Xpath Sibling is defined as a function for retrieving a web element. A Sibling in Selenium Webdriver is a function used to fetch a web element which are sibling with same parent element or the element on the same level. If the parent element is known, then the web element can be easily found or located that can use the sibling attribute of the Xpath expression in selenium webdriver.</p><p>There are two types of Xpath Siblings:</p><p>1. Following-sibling</p><p>2. Preceding-sibling</p><h4>1. following-sibling</h4><p>The Xpath sibling axis is similar to the axis that comes after it. Only sibling nodes, i.e. nodes on the same level as the current node, are recognised by following-sibling. We can make use of this when the class names are same .</p><p>//node [attribute=’value of attribute’]//following-sibling:attribute</p><h4>2. preceding-sibling</h4><p>What is preceding sibling in XPath?</p><p>The preceding-sibling axis indicates all the nodes that have the same parent as the context node and appear before the context node in the source document.</p><p>//node [attribute=’value of attribute’]//preceding-sibling:attribute</p><h4><strong>Frameworks: prevents code duplicity.</strong></h4><ol><li><strong>Data Driven:</strong> here we put test data in Excel / CSV file and read data from this file and put it into your application.</li></ol><p><strong>2. Keyword Driven:</strong> Here we use Excel and in this file we use keyword and every keyword will have a function. Based on your keyword that particular function will executed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*vXLABN4fqcZfhSFbOVxt6A.png" /></figure><p><strong>3. Page Object Model(POM):Page Object Model</strong> or POM is a design pattern or a framework that we use in Selenium using which one can create an object repository of the different web elements across the application. To simplify, in the Page Object Model framework, we create a class file for each web page. This class file consists of different web elements present on the web page. Moreover, the test scripts then use these elements to perform different actions. Since each page’s web elements are in a separate class file, the code becomes easy to maintain and reduces code duplicity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*DwcP_8WVVyn7AjLAkROSiw.png" /></figure><p>As you can see, we create different classes for the multiple pages and then save the web elements on the pages in them. Correspondingly, we save the test cases under a different package, making clear segregation among the different aspects.<br><strong>4. Hybrid : </strong>(whenever we implement more than one framework then we call it as a Hybrid<br>framework)</p><p><strong>How to implement the Page Object Model in Selenium?</strong></p><p>Our Page Object<br>Model project structure would look like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*gBM09jqWgEjQuEpvZyUs5A.png" /></figure><p>Framework architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*WDF48wj4dCy8Y_npXzWt6A.png" /><figcaption>links will be at the end of this blog: refer: hrm project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*1cF44hMsayWankR0-QFFbw.png" /><figcaption>Page Factory</figcaption></figure><p><strong>Page Factory</strong></p><p>Page Factory is <strong>a class provided by Selenium WebDriver to support Page Object Design patterns</strong>. In Page Factory, testers use @FindBy annotation. The initElements method is used to initialize web elements. @FindBy: An annotation used in Page Factory to locate and declare web elements using different locators</p><p><strong>Jenkins:- CICD: Continuation Integration Continuation Deploayment.</strong></p><p>Jenkins is an open-source automation tool written in Java with plugins built for Continuous Integration purposes. Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.</p><h4><strong>Day 21:</strong></h4><p>Morning- Umesh:</p><p><strong>Non Functional Testing:-</strong> is defined as a type of Software testing to check non-functional aspects (performance, usability, reliability, etc ) of a software application. It is designed to test the readiness of a system as per nonfunctional parameters which are never addressed by functional testing. Testing is done without executing the code.</p><p>5 types of performance testing:</p><ol><li><strong><em>Load testing-</em></strong><em> Testing the application performance upto the limit.(how many users can access a site at a time, 400,600,800,1000 loads)</em></li><li><strong><em>Stress Testing-</em></strong><em> Testing the app. performance beyond the limit, by gradually increasing the load beyond the limit,400,800,1000,1200,1400 loads</em></li><li><strong><em>Spike Testing-</em></strong><em> Testing the performance with sudden spikes in load.(100,1000 load.)</em></li><li><strong><em>Endurance Testing- </em></strong><em>How long/time duration the application can endure the load/stress. this is done to make sure the software can handle the expected load for a long period of time.</em></li><li><strong><em>Volume Testing- </em></strong><em>How many data the application can handle, this is done by increasing the no. of data for a user and testing the performance.</em></li></ol><h4>JMeter:- Performance testing tool to manually set the number of users.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*q-wmRourmMQjsKE65n73jQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8JQMDrmJZ0DLML29YVP7Q.jpeg" /><figcaption>How to open JMeter tool.</figcaption></figure><p>JMeter is an Open Source testing software. It is 100% pure Java application for load and performance testing. It is designed to cover various categories of tests such as load testing, functional testing, performance testing, regression testing, etc., and it requires JDK 5 or higher.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oU9NWHumAjoZnCT9K3nybw.png" /></figure><p>step 1- Test plan&gt;name=OrangeHRM</p><p>&gt;comments=this is hr management app.</p><p>&gt;save-</p><p><strong>Adding Thread:</strong>&gt; right click on project name&gt;Threads&gt;Thread group</p><ul><li>&gt;Name=”thread group_1&gt;no. of threads(users):5 -&gt;Ramp-up period(seconds):2(time b/w the users to users)</li><li>&gt;loops:2</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_LLDPXhWkRyeLBkTB3AgpA.png" /></figure><p><strong>Adding sampler: </strong>Now right click on Thread</p><ul><li>&gt;sampler(the form of request,like https,based on project requirements.Samplers tell jmeter to send request to server and wait for Reply.)</li><li>-&gt;HTTP request-&gt;name:Login_page</li><li>-&gt;comments:this is the login page with admin login.,</li><li>now in this page-&gt;under Basic-&gt;paste the website link-&gt;remove https:// and “www” -&gt; cut /index..etc and paste it in path field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emz6QZzQnMVBFru-oQmKAg.png" /></figure><p><strong>Adding Listener-</strong></p><p>Right click on Thread-&gt;add-&gt;Listener-&gt; View result tree and View result table-&gt;Aggregate report.</p><ul><li>&gt;Run</li></ul><p>Look for the results in “view results table”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7JiOPa_jn63TZek2R9t-tw.png" /></figure><p><strong>Constant timer- Time to take to start a http request in a loop.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G89aUUcD9vm07ongJNCvyQ.png" /></figure><p><strong>Assertions: comparing expected &lt;-&gt; actual result.</strong></p><ul><li>&gt;Right click on Thread-&gt;add-&gt;Assertions-&gt;Response Assertion.</li><li>-&gt;Name-validate-&gt;contains-&gt;Response code-&gt;add 200( check the view result table for the response code values).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cP7MTkBgoUg1ZhK0MOG8ew.png" /></figure><p><strong>Controllers: Right click on Thread-&gt;add&gt;login controller&gt;loop etc.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eVA44mQtMy-myrZXBaiazw.jpeg" /></figure><ol><li><strong>Loop Controllers:</strong> Number of times a sampler/case must execute per loop of thread.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Ez5O5IdsUbUQv_cqaKSyw.png" /></figure><p><strong>2. Random Controllers:-</strong> Sampler under this will be choosen randomly per loop of Thread.(admin login, employer login example by umesh.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B_Ax-vXF4Dyd9dhTBWZFgg.jpeg" /><figcaption>Random choosing</figcaption></figure><p><strong>3. Recording Controllers:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qW5tj0mOS1tcakwY9KgNwQ.jpeg" /></figure><p><strong>4. Throughput Controllers:</strong> To divide the number of users per sampler using percentage.</p><blockquote>click on project -&gt;add-&gt; url | orangehrm.com</blockquote><blockquote>this can be access easily in any sampler ip address field by simply writing ${url}</blockquote><h4>Day 22:</h4><p>Morning- arun:</p><p>ETVX model:</p><p>Entry:-</p><p>Task:</p><p>Validation:</p><p>Exit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*JYEJpk-OdR6hk5TxZH0hag.png" /></figure><p>Conclusion- The testing training was very informative. The campus to corporate transition was smooth overall and I look forward to work with people having different mindset, different Ideas, who come together with one common goal in mind i.e., Growing.</p><p><a href="https://github.com/nnidhish/testing"><strong>nnidhish/testing (github.com)</strong></a><strong> — </strong>Includes basics of program and java examples.</p><p><a href="https://github.com/nnidhish/Maven1"><strong>nnidhish/Maven1 (github.com)</strong></a><strong>- </strong>Includes selenium examples, collections, step definations (cucumber program with feature file.) and testNg examples.</p><p><a href="https://github.com/nnidhish/hrmproject">nnidhish/hrmproject: The codes of zip file ,provided by Ashok, which we imported into our eclipse during automation testing training. (github.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85a2acea0f5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first day of DLithe Testing training]]></title>
            <link>https://medium.com/@nnidhishkarkera/my-first-day-of-dlithe-testing-training-8516daf7ae79?source=rss-cced440605e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8516daf7ae79</guid>
            <dc:creator><![CDATA[N Nidhish Karkera]]></dc:creator>
            <pubDate>Tue, 06 Sep 2022 05:47:13 GMT</pubDate>
            <atom:updated>2022-09-06T05:47:13.116Z</atom:updated>
            <content:encoded><![CDATA[<p>Mr. Arun welcomed me to the online training session. Vishisht and Tasmiya gave me a recap of what ws thought to them till now(testing/medium/jira software cloud)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8516daf7ae79" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>