Showing posts with label Best Training Syllabus for Selenium. Show all posts
Showing posts with label Best Training Syllabus for Selenium. Show all posts

Monday, April 20, 2020

TestNG Tutorial Advanced Topics - Part 4

TestNG Parameters are the arguments that we pass to the test methods. 

Parameterisation is always helpful in any application to store the key values into the file and call it whenever required across the application, there are two ways through which we can pass the parameters to the test methods:


  • TestNG Parameters
  • TestNG DataProviders


In this topic, we will learn about the TestNG Parameters. We will learn about the parameterisation in the xml file.

Suppose we want to set the global variables such url settings, username, password or API Keys, there are some values which are constant in all the test cases, in such case we use the TestNG Parameters.

1> TestNG @Parameters – test parameters with testng.xml

You already know about testng.xml File. If not then Click Here.

Now, we need to store username and password in testng.xml file and need to pass it to class called 'Parameterized_Keyword'.

So we have added two parameter tags here in testng.xml.




Now, Below way we can call these two parameters using @Parameters annotation in Parameterized_Keyword.Java class.





Note: testng.xml parameter name should match with name we are passing into class file under @Parameter annotation to call it.

😀 TIME TO IMPLEMENT the Same IN YOUR ECLIPSE NOW 😀

2> TestNG @DataProvider – dataProvider in the class itself

A test method that uses DataProvider will be executed a multiple number of times based on the data provided by the DataProvider

The test method will be executed using the same instance of the test class to which the test method belongs.

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.

Lets understand this by example practically.

We have one TestNG Class, Which contains below @DataProvider having name=SearchProvider.



It contains two dimensional Object array to pass the element values . Hence return values show the same.

This will pass the value to @Test method one by one.

Now, we have one @Test method in the same TestNG class. We pass the dataProvider using the same name as we have given in @DataProvider to pass the values one by one.



Below is the result when we run this code. Console & TestNG Result.




😀 TIME TO IMPLEMENT the Same IN YOUR ECLIPSE NOW 😀


~~~~ Other TestNG Related Tutorial Links~~~~

TestNG Tutorial - Introduction Part

TestNG Tutorial Advanced Topics - Part 1 (Configuration of TestNG)

TestNG Tutorial Advanced Topics - Part 2 (TestNG.XML File)

TestNG Tutorial Advanced Topics - Part 3 (Priority, Groups, Parallel Mode, invocationCount, ThreadPool)

TestNG Tutorial Advanced Topics - Part 4 (Parameterization, Data Provider)

TestNG Tutorial Advanced Topics - Part 5 (Exclude,Listeners,DependsOnMethod)



TestNG Tutorial Advanced Topics - Part 1

We are now going to learn more advance stuff about the TestNG in this tutorials.

In first tutorial of TestNG (Introduction of TestNG), you get enough knowledge how to install, configure and different annotations.


Default Project Folder Structure With TestNG Library





Let's see the difference on JAVA class and TestNG class.


Below is difference in Option when you try to run the Java Class and TestNG Class.


TestNG Class: Similar to Java class but dont contains Main Method and contains different annotations to run as testng class.



Note: We never use Main Method in TestNG Class.


Java Class Run





TestNG Class Run






How TestNG Change the Reporting in Selenium: Main Benefits of TestNG

Without TestNG: In Selenium without TestNG we have to add required PRINT LINE statements to verify that we are on right track or not or we need to print same information back and forth to excel or other files.


Without TestNG - When we run the Selenium Script, we can see output in Console.





With TestNG - We can see the complete format of how many test case run, pass, failed and skipped.




Also one separate folder 'test-output' get generated every time we run TestNG class and it has different kind of reports. 




Mostly used format is 'Index.html' which display below structure in browser.


TestNG Tutorial Advanced Topics - Part 2

What is TextNG.XML?

In simple term testng.xml is heart of testng class. It contains all key information about the project. If you want to make any customization on your program to run you can do it from here.

It is very useful to organize the priorities of many thing while running your program. Like Groups, Include, Exclude, Parallel, Parameters etc.

Benefits of Testng.XML file:


  • It allows to pass parameters to the test cases
  • Allows to add group dependencies
  • Allows to add priorities to the test cases
  • Allows to configure parallel execution of test cases
  • Allows to parameter the test cases
  • TestNG listeners can be implemented at Suite level
  • To Integrate TestNG framework with third party tools like Jenkins testng.xml is required
  • Testng.xml file allows to include or exclude the execution of test methods and test groups

How to Generate Textng.xml file for the Project:

Step 1 : Select your project folder in which you have all the packages.

Step 2 : Right click on selected project folder.

Step 3 : Mouse hover on TestNG option from the given list which is located at the bottom.

Step 4 : Select "Convert to TestNG" option.



Step 5 : A modal will appear with the name of "Generate testng.xml" 

You can give name, select parallel mode and thread count if you want to add them by default while creating file.




Sample Format of TextNG.XML






Sunday, April 19, 2020

Events by SLT Learning


Past Events


Event Name:  Quick Session on Software Testing
Event Type: Training 
Purpose: Sharing Knowledge about Testing
Date: 05-July-2020, Sunday
Time: 07 PM to 08 PM IST

Speakers & Hosts:

Mr. Ankit Prajapati (Automation Engineer - SLT Learning)

Topics to Cover for Understanding:

  • Software Testing
  • Level of Testing
  • Types of Testing
  • SDLC
  • Waterfall - Agile Model
  • STLC
  • Defect Life Cycle
  • Test Scenario - Test Cases


Video Link: 


--------------------------------------------
Event Name:  Quick Session on Selenium Part 2
Event Type: Training 
Purpose: Sharing Knowledge about Selenium
Date: 16-May-2020, Saturday
Time: 08 PM to 09 PM IST

Speakers & Hosts:


Mr. Ankit Prajapati (Automation Engineer - SLT Learning)
Topics to Cover for Understanding:
  • POM
  • Cucumber
  • API Testing
  • Database Testing
How to connect to Webinar:

Topic: SLT Learning - Free Demo Session - 2
Time: May 16, 2020 10:30 AM Eastern Time (US and Canada)

Join Zoom Meeting
https://us04web.zoom.us/j/5088231631?pwd=TXdocGl6Y0FNa2VsS3V2cHFGLzlOQT09

Meeting ID: 508 823 1631
Password: 3x0Z9a

Few Notes from Trainer:
  • This is not on regular basis as i spare my time to help people to start learning by themselves.
  • You can find different mediums to contact us on signature 
  • Follow, Like and Subscribe to access Videos, Tutorials for Free of Cost (I am uploading this materials one by one)
Follow below things for better training:


  • Keep Yourself Mute (Reduce the Disturbance) - Otherwise I have to remove to maintain the quality
  • This is quick session for all to cover almost all topics fundamental
  • Try to join with computer Audio and Be on alone environment to listen clear voice
  • If you have any disturbance the voice or video, dont disturb on call as it is recording session.
  • If you missed this seminar then watch the complete recording on our YouTube channel.

Video Link: 



--------------------------------------------

Event Name:  Quick Session on Selenium Part 1
Event Type: Training 
Purpose: Sharing Knowledge about Selenium
Date: 25-April-2020, Saturday
Time: 08 PM to 09 PM IST

Speakers & Hosts:


Mr. Ankit Prajapati (Automation Engineer - SLT Learning)
Topics to Cover for Understanding:
  • GIT
  • Selenium IDE
  • Selenium WebDriver
  • Selenium Grid
  • Data Driven and Keyword Driven Frameworks Understanding
  • TestNG
  • Maven
  • Cucumber
  • API
  • Database Testing
How to connect to Webinar:

You have been invited to an online meeting, powered by Amazon Chime.https://chime.aws/7757205755
Meeting ID: 7757 20 5755
U.S. Toll: +1 206-462-5569
Meeting PIN: 7757 20 5755

International: https://chime.aws/dialinnumbers/  

Few Notes from Trainer:
  • This is not on regular basis as i spare my time to help people to start learning by themselves.
  • You can find different mediums to contact us on signature 
  • Follow, Like and Subscribe to access Videos, Tutorials for Free of Cost (I am uploading this materials one by one)


Video Link: 



--------------------------------------------

Event Name: Webinar SLT Learning : AutonomIQ ChroPath - The Best XPath & Time Saver Tool in Market
Event Type: Webinar
Purpose: Sharing Knowledge about ChroPath
Date: 18-April-2020, Saturday
Time: 09 PM to 10 PM IST

Speakers & Hosts:



Hosted By : Mr. Ankit Prajapati (Automation Engineer - SLT Learning)

Co-Hosted By : Mr. Sanjay Kumar ( Inventor & Creator of ChroPath | Product Evangelist  @AutonomIQ)



Joining Details:



https://chime.aws/7757205755

Meeting ID: 7757 20 5755

U.S. Toll: +1 206-462-5569

Meeting PIN: 7757 20 5755

International: https://chime.aws/dialinnumbers/





Friday, April 17, 2020

Define Yourself as QA Tester in Agile Process

Everything You Should Know About QA Role in Agile Process - All in One Blog !!!

Skills Should Agile Tester Adopt


  • Be positive and solution-oriented with team members and stakeholders
  • Display critical, quality-oriented, thinking about the product
  • Actively acquire information from stakeholders (rather than relying entirely on written specifications)
  • Accurately evaluate and report test results, test progress, and product quality
  • Work effectively to define testable user stories, especially acceptance criteria, with customer representatives and stakeholders
  • Collaborate within the team, working in pairs with programmers and other team members
  • Respond to change quickly, including changing, adding, or improving test cases
  • Plan and organise their own work


Role of QA Tester in Agile Process

Help define "done"


Yesterday, you had to wait for the business analysts to finish the requirements phase before you could start building your test plan in detail and ensure that you had full coverage and traceability for all the requirements.

Today, things are different. Rather than waiting for the business analysts to finish their work and hand it off to you, you're part of the process of defining user stories, adding them to the backlog, and helping the team define the criteria that must be met for each story to be considered "done."

Scope and Estimate


As an agile tester, you'll help estimate the scope and size of the testing effort for each user story. The estimated effort for testing is part of the overall estimation for the size of the user story, which can't be marked as "done" until it passes all the tests. After each sprint, your team will review and update the estimates of upcoming user stories based on the team's experience from the previous sprint and re-plan upcoming sprints based on the new estimates, which should be improving over time.

Assess testability


You'll be involved in the design of the software by working closely with developers to assess and advise on testability aspects. You'll also be looking at concerns such as whether software testing can be automated, whether components can be tested independently from the rest of the package, and how much information is written to the log files.

Design and Execute Test cases


On an agile project, everyone on the team plays a role in testing. Each team member might have their own specialty, but everyone is responsible for delivering the team's user stories at the end of the sprint. The team will be writing functional, performance, and automated unit tests, as well as creating scripts to automatically deploy code into test environments and execute the tests. As a tester on the team, you'll be helping to design and execute automated and manual tests, including exploratory testing. As testing is infused throughout the development process, you'll become involved in testing at the component and API level, as well as at the end-to-end and feature level. You'll also be testing those nonfunctional requirements teams sometimes refer to as the "ilities": security, reliability, maintainability, scalability, usability, and so on.


Automate


In an agile development environment, there are frequent small-functionality increments at the end of each sprint, which means the software is continually changing. The frequency of change makes the speed of regression testing incredibly important, because the code should be tested every time a change is committed. This means you need to automate your tests as much as possible—manual testing simply takes too long. Look for opportunities to automate tests and deployment scripts and develop test automation frameworks for your team and the rest of the agile release train.

Collaborate


You'll be working more closely with developers than ever before. If you find a defect, tell the developer, and let them use your system to debug so they can find and fix the problem as quickly as possible. Don't force them to set up their own system. You're working together on the same code and user story, with the same goal of providing working software at the end of the sprint.

Verify fixes


OK. This doesn't sound new. Yesterday, you were working on verifying fixes, too. But these fixes might have been made weeks or months ago, and you could only test them when a formal build was delivered to QA. In agile though, the aim is to fix and verify bugs within the same sprint, because otherwise the tests won't pass, and the user story can't be considered "done.

Attend daily stand-up meetings

It's important to attend and contribute to the daily stand-up meetings. To be really effective, don't just talk about what you accomplished yesterday and what you're going to be doing today. The most important part of a daily stand-up meeting is sharing the obstacles that will prevent you from making progress as a tester on the team.


Track different metrics


Yesterday, when you were part of a QA team, you followed metrics that were important to your organization, such as the status of requirements, number of reopened defects, etc. Today, you'll be looking at a new set of metrics that you'll need to track as part of an agile organization, such as sprint burndown, velocity, and release burndown.

Fail


Yes, you're allowed to fail. That's OK.

You could even say it's your responsibility to fail once in a while, but only as long as you fail fast and learn from your failures. In traditional development, failure is not only discouraged but also often punished. In agile, failure is accepted, and the lessons learned from failures are shared with the team. Support from management to accommodate failure is critical to the success of agile in the enterprise.

Embrace change


Today, you get to try out the second principle behind the Agile Manifesto: welcome change. Just moving to agile itself is a big change, but now that you're agile, you must be prepared not only to expect change but also to deal with it. In a traditional setting, a disruption during development can jeopardize the whole project. But in agile, any user stories that meet the "done" criteria are good to go. Because constantly grooming and reassessing the backlog is part of the agile concept, the team can accommodate and accept disruptions. The only major casualty of a disruption in agile should be the current sprint, but because you aim for short sprints, there are only a couple of weeks' work at stake.

Learn


You've always had to keep up with the product you're testing and the technologies you're encountering, as well as the testing itself. But now that you're in an agile organization, you'll need to learn about agile itself, including what is and isn't working for you. Make the changes you need, and keep reassessing whether they're working or if they need to be refined or removed.

Conclusion of Blog on QA Tester in Agile


  • Understanding, implementing, and updating the Agile Test Strategy
  • Work with Product Owners to define Acceptance Criteria and the Definition of Done.
  • Measuring and reporting test coverage across all applicable coverage dimensions
  • Ensuring proper use of testing tools
  • Configuring, using, and managing test environments and test data
  • Writing and executing automated checks and reporting back to the team
  • Reporting defects and working with the team to resolve them
  • Coaching other team members in relevant aspects of testing
  • Ensuring the appropriate testing tasks are scheduled during release and iteration planning
  • Actively collaborating with developers and business stakeholders to clarify requirements, especially in terms of testability, consistency, and completeness
  • Participating proactively in daily standup meetings, story grooming sessions, team retrospectives, suggesting and implementing improvements
  • Within an Agile team, each team member is responsible for product quality and plays a role in performing test-related tasks.

Agile organizations may encounter some test-related organizational risks:


  1. Testers work so closely to developers that they lose the appropriate tester mindset
  2. Testers become tolerant of or silent about inefficient, ineffective, or low-quality practices within the team
  3. Testers cannot keep pace with the incoming changes in time-constrained iterations

Common Commands in Selenium WebDriver

Commands which are useful to perform the common or we can say frequently use action and operation on web page to complete the test.

Types of common web driver commands: [Click on Each Link to know more]


Quick View of Common Command:


Syntax of Command:




Most Frequently Used Commands in Selenium Script:

1> Direct to web page or Launch Web page on browser

Using GET method





Using Navigate method





Note: Main difference between Get () and Navigate () is, both performing the same task but with the use of Navigate () you can move back () or forward () in your session’s history.

Navigate is faster then Get, because navigate does not wait for the page to load fully.



2> Locating text box and sending user inputs



3> Clearing User Inputs





4> Fetching data over any web element



5> Performing click event



6> Refresh/Reload the web page



7> Switching window




8> Moving between Frames




9> Drag and Drop





😀 TIME TO IMPLEMENT the Same IN YOUR ECLIPSE NOW 😀