{"id":17867096,"url":"https://github.com/cdhunt/httpunitps","last_synced_at":"2025-10-10T22:46:18.900Z","repository":{"id":201214495,"uuid":"706214565","full_name":"cdhunt/httpunitPS","owner":"cdhunt","description":"Unit testing for network endpoints.","archived":false,"fork":false,"pushed_at":"2024-02-26T22:04:38.000Z","size":675,"stargazers_count":5,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-02-27T22:49:21.618Z","etag":null,"topics":["devops-toolkit","powershell","test-automation"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdhunt.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-17T14:16:42.000Z","updated_at":"2024-02-27T13:42:17.000Z","dependencies_parsed_at":"2024-02-26T22:38:56.575Z","dependency_job_id":null,"html_url":"https://github.com/cdhunt/httpunitPS","commit_stats":null,"previous_names":["cdhunt/httpunitps"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cdhunt/httpunitPS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FhttpunitPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FhttpunitPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FhttpunitPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FhttpunitPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdhunt","download_url":"https://codeload.github.com/cdhunt/httpunitPS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdhunt%2FhttpunitPS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005462,"owners_count":26083902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops-toolkit","powershell","test-automation"],"created_at":"2024-10-28T09:43:50.900Z","updated_at":"2025-10-10T22:46:18.881Z","avatar_url":"https://github.com/cdhunt.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# httpunitPS\n\n\u003cimg src=\"httpunitps_small.png\" style=\"float:right;width:90px;height:90px;padding:20px\"/\u003e\n\nA PowerShell port of [httpunit](https://github.com/StackExchange/httpunit).\n\nThis is not a 100% accurate port of [httpunit](https://github.com/StackExchange/httpunit).\nThe goal of this module is to utilize `Net.Http.HttpClient` to more closely simulate a .Net client application.\nIt also provides easy access to the Windows Certificate store for client certificate authentication.\n\n## CI\n\n![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/cdhunt/httpunitps/powershell.yml?style=flat\u0026logo=github)\n[![Testspace pass ratio](https://img.shields.io/testspace/pass-ratio/cdhunt/cdhunt%3AhttpunitPS/main)](https://cdhunt.testspace.com/projects/67973/spaces)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/httpunitps.svg?color=%235391FE\u0026label=PowerShellGallery\u0026logo=powershell\u0026style=flat)](https://www.powershellgallery.com/packages/httpunitPS)\n\n![Build history](https://buildstats.info/github/chart/cdhunt/httpunitPS?branch=main)\n\n\n## Install\n\n`Install-Module -Name httpunitPS` or `Install-PSResource -Name httpunitPS`\n\n![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/httpunitps?color=%235391FE\u0026style=flat)\n\n## Docs\n\n[Full Docs](docs)\n\n### Config File\n\n[TOML](https://github.com/toml-lang/toml), YAML, JSON, and PSD1 formats are supported for the config file.\n\nEach `plan` can have:\n\n- `label` A label for documentation purposes.\n- `url` The URL to retrieve.\n- `ips` For http/https, a list of IPs to send the URL to. Default is \"use DNS\". Otherwise the connection is made to the IP address listed, ignoring DNS. Pass `'*'` to test all resolved addresses.\n- `code` For http/https, the expected status code, default 200.\n- `string` For http/https, a string we expect to find in the result.\n- `timeout` An optional timeout for the test in the format `\"hh:mm:ss\"`. Default is 3 seconds.\n- `certificate` For http/https, a path to a certificate in the Windows Store to pass as a Client Certificate. If just a Thumbprint is provided, it will look in `cert:\\LocalMachine\\My`.\n- `tags` An optional list of tags for the test. Used for when you want to only run a subset of tests with the `-tags` flag.\n- `insecureSkipVerify` Will allow testing of untrusted or self-signed certificates.\n- `plan.headers` For http/https, a list of keys and values to validate the response headers.\n\n#### A sample TOML config file\n\n```toml\n[[plan]]\n  label = \"google\"\n  url = \"https://www.google.com\"\n  code = 200\n  timeout = \"0:0:10\"\n  [plan.headers]\n  Server = \"gws\"\n```\n\n#### A sample YAML config file\n\n```yaml\nPlan:\n- code: 200\n  label: google\n  timeout: \"0:0:10\"\n  url: https://www.google.com\n  tags: [run]\n```\n\n### Test-SSLCertificate\n\nThe SSLCertificate commands may be moved to a separate module in the future.\n\n- [Get-SSLCertificate](docs/Get-SSLCertificate.md) _Get the SSL Certificate for given host._\n- [Show-SSLCertificateUI](docs/Show-SSLCertificateUI.md) _Displays a dialog box with detailed information about the specified x509 certificate._\n- [Test-SSLCertificate](docs/Test-SSLCertificate.md) _Test the validitiy of a given certificate._\n\n```powershell\nPS \u003e Get-SSLCertificate expired.badssl.com | Test-SSLCertificate -ErrorVariable validation\nFalse\n```\n\nValidation failures produces an error message.\n\n```text\nTest-SSLCertificate: Certificate failed chain validation:\nA required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.\n```\n\nInspect the [certificate chain](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509chain) inside the ErrorRecord.\n\n```powershell\nPS \u003e $validation.TargetObject.ChainElements.Certificate\nThumbprint                                Subject              EnhancedKeyUsageList\n----------                                -------              --------------------\n404BBD2F1F4CC2FDEEF13AABDD523EF61F1C71F3  CN=*.badssl.com, OU… {Server Authentication, Client Authentication}\n339CDD57CFD5B141169B615FF31428782D1DA639  CN=COMODO RSA Domai… {Server Authentication, Client Authentication}\nAFE5D244A8D1194230FF479FE2F897BBCD7A8CB4  CN=COMODO RSA Certi…\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdhunt%2Fhttpunitps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdhunt%2Fhttpunitps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdhunt%2Fhttpunitps/lists"}