
Discover how to write effective automation tests using a GUI-based framework, Selenium, x unit, dependency injection, Docker, and Entity Framework for integration testing within containers.
Demonstrate dockerized integration testing for modern apps using xunit, selenium, and fluent assertions, showcasing fast, isolated tests within a docker environment.
Explore application under test, learn to run it in Visual Studio or as a Docker container with Docker Compose, and preview ASP.NET Web API and UI resources for automation testing.
Run the ASP.NET app from Visual Studio 2022, launching both the MVC web UI and the product API, with Swagger UI for API testing and Entity Framework data operations.
Run app in docker containers using docker compose to build docker images, then launch api and web app as services on ports 5000 and 5001, with SQL Server as backend.
Explore UI testing for modern apps with C# .NET, covering the testing pyramid, end-to-end login flows, and strategies for reliable, fast, maintainable tests.
Create simple selenium ui tests in C# with vs 2022, using Xunit, web driver manager, and code to navigate and interact with a web app.
Learn to automate a UI with Selenium in C# by identifying elements with IDs, entering name, description, price, and selecting the product type, and creating records via a submit button.
Manage the selenium web driver with XUnit IClassFixture in C#. Implement a driver fixture with the disposable pattern to centralize setup and disposal, enabling parallel tests.
Explore parallel UI test execution using Selenium with XUnit class fixtures to open and close browsers quickly, while running tests across multiple browsers and maintaining robust, reusable test code.
Learn to run Selenium tests in parallel with xUnit, using driver fixtures for maintainable code, and explore multi-browser execution and dependency injections.
Learn to implement cross-browser testing in advanced automation using a browser driver factory, parallel test execution, and a browser type enum to run tests across Chrome and Firefox efficiently.
Run cross-browser tests in parallel by using Chrome and Firefox drivers exposed via a driver fixture. Ensure browsers close properly and reset data between runs with docker compose down -v.
Learn how dependency injection and inversion of control replace concrete webdriver classes with interfaces, easing testing and cross-browser automation, using Autofac and ASP.NET parallels.
Install and apply Autofac to implement inversion of control by registering interfaces with the browser driver implementations, building a container, and replacing concrete classes in tests.
Leverage Autofac to resolve the AI browser driver in the driver fixture, replacing direct instantiation with dependency injection and container-based browser type handling.
Discover how XUnit.DependencyInjection streamlines unit testing in dotnet core by replacing Autofac boilerplate with a dependency injection approach. Explore configuring services with IServiceCollection and startup-like patterns to simplify test containers.
Implement xunit dependency injection for the browser driver using xunit.di, replacing autofac, creating startup with configure services, and registering IBrowserDriver as a scoped service in the DI container.
Implement dependency injection for the driver fixture by introducing an IDriverFixture interface and removing concrete classes, registering the fixture in startup, and enabling tests to resolve drivers via the interface.
Learn to inject the browser type through test settings and a webdriver initializer extension. Use a singleton browser driver to run a browser-specific test suite with improved separation of concerns.
Summarizes building a foundational automation testing framework in C# .NET, covering Selenium basics, parallel execution, cross-browser testing, and Autofac-based dependency injection for driver handling.
Explore the building blocks of UI testing atop our foundation, introducing the page object model, data-driven testing, and configuration readings across our code, with cross-browser and parallel executions.
Explore writing a page object model with selenium in C#. Create a framework project to house object identifications and business logic, then reuse them in test classes via dependency injection.
Create a two-page page object model in a test project, defining home and create product pages, identifying web elements, and using dependency injection to supply the WebDriver.
Builds a create product page using the page object model and a product model, with name, description, price, and product type, including an enum for type.
Focus tests on operations while the framework wires up dependency injection, startup configuration, and page objects like home page and create product page, demonstrating separation of concern in automated tests.
Refactor the test framework by consolidating to the E test suite, removing obsolete unit tests, and updating Selenium and NuGet packages for a streamlined page object model and data-driven testing.
Learn to create and use C# extension methods for web elements to simplify Selenium interactions, including dropdowns, clear and enter text, and retrieving selected values.
Explore data driven testing for UI tests, replacing hard coded data with auto generated data using AutoFixture and XUnit, through theory and auto data to simplify test setup and teardown.
Learn to configure a test framework using appsettings.json, read browser type via a simple configuration builder, and drive webdriver initialization with json-based settings and enum parsing.
Centralize configuration by adding test settings for url, timeout, and browser type via Json deserialization, enabling cleaner startup and DI integration.
Configure json deserializer options to map browser types from appsettings.json, enabling case-insensitive properties and a json string enum converter, and shift webdriver setup from tests to the framework.
Implement IDisposable in the driver fixture to automatically quit web driver on dispose, switch to Chrome, and ensure browser closes after test execution, uphold separation of concerns in a class.
Introduce HtmlTableExtension to test html web tables in UI automation, reading headers, rows, and cells, and performing actions like clicks or dropdown selections with a table data collection.
Introduce an html table extension and its extension method to read a table into a collection, capturing columns, rows, and special controls for actions by reference column name and value.
Use the HtmlTableExtension to locate a table by CSS selector, perform a cell action by column index, and click the details link in automated tests.
Summarize end of the page object model section and separation of concerns between tests and the framework. Cover configurations, WebDriver setup, HTML table extension method, and refactoring for test focus.
Improve UI testing by building effective tests, leveraging a page object model, and collaborating with developers to add IDs and modify the application under test for reliable automation.
Learn to craft effective assertions using fluent assertions in C# .NET by validating product details: name, description, price, and product type on the details page and in test verification.
Add unique IDs to the details page controls (name, description, price, product type) to enable reliable automation testing with C# .NET, and deploy changes in a docker container.
Extract UI input into a product model, including name, description, price parsing, and enum product type via inner text, then assert with fluent assertions against the entered data.
Exclude the auto-generated id in product verifications using fluent assertions, since the id varies and a UI value is unreliable. This keeps tests focused on meaningful data and readability.
Run tests from the command line using dotnet test in a cross-platform dotnet core environment. See how tests are auto-identified by path, run consistently on Linux, macOS, and in containers.
Learn to write readable behavior-driven tests with spec flow and fluent assertions, capture UI data into a model, and validate in an xUnit project with Selenium.
Set up SpecFlow in the test project, add a product feature and step definitions, reuse existing page models, and fix dependency injection to validate product creation and details with BDD.
Learn to implement SpecFlow step definitions for end-to-end flows, including splitting steps, wiring dependency injection, and mapping table data to a product model using SpecFlow Assist to create an instance.
Learn to pass product details between SpecFlow steps using scenario context, sidestepping startup DI by constructor injection, and streamline test code with global usings and C# 10 features.
Resolve spec flow dependency injection issues by using external DI plugins like solid token DI or Microsoft DI, and configure a static startup with proper appsettings.json.
Conclude the section by introducing fluent assertions for testing, highlighting their benefits in UI validation. Apply BDD with specflow to craft readable tests with dependency and context injection.
Explore database testing as part of advanced automation using dependency injection, Entity Framework, and ORM; learn to test via API or code and apply the repository pattern.
Merge the test suite into the product api project so tests run with the app code in every check-in and pipeline, enabling dependency injection of the entity framework repository pattern.
Explore database testing by using sqlite with a seed data method and the product db, and run the app inside containers to verify data access via swagger.
Learn to replace sqlite with sql server as the ProductAPI data source by installing Microsoft.EntityFrameworkCore.SqlServer, updating dependency injection, configuring docker compose, and performing EF core migrations.
Fix the invalid object name error by adding a dotnet ef migration for the product table. Then run docker compose up to verify the migration and seed data.
Connect to sql server using orm and di in a bdd project, and implement repository pattern to test create, edit, delete, and get by id operations.
Shows accessing the database from SpecFlow step definitions by wiring a product repository via dependency injection, reading products with the ORM, and testing read and delete operations in containers.
perform a database delete operation for cleanup after test execution to remove test data, using a repository pattern and scenario context for reliable automated testing in a C# .NET environment.
Add a product directly in the database to prepare test data, then edit and verify via the UI using a reusable step for edit and details actions, including cleanup.
Perform edit operations with cleanup in automated tests, addressing the dropdown bug, while using a page object model and clear and enter text extensions to synchronize with the database.
Learn how to gracefully handle delete operations in SpecFlow by cleaning up data before creation, using repository calls by name or id, and leveraging entity framework for maintainable database tests.
Leverage ORM-based database testing and modify the application with your test code, while running a three-tier container setup (API, SQL Server, Web UI) to improve quality and best practices.
Extend the automation framework with SpecFlow living doc and Allure reporting, enable Selenium Grid with remote WebDriver, and run tests in containers for ci/cd and docker support.
Install the dotnet tool for SpecFlow plus living documentation, run the offline living doc generator to produce a test execution json and an HTML report.
Learn to add allure reporting support for spec flow and cucumber in modern .NET apps, including installing the allure nuget package via scoop, configuring settings, and generating and viewing reports.
Learn to retry failed specflow tests using the ecs retry spec flow plugin and nuget package by applying a retry tag to rerun tests multiple times.
Explore selenium grid setup for distributed test execution using dockerized chrome and firefox nodes. Learn to run ephemeral selenium grid containers and dockerize tests for parallel execution against containerized applications.
Explore dynamic selenium grid four with on-demand docker containers and beta video recording for scalable, isolated parallel testing across chrome, firefox, and edge.
Refactor driver fixture to use remote webdriver with selenium grid, update docker compose and docker files, and configure browser options and grid url for remote test execution.
Add hub and node services in Docker Compose, configure the Selenium grid URL for remote webdriver testing, and prepare a grid config and assets folder.
Build and run docker compose to create ee api, ee web app, and ee test images, then start the selenium hub and grid containers.
Containerize the application, tests, and selenium grid using docker compose, enabling networked communication, parallel test execution, and retry-on-fail to drive reliable pipeline runs.
Advance automation testing by running WebDriver tests inside a dockerized Selenium grid, managed via docker compose, with an option to switch between local and remote execution for scalable parallel testing.
Discover how integration testing verifies app components together and isolates UI, service, and database from full infrastructure, contrasting with end-to-end and unit testing, using ASP.NET Core in-memory test server.
Explore integration testing of a service by using httpclient to call the product api, verify responses, and compare content without relying on the ui.
Showcases modern ASP.NET Core integration testing using WebApplicationFactory to bootstrap the sut, create a test web host and client, and run tests without manual app deployment.
Invoke the SUT with a web application factory to run an in-memory product API, seed data via local SQL Server, and verify the get products response contains keyboard.
Use Swagger and NSwag to generate client code from the product API Swagger file, enabling contract-driven integration tests and replacing hardcoded, brittle test logic.
Leverage NSwag generated code and Swagger to test the product API with a web client, validating get and create operations, and asserting results and counts with fluent assertions.
Explore writing a custom web application factory for db isolation testing by replacing SQL Server with an in-memory Entity Framework database, overriding configure web host and wiring the db context.
Use a custom web application factory to run in-memory tests, create a default client, and validate isolated integration tests without a SQL Server, boosting speed in pipelines.
Integrate integration tests into the pipeline by adding a dedicated dockerfile and compose service, enabling isolated tests in containers with faster execution.
Learn how integration testing runs in isolation inside containers, without spawning apps or databases, delivering faster results than UI testing and up to 100x faster.
Explore how to run automated tests locally using localhost browsers and a local database. Leverage the Selenium WebDriver Manager to use Chrome or Firefox instead of a dockerized grid.
Add an execution type in test settings to enable local and remote runs, introducing an ExecutionType enum and adjusting drivers to use a web driver for local execution.
Configure execution type as local in settings to run tests on the local machine with WebDriverManager and Chrome driver, then debug to verify local execution.
Learn to run tests on remote machines by introducing local and remote app settings files controlled by the ASP.NET Core environment variable and dynamic loading.
Learn to configure test runs with Visual Studio run settings to honor ASP.NET Core environment variables, switch between local and remote execution, and validate grid-based and Docker-based testing.
Execute tests on a remote Docker grid by passing run settings via environment variables and Docker Compose, ensuring the correct app settings file is used for remote versus local runs.
Explore configuring a GitHub Actions workflow to run Docker Compose with application and test containers. Publish test reports and artifacts, including selenium grid tests, to GitHub Pages.
Publish the code to a public GitHub repository and set up a GitHub Actions pipeline to run docker compose tests with scripts that manage permissions and the Selenium hub.
Configure and run a GitHub actions workflow for the project, execute the script, run Docker Compose build and tests on the Ubuntu runner, and note mounting issues.
Replaces unstable dynamic selenium grid in GitHub Actions with a stadium hub setup using docker compose, enabling chrome and firefox video tests and generating living documentation artifacts.
Generate and export the SpecFlow LivingDoc report from the test container to the GitHub Actions runner, then publish it as an artifact in the workflow.
Publish living documentation by deploying specflow reports from artifact to GitHub pages via a GitHub actions workflow, enabling automatic, up to date reports on a dedicated GitHub pages site.
Automate complete ci/cd using GitHub actions, run integration tests and UI tests, publish the living doc report to GitHub pages, and trigger workflows by pushes to the master branch.
This course Advanced Automation Testing of Modern Apps with C# .NET is a Master course that helps you not just automate the application, but to make you understand the in-depth concepts of automating the application in a modern way using modern tools and practices in the .NET world.
In this course, you will learn to automate ASP Netcore Web API and WebUI projects using tools such as
Selenium
XUnit
AutoFixture
Fluent Assertion
Specflow
Autofac
Xunit.DependencyInjection
WebApplicationFactory (Integration Testing)
The Application Under Test (AUT) will be running inside a Docker Container, hence the automation challenges to automate an application running as a microservices within containers will be discussed part of this course almost from the first section.
The course is divided into the following sections
UI Testing - Developing Foundational Framework with DI
This section helps one to understand developing selenium code in an industry-standard way by following the best practices using Dependency injection as the foundation.
UI Testing - Building Blocks for Test Project
This section helps to write the building block code for testing the application using Patterns and techniques such as
Page Object Model of Selenium
Insisting the focus on Separation of Concern
Configurations
IWebElement Extension methods
UI Testing - Writing Effective Tests
This section is all about writing the best possible way to write effective coding using tools such as
AutoFixture
FluentAssertions
Specflow
Database Testing with ORM
This section helps to test applications using Database with Entity framework as ORM
Integration Testing - The best testing ever!
This section focus on testing application components and test how they communicate with each other. This can be achieved using service isolation and testing the specific component without lot of ceremonies to test the application such as setting infrastructure like
Database
UI
3rd party services
We will also understand the power of ASP.NET's own Test Server and how to bootstrap an application while testing them.
Apart from the above topics and sections, the course also features crash courses which help to learn the course more in-depth such as
Application development using ASP Net Core WebAPI and Web UI
Specflow Basics
XUnit
AutoFixture
At the end of this course, one will have all the knowledge required to bring the best of the breed automation practices to work with full confidence.