freeCourse Image for Design Advanced Selenium Automation Framework with Real-Time Dashboard

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.

Start Watching

Course Content

65 Lessons · 22h 20m

01. Introduction

12m 40s

In this introductory video, We will see how easy to run the framework and how our framework will produce a real time dashboard with ELK.

02. Understanding the rules for creating a framework

04m 34s

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

05. Creating Driver class

16m 54s

In this video, we will see about why we need to create a separate driver class, fix some existing issues and optimize the code.

09. Static Block for the Rescue

22m 19s

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.

10. Creating a Simple Test Case

18m 53s

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.

13. Page Factory and Dilemma

18m 29s

I have tried to explain what is page factory and what we need to take care if we are using page factories.

14. Contentment - Completing our first test

21m 27s

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.

16. Enum - The Saviour

28m 01s

In this video I will try to explain the existing issue with the explicit wait implementation and will discuss in detail about the Enum in Java.

18. How to use Data Provider? Data provider in Testng | Selenium | Excel

57m 32s

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

19. Using Json File with Data Provider in TestNG

12m 11s

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?

20. Integrating Data Provider with Framework

09m 35s

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.

21. Eavesdropping your tests - TestNG Listeners

42m 53s

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?

22. Adoring Extent Reports - Integrating with Framework

24m 17s

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

23. Creating Extent Logger - Integration with TestNG Listeners

20m 17s

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

24. Creating Dynamic Report - Appending screenshots to report

36m 45s

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

25. IMethodInterceptor - Disable test case at run time.

43m 53s

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

26. Running iterations for a tests from excel - Data provider with Excel

33m 34s

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

27. Retry your failed tests - IRetryAnalyzer and IAnnotationTransformer

23m 54s

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.

28. Parallel Cross Browser Testing - How easy is the setup ?

21m 44s

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.

29. Dynamic Locator Vs Page Factory - Dynamic Xpath Utils

34m 20s

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

30. Create you own custom Annotations & Use it in Selenium Framework

30m 37s

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

31. Custom Annotation with Enums

07m 27s

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

32. Untold Affinity - Try with Resources and Selenium Framework

20m 08s

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)

34. Catch me if you can - Exception Handling in Detail

25m 35s

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.

35. Creating your own Exception

30m 49s

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

36. Enigma - How to handle exception in static block

11m 22s

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?

37. Key things to remember - Exception Handling

08m 32s

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.

38. How to mask your password - Easiest way

09m 37s

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?

39. Create Java documentation for Automation Framework

27m 32s

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

40. Browser and Driver Management using WebDriverManager

22m 56s

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

41. Why Docker in Test Automation?

08m 49s

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.

42. Virtualization Vs Containerization

16m 45s

In this video, we will see about the below topics, Virtualization Containerization Their advantages and disadvantages Simple analogy to remember it

43. Running Selenium tests in Docker - Learn in 20 mins

22m 05s

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"

44. Create Driver Factory - Encapsulate the logic of Browser Invocation

18m 02s

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

46. Docker Basics - Must watch

12m 34s

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

47. What is a Docker Image?

18m 29s

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

48. Run Selenium Tests in Standalone Chrome Container

23m 24s

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?

49. Run Selenium Tests in Standalone Firefox Container

07m 53s

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?

50. Why we don't need any executables when running tests in container?

17m 30s

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

51. Run Cross Browser Tests in Dockerised Selenium Grid - 20 mins

18m 47s

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

52. What is restart policy ? Why it is important in test automation ?

10m 13s

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

53. Selenium Grid Setup using Docker compose- Browser compatibility tests

29m 11s

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

54. Run Selenium Tests in different browser versions using Docker

13m 13s

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.

55. Why there is a need for real time dashboard in test automation?

05m 30s

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)

56. What is ELK Stack ? How to use it in Test Automation ?

12m 50s

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.

57. Run Elastic search and Kibana in Docker Containers

11m 23s

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

58. How to work with Elasticsearch?

15m 00s

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.

59. Create Real time Dashboard for Test Automation in Kibana - 30 mins

28m 25s

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

60. Integrate Automation Framework with Dockerized ELK - Java

24m 10s

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.

61. Portainer- Manage Docker Containers & Run Containers without command

19m 12s

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

63. Selenoid - Live Preview & Video capability for Tests in Docker

11m 05s

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.

View All

What You Will Learn

  • How to Design an Advanced Selenium Automation Framework from Scratch
  • Leveraging Java Concepts like Enums, ThreadLocal, Exception Handling in a Testing Framework
  • What is Page Object Model, TestNG, Maven, and how can it help in automation testing
  • Creating beautiful HTML reports using Extent Report
  • How to run automated tests in Docker Containers and create a real-time dashboard using Dockerized ELK
  • How to write Fluent Assertions using AssertJ
  • How to code like an SDET

Prerequisites

  • Basics of Java and Selenium
  • Patience to become an SDET