Skip to content

azwans/UAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UAT Connectivity Test Script

📖 Overview

UAT_Connectivity_Test.ps1 is a PowerShell script designed to automate network connectivity validation in User Acceptance Testing (UAT) or production environments.
It checks connectivity to critical intranet and internet resources, logs results with timestamps, and exports them into an Excel report for easy review.

This is especially useful for IT support specialists and network engineers validating infrastructure availability (servers, DNS, email, SAP, etc.) before sign-off or during troubleshooting.


✨ Features

  • Auto-dependency check – Installs the required ImportExcel module if missing.
  • Dynamic local IP detection – Captures the machine’s current IPv4 address.
  • Predefined test cases – Includes common corporate servers (intranet, DNS, AD, SAP, Outlook, Google, etc.).
  • Ping connectivity tests – Verifies reachability and round-trip response.
  • Timestamped results – Records when each test was executed.
  • Excel export – Saves results into a structured .xlsx file for reporting and auditing.

🛠️ Requirements

  • Windows PowerShell 5.1 or PowerShell 7+
  • Internet access (for Install-Module and external tests like Google)
  • Execution Policy allowing script execution:
    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

📂 Usage

  1. Clone or download this repository. You can also download the PS1 file here.
  2. Open PowerShell as Administrator.
  3. Run the script:
    .\UAT_Connectivity_Test.ps1
  4. After execution, check the generated Excel file on your Desktop (default output path will be the script’s directory).

📊 Example Test Cases

Test ID Description Target Host
TC001 Ping Example shared drive Intranet Example01
TC002 Ping Google Internet google.com
TC004 Ping DNS Server 1 Intranet 10.121.23.154
TC006 Ping Domain AD Intranet example.org
TC008 Ping Outlook Email Internet outlook.office.com

📑 Output

  • Results are exported into an Excel file (UAT_Connectivity_Result.xlsx).
  • Each row includes:
    • Test ID
    • Description
    • Target (Intranet/Internet)
    • Host
    • Ping status (Success/Fail)
    • Response time (ms)
    • Timestamp
    • Local IP used

By default the output will be saved on your Desktop. However you can change it in the file. Navigate to the code below and change the $ExcelPath = "$env:________" .

# Export to Excel
$excelPath = "$env:USERPROFILE\Desktop\UAT_Connectivity_Results.xlsx"
$results | Export-Excel -Path $excelPath -AutoSize -Title "UAT Connectivity Test Results"

🔧 Customization

You can add or remove test cases by modifying the $targets array in the script:

$targets = @(
    @{ ID = "TC010"; Description = "Ping Custom Server"; Target = "Intranet"; Host = "mycustomserver.local" }
)

📌 Notes

  • Run with sufficient privileges for accurate network tests.
  • Useful for troubleshooting network issues, pre-deployment checks, or validating infrastructure during UAT sign-off.

🖼️ Sample Output (Excel Export Screenshot)

Below is an example of the Excel-style results generated by the script:

Sample Output


:) Final Word

Hope this script is somewhat useful and feel free to modify according to your needs.

About

UAT Network Connectivity Testing Script (Powershell) With Output to Excel

Topics

Resources

License

Stars

Watchers

Forks