# krushnamajhi/automationtestcsharp architecture

> Architecture diagram of the GitHub repository krushnamajhi/automationtestcsharp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krushnamajhi/automationtestcsharp
- Repository: https://github.com/krushnamajhi/automationtestcsharp

## Overview

AutomationTestCSharp is a reusable NUnit/Selenium automation library, not a test suite. A consuming NUnit test extends TestBase; setup creates a run report and each test gets a package with a browser driver and Extent test, then drives browser interactions and assertions before teardown records failures and closes the driver. README documents this usage; sampled source supports the setup, driver, element, assertion, screenshot, and reporting links. Excel/data helpers and other unsampled capabilities are shown as separate utilities without inferred wiring.

Main entry points: [`uiautomation/WebDriver.cs`](https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WebDriver.cs) (WebDriver), [`TestBase.cs`](https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestBase.cs) (TestBase), [`TestSetUps.cs`](https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestSetUps.cs) (TestSetUps), [`commonutils/ImageUtil.cs`](https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/ImageUtil.cs) (Screenshot utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Test lifecycle"]
  node_testbase["TestBase<br/>[TestBase.cs]"]
  node_setup["TestSetUps<br/>[TestSetUps.cs]"]
  node_package["TestPackage<br/>[TestPackage.cs]"]
  node_properties["TestProperties<br/>[TestProperties.cs]"]
  node_base["Base<br/>[Base.cs]"]
  node_basepage["BasePage<br/>[BasePage.cs]"]
end

subgraph group_browser["Browser automation"]
  node_driver["WebDriver<br/>[WebDriver.cs]"]
  node_element["WebElement<br/>[WebElement.cs]"]
  node_locator["Locator<br/>[Locator.cs]"]
  node_waits["WaitConditions<br/>[WaitConditions.cs]"]
end

subgraph group_reporting["Reporting and diagnostics"]
  node_softassert["SoftAssertions<br/>[SoftAssertions.cs]"]
  node_reportprops["ReportProperties"]
  node_logger["Serilog configuration<br/>[LoggerConfig.cs]"]
  node_loggerext["Logger extensions"]
  node_exceptions["TestCaseException"]
  node_images["Screenshot utilities<br/>[ImageUtil.cs]"]
end

subgraph group_utilities["Test utilities"]
  node_util["General utilities<br/>[Util.cs]"]
  node_excel["Excel utilities<br/>[ExcelUtilities.cs]"]
end

node_consumer(("NUnit test author"))
node_selenium(("Selenium browsers"))
node_extent[("ExtentReports")]
node_sql[("SQL database")]

node_consumer -->|"extends for setup"| node_setup
node_consumer -->|"extends for tests"| node_testbase
node_setup -->|"creates results folder"| node_util
node_setup -->|"sets report state"| node_reportprops
node_setup -->|"attaches and flushes"| node_extent
node_testbase -->|"creates per test"| node_package
node_testbase -->|"creates assertions"| node_softassert
node_testbase -->|"quits at teardown"| node_driver
node_testbase -->|"captures failure image"| node_images
node_package -->|"creates test entry"| node_reportprops
node_package -->|"constructs driver"| node_driver
node_package -->|"reads browser config"| node_properties
node_driver -->|"controls browser"| node_selenium
node_driver -->|"accepts locator"| node_locator
node_driver -->|"returns elements"| node_element
node_driver -->|"evaluates conditions"| node_waits
node_driver -->|"captures screenshots"| node_images
node_element -->|"interacts with page"| node_selenium
node_softassert -->|"logs outcomes"| node_extent
node_softassert -->|"creates assertion error"| node_exceptions
node_softassert -->|"embeds failure image"| node_images
node_exceptions -->|"logs errors"| node_logger
node_exceptions -->|"logs error detail"| node_extent
node_setup -->|"logs setup activity"| node_logger
node_util -.->|"runs SQL operations"| node_sql
node_util -->|"reads workbook data"| node_excel
node_excel -->|"logs workbook activity"| node_logger
node_images -->|"captures browser image"| node_selenium
node_images -->|"builds screenshot media"| node_extent

click node_testbase "https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestBase.cs"
click node_setup "https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestSetUps.cs"
click node_package "https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestPackage.cs"
click node_properties "https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestProperties.cs"
click node_base "https://github.com/krushnamajhi/automationtestcsharp/blob/master/Base.cs"
click node_basepage "https://github.com/krushnamajhi/automationtestcsharp/blob/master/BasePage.cs"
click node_driver "https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WebDriver.cs"
click node_element "https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WebElement.cs"
click node_locator "https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/Locator.cs"
click node_waits "https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WaitConditions.cs"
click node_softassert "https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/SoftAssertions.cs"
click node_reportprops "https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/ReportProperties.cs"
click node_logger "https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/serilog/LoggerConfig.cs"
click node_loggerext "https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/serilog/LoggerExtensions.cs"
click node_exceptions "https://github.com/krushnamajhi/automationtestcsharp/blob/master/exceptions/TestCaseException.cs"
click node_images "https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/ImageUtil.cs"
click node_util "https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/Util.cs"
click node_excel "https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/ExcelUtilities.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_testbase,node_setup,node_package,node_properties,node_base,node_basepage,node_selenium toneBlue
class node_driver,node_element,node_locator,node_waits,node_extent,node_sql toneAmber
class node_softassert,node_reportprops,node_logger,node_loggerext,node_exceptions,node_images toneMint
class node_util,node_excel toneRose
class node_consumer toneIndigo
```

## Components

### Test lifecycle

- [TestBase](https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestBase.cs): `TestBase.cs`
- [TestSetUps](https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestSetUps.cs): `TestSetUps.cs`
- [TestPackage](https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestPackage.cs): `TestPackage.cs`
- [TestProperties](https://github.com/krushnamajhi/automationtestcsharp/blob/master/TestProperties.cs): `TestProperties.cs`
- [Base](https://github.com/krushnamajhi/automationtestcsharp/blob/master/Base.cs): `Base.cs`
- [BasePage](https://github.com/krushnamajhi/automationtestcsharp/blob/master/BasePage.cs): `BasePage.cs`

### Browser automation

- [WebDriver](https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WebDriver.cs): `uiautomation/WebDriver.cs`
- [WebElement](https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WebElement.cs): `uiautomation/WebElement.cs`
- [Locator](https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/Locator.cs): `uiautomation/Locator.cs`
- [WaitConditions](https://github.com/krushnamajhi/automationtestcsharp/blob/master/uiautomation/WaitConditions.cs): `uiautomation/WaitConditions.cs`

### Reporting and diagnostics

- [SoftAssertions](https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/SoftAssertions.cs): `reporting/SoftAssertions.cs`
- [ReportProperties](https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/ReportProperties.cs): `reporting/ReportProperties.cs`
- [Serilog configuration](https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/serilog/LoggerConfig.cs): `reporting/serilog/LoggerConfig.cs`
- [Logger extensions](https://github.com/krushnamajhi/automationtestcsharp/blob/master/reporting/serilog/LoggerExtensions.cs): `reporting/serilog/LoggerExtensions.cs`
- [TestCaseException](https://github.com/krushnamajhi/automationtestcsharp/blob/master/exceptions/TestCaseException.cs): `exceptions/TestCaseException.cs`
- [Screenshot utilities](https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/ImageUtil.cs): `commonutils/ImageUtil.cs`

### Test utilities

- [General utilities](https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/Util.cs): `commonutils/Util.cs`
- [Excel utilities](https://github.com/krushnamajhi/automationtestcsharp/blob/master/commonutils/ExcelUtilities.cs): `commonutils/ExcelUtilities.cs`

### Other components

- **NUnit test author**
- **Selenium browsers**
- **ExtentReports**
- **SQL database**

## Connections

- NUnit test author → TestSetUps: extends for setup
- NUnit test author → TestBase: extends for tests
- TestSetUps → General utilities: creates results folder
- TestSetUps → ReportProperties: sets report state
- TestSetUps → ExtentReports: attaches and flushes
- TestBase → TestPackage: creates per test
- TestBase → SoftAssertions: creates assertions
- TestBase → WebDriver: quits at teardown
- TestBase → Screenshot utilities: captures failure image
- TestPackage → ReportProperties: creates test entry
- TestPackage → WebDriver: constructs driver
- TestPackage → TestProperties: reads browser config
- WebDriver → Selenium browsers: controls browser
- WebDriver → Locator: accepts locator
- WebDriver → WebElement: returns elements
- WebDriver → WaitConditions: evaluates conditions
- WebDriver → Screenshot utilities: captures screenshots
- WebElement → Selenium browsers: interacts with page
- SoftAssertions → ExtentReports: logs outcomes
- SoftAssertions → TestCaseException: creates assertion error
- SoftAssertions → Screenshot utilities: embeds failure image
- TestCaseException → Serilog configuration: logs errors
- TestCaseException → ExtentReports: logs error detail
- TestSetUps → Serilog configuration: logs setup activity
- General utilities → SQL database: runs SQL operations
- General utilities → Excel utilities: reads workbook data
- Excel utilities → Serilog configuration: logs workbook activity
- Screenshot utilities → Selenium browsers: captures browser image
- Screenshot utilities → ExtentReports: builds screenshot media
