Design Advanced Selenium Automation Framework with Real-Time Dashboard
Intermediate
65 Lessons
22h 20m
If you are an automation engineer, learned the basics of Selenium & Java but are not sure how to develop a industry-standard framework with the right design principles, right coding strategy - then this is a course for you to steal. This course also helps to understand Docker and how to leverage Docker in Test Automation Space.
In this video, I have explained about the rules we will follow while creating the framework. Never hardcode. Keep the right things in right place. Religiously practice the Reuse culture. Make the framework easy for manual testers or others to contribute. Make the framework - Robust
In this video, I have explained about the maven template. We also started to take some baby steps in creating the framework. Also I have explained certain naming conventions that we will follow during the framework creation.
In this video, we have learned to solve the parallel execution issue in selenium with Thread Local. 1. How to implement Thread Local. 2. How to use set, get, remove, with initial methods. 3. Inheritable Thread Local 4. Thread Local with Initial value.
In this video, I have covered why we need to use Property file, when to use and how to use . I have also done some code refactoring in the existing code.
In this video, I have explained about the static block and its usage. How it can help us to initialize the static members and how it can be helpful in our framework.
In this video, I have explained about how to create a simple test case and write TestNG assertions to validate it. I have also explained what are all the problems with the current implementation.
In this video, we will cover one of cool java assertion library in detail. It will help us to write clean, fluent , readable assertions in our Framework.
In this video we will see the below topics to complete our first test, Fixing some existing issue. Correct the variable names. Implementing explicit wait to fix the issue. Adding Assertion to our test.
I have tried to cover the testng data provider in detail in this video. I am sure you will learn lot of new topics today, Why we need data provider when I can use for loop? Return type of data provider is not always Object[][] How to use Data provider? How to use same data provider for multiple test methods? Important notes to understand when using data provider Data provider with excel Data provider with excel and hashmap to reduce the parameter to the test method ===================================== https://github.com/amuthansakthivel/YoutubeSessions
I have covered how we can use a json with data provider. Topics covered in this video as follows, Why json when we have excel? How to use json with data providers? What are all the other files we can use with data provider? Can we use json instead of property file in framework?
In this video , I have explained about how we can integrate the data provide with our existing framework. We will also see how we can use parallel and name attributes in data provider. Understanding data-provider-thread-count parameter.
In this video, I tried to cover all the important testng listeners in detail, Understanding ITestListener Understanding ISuiteListener Understanding IMethodInterceptor Understanding IRetryListener Understanding IAnnotationTransformer How to disable a test at runtime? What is the use of these listeners? Is re-running failed tests a good practice?
In this video, I have explained how we can integrate the extent reports with Framework. Creating a simple standalone report in Extent Reports. Integrating with framework. Using ThreadLocal to avoid thread safety issues with ExtentTest *********************************************************** Extent Report - 5.0.5 Playlist https://www.youtube.com/watch?v=MHgSAmDXIWs&list=PL9ok7C7Yn9A-yUEnE62gOQ2B4pL3gsC28 Fixing thread safety issues https://www.youtube.com/watch?v=-7zA8KnFa9w&t=1075s Understanding Thread Safety https://www.youtube.com/watch?v=LaNsY6N2Bgs
In this video I have explained the reason to create Extent Logger and also how can we integrate with listeners. How to hide certain methods from other automation testers How to create custom logger class How to integrate with testng listeners *********************************************************** Extent Report - 5.0.5 Playlist https://www.youtube.com/watch?v=MHgSAmDXIWs&list=PL9ok7C7Yn9A-yUEnE62gOQ2B4pL3gsC28 Fixing thread safety issues https://www.youtube.com/watch?v=-7zA8KnFa9w&t=1075s Understanding Thread Safety https://www.youtube.com/watch?v=LaNsY6N2Bgs
In this I have covered the below topics, Dynamic Reports. Screenshots as Base64 String. Screenshots for pass, failed and skipped tests - control from Property file. More customization. Please send me your feedback to testingminibytes@gmail.com ********************************************************* Extent Report - 5.0.5 Playlist https://www.youtube.com/watch?v=MHgSAmDXIWs&list=PL9ok7C7Yn9A-yUEnE62gOQ2B4pL3gsC28 Fixing thread safety issues https://www.youtube.com/watch?v=-7zA8KnFa9w&t=1075s Understanding Thread Safety https://www.youtube.com/watch?v=LaNsY6N2Bgs
In this video, we will see how we can disable few test cases at run time. Fixing some existing issues. How to disable certain test cases during runtime? How to get the values from excel sheet about the tests? Important points to remember ********************************* Understanding listeners https://www.youtube.com/watch?v=TZq64ez7Iqo Dataprovider: https://www.youtube.com/watch?v=YB7gy911rHg Integrating data provider with framework: https://www.youtube.com/watch?v=9CumxYJ-dDI
In this video I have explained about the below topics, 1. Answering clarification from student. 2. Creating sheet with test data. 3. Understanding the mapping between tests and test data. 4. Integration with Excel. 5. Controlling test iterations from excel sheet. ******************************** Understanding listeners https://www.youtube.com/watch?v=TZq64ez7Iqo Dataprovider: https://www.youtube.com/watch?v=YB7gy911rHg Integrating data provider with framework: https://www.youtube.com/watch?v=9CumxYJ-dDI
In this video, we will see how we can retry the failed scripts using IRetryAnalyser and IAnnotationTransformer. 1. Understanding some important points about data provider. 2. Fixing some existing issues. 3. Retry Analyzer logic. 4. Adding parameter detail about retry analyzer to test method. 5. Using IAnnotationTransformer.
I have covered how to create an easy parallel cross browser testing with the help of data provider. 1. Implementing the switch to turn on/off - Retry Mechanism 2. Fixing some existing issues in the framework. 3. Extending the framework to support multiple browser. 4. Understanding the issues with the current implementation. 5. Understanding the native dependency injection on before method annotated method. 6. Solving the issue.
In this video, I have created second test case using amazon website. We will try to create a new test case. Understand the key things while creating a new test in our framework. Problems with the page factory design. Implementing Dynamic Locator strategy. Understanding String.format() method *********************** Constructing page layers and method chaining basics https://www.youtube.com/watch?v=CcMU6mlCj4Q Why page factory is not recommended? https://www.youtube.com/watch?v=e1esWQ_nZPE
In this video we will see the below topics, How to add authors, groups into the extent report? What is the problem with this approach? What is Annotations? Can you give some implementations to understand Annotations? How to create our own annotations? How to use it in framework? ********************************************* Extent Report playlist https://www.youtube.com/watch?v=MHgSAmDXIWs&list=PL9ok7C7Yn9A-yUEnE62gOQ2B4pL3gsC28
In this video, I will explain how we can use enums with custom annotations to restrict the users to add values from a predefined set of constants. Quick fixes of some existing issues. Understanding the new requirement. Creating enum. Using enum[] with annotations. ************************************ Enums https://www.youtube.com/watch?v=yvC2RjkVblA Usage of Enums in Selenium Framework https://www.youtube.com/watch?v=i71cmMTmRsU
In this video I have covered on the below topics, 1. What is try catch finally blocks? 2. What is the problem with try catch finally blocks? 3. What is try with resources? 4. When we can use try with resources? 5. Is there any prerequisite to use try with resources? 6. How the exception handling mechanism of try with resources varies with try catch finally (optional) 7. Can we have multiple resources inside try with resources(optional) 8. What is the change happened in Java 9 for try with resources? (optional)
In this video, I have explained about checked exception and unchecked exception , call stack or thread stack , exception propagation in detail. I have also explained about the problem with the current exception handling implementation in current framework.
In this video, I have explained about how to create our own custom exceptions. Apart from this, I have also explained why try catch is not always a best approach. How Runtime Exception can help in solving the issues? How selenium developers have developed their own exception? How to customize the existing stack trace? Please send your feedback to testingminibytes@gmail.com
In this video, I have explained how handling exception in static block differs from conventional methods. 1. Why we have to mandatorily use try catch block inside static blocks? 2. Can I throw a runtime exception inside try catch block? 3. How can I stop the execution where there is a exception in try catch inside static block? 4. System.exit() method usage 5. Can we consider about removing the static block itself?
In this video , I spoke in brief about the do's and dont's of exception handling. I have also highlighted the below topics, 1. Perform final review of all the exception handled in the framework. 2. Analyze and amend changes if needed. 3. Summary of the exception handling techniques.
In this video, we will see how we can easily mask a password. How to encode a String? How to decode an encoded String? How to use it in framework? Is this effective?
In this video , we will see how we can create Java docs for our framework. It will be similar to Java documentation available for testng or selenium. Understanding the needs for comments. Understanding Java doc comments for classes, methods. Customizing eclipse IDE suggestions. Adding package-info.java for package description. Understanding few html tags Generating Java doc for Test Automation Framework. @Documented annotation for custom annotation. Customizing the generated java docs. Don’ts while creating comments. More info: https://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html
Complete Java Docs overview. Github repository. What is the problem with current implementation of Browser invocation. What is WebDriverManager? Solving Driver and Browser resolutions by TTL? How to invoke browsers using it? Handling Proxies in WebDriverManager? - Will be covered in next video Changes in the framework. *************************************** Enum video: https://www.youtube.com/watch?v=yvC2RjkVblA https://www.youtube.com/watch?v=i71cmMTmRsU github repo: https://github.com/amuthansakthivel/SeleniumAutomationFramework_Youtube
In this video we will see the below topics, 1. Handling proxies of webdrivermanager. 2. Understanding the problems with the current implementation. Script worked yesterday and not today? Script working in my machine not in colleague/client’s machine? I have a requirement that I need to test my application in all the latest browser versions of chrome(80,81,82,..,89) and firefox(78,79,80,..84) Less budget to onboard cloud providers. Local machine configuration.
In this video, I will explain the below topics, How easy is the setup? How to execute our tests in Docker? Changes to be made in our framework to execute the tests in docker How easy to clean up the infra? **************** Why docker in Test Automation? https://www.youtube.com/watch?v=KHnnYtQF3os ************** Virtualization Vs Containerization https://www.youtube.com/watch?v=nI_MO_w5Y9Q ************** WebDriverManager: https://www.youtube.com/watch?v=drudGK9iA_8 ************* Enum: https://www.youtube.com/watch?v=yvC2RjkVblA&t=20s https://www.youtube.com/watch?v=i71cmMTmRsU&t=3s *********** Note: I have mentioned remotewebdriver and chromedriver extends WebDriver in the video but i should have mentioned implements. "A class can only implement a interface"
In this video, I tried to explain about the below topics, Recap of using RemoteWebDriver. What is the problem with the current implementation of Driver class? Fixing the issues in the Driver class. Exception Handling in DriverFactory class. Is that a good approach? **************** Why docker in Test Automation? https://www.youtube.com/watch?v=KHnnYtQF3os ************** Virtualization Vs Containerization https://www.youtube.com/watch?v=nI_MO_w5Y9Q ************** WebDriverManager: https://www.youtube.com/watch?v=drudGK9iA_8 ************* Enum: https://www.youtube.com/watch?v=yvC2RjkVblA&t=20s https://www.youtube.com/watch?v=i71cmMTmRsU&t=3s *********** Custom Exception: https://www.youtube.com/watch?v=u7Zj8mW_ydY&t=238s https://www.youtube.com/watch?v=_-R_cQikPTQ&t=69s https://www.youtube.com/watch?v=3DoLwxAhixg&t=133s
In this video, I have explained, Docker Desktop for Windows Docker playground How to use docker online without downloading it Docker Hub account Signup
In this video, I have explained the below topics, 1. What is docker? 2. What different things we can do with docker? 3. Docker - Client Server Architecture 4. Analogy between Software world and Docker world
In this video, I will try to explain below topics, What is Docker Image? Searching a file in docker hub. Understanding tags of images. Understanding authors. Why there is need for Docker official Images? Pulling a image from Docker hub
In this video, we will see the below topics, How to pull selenium/standalone-chrome image? How to start a container for this image? How to run the test in the created container? What is port mapping? Understanding the port mapping. Executing parallel tests. What is the problem with this approach?
In this video, we will the below topics, How to pull selenium/standalone-firefox image? How to start a container for this image? How to run the test in the created container? What is port mapping? Understanding the port mapping. Solving the port conflicts by assigning a new port What is the problem with this approach?
In this video, we will see about the below topic, What this selenium/standalone-chrome all about? Why we are delegating the request to a hub? What is inside this container? How to get inside the container shell? Understanding the folder structure Relating with the docker file
In this video- we will see about the below topics, Issues with the existing approach of using selenium/standalone-chrome or selenium/standalone-firefox. Setting the selenium grid infrastructure in docker. Creating selenium hub container. Creating chrome-node container and link to selenium hub container Creating firefox-node container and link to selenium hub container Running tests in dockerized selenium grid Scaling up and scaling down containers
In this video, we will see about the below topics, What is restart policy? Why it is important? No (Default) On-failure (Restart on non zero exit code) Always(unless docker daemon is stopped) Unless-stopped(Restarts always except manually stopped Docker run --restart flag imagename Docker update --restart flag imagename docker inspect containeridorname
In this video, I will cover the below topics, docker run -d -p 4444:4444 --restart always --name selenium-hub selenium-hub:latest docker run -d --link selenium-hub:hub --restart on-failure:3 selenium/node-chrome-debug:latest docker run -d --link selenium-hub:hub --restart on-failure:3 selenium/node-firefox-debug:latest or Docker-compose up (docker-compose -f filename up) Docker-compose scale servicename = number Docker-compose down Running tests on multiple versions Browser compatibility testing in docker
In this video, we will see about how we can change the existing framework to run selenium tests in different versions of chrome or firefox or browsers. Understanding how the existing setup works. Default behavior of selenium/hub. Adding browser version to the desired capabilities. Changes to the excel sheet. Changes to the driver class. Final run & verification.
In this video, we will see quick summary about what we have achieved so far and we will also see why we need real time dashboard, Regression test execution spanning for hours. Human error in updating certain config file. Trend analysis. Automation tests quality. Can be used across multiple projects. We will use Elasticsearch and Kibana to set up real time dashboard. (Dockerised setup)
In this video, we will see about the below topics, Elastic Search : Real time distributed and analytics engine. Document based and schema less (No tables like MySQL or Oracle) Developed in Java(Open source) Using Apache Lucene - Open source ,scalable text search engine - Focus on text indexing and searching Exposes Rest API Near real time - Small time difference between indexing a document before it becomes accessible. ============================== Nodes - Single server which stores data. It can combine with other nodes to form cluster. Cluster - Group of nodes holding the data. Index - Similar to table in conventional databases - Collection of similar documents Example -- We store all student details in students table and same way we store all student details in student index. (Index is basically a collection of similar documents) Type - Subtype of index. (When student is index, then 10th grade , 11th grade are all can be types) Document - Basic unit of information . ============================= Kibana Open source data visualisation tool for elasticsearch. Provides visualization on top of content indexed on an elasticsearch cluster. Users can create bar ,line and scatter plots on top of large volume of data. It will be real fun to work with Kibana.
In this video, we will see how we can run elastic search and kibana in docker containers, Important Links: https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-elastic-stack.html#install-elasticsearch https://www.elastic.co/downloads/elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/7.11/docker.html https://www.elastic.co/guide/en/kibana/current/docker.html#environment-variable-config https://hub.docker.com/_/elasticsearch Docker commands: To run elasticsearch docker run -p 9200:9200 -p 9300:9300 --name elasticsearch -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.11.1 To run Kibana docker run -p 5601:5601 --name kibana --link elasticsearch:elasticsearch docker.elastic.co/kibana/kibana:7.11.1 ================================= You should use a volume bound on /usr/share/elasticsearch/data for the following reasons: The data of your Elasticsearch node won’t be lost if the container is killed Elasticsearch is I/O sensitive and the Docker storage driver is not ideal for fa
In this video, we will see about the below topics, Posting data to elasticsearch. Accessing data from elasticsearch. Elasticsearch head plugin for chrome. Working with the elasticsearch head plugin.
In this video, we will see how we can work with Kibana, Creating Index Pattern in Kibana Discover - Used to view the logs in customised format. Visualise - Create different visualisation based on the requirement. Create different visualisation - Vertical Bar, Pie Chart, Count, Metrics Dashboard - Arrange multiple visualisation to create a dashboard. Inject data to Elasticsearch, Visualise in Kibana
In this video, we will see the below topics, Create a markdown for Kibana dashboard. Rest Assured Library. Construct a hashmap with all the details and post it to Elasticsearch. Change to the existing framework. Performing dry run to check whether it is working fine. Share the Kibana URL to clients/managers Creating a config switch to send results to ELK or not.
In this video we will see the below topics, Updated docker-compose.yml file What is portainer? docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer How to manager docker with Portainer? ======================= Github: https://github.com/amuthansakthivel/SeleniumAutomationFramework_Youtube
In this video we will see about how easy and powerful selenoid is, Advantages : Consumes 10 times less memory than conventional selenium grid. Inbuilt capability to view the live execution. Inbuilt capability to store the videos of the live execution. Support through channels like Telegram Available readily in Cloud platforms like GCP, Digital Ocean, Yandex cloud Their products like Moon and GGR is very powerful.