|
|
|
@@ -19,6 +19,7 @@ The `tests/` IIS application assumes the repository layout keeps `tests/`, `publ |
|
|
|
| Create | `tests/component/web.config` | Mirrored config for nested component pages that load config-aware code | |
|
|
|
| Create | `tests/integration/web.config` | Mirrored config for nested integration pages that load config-aware code | |
|
|
|
| Create | `tests/sync-webconfigs.vbs` | Utility script to mirror `tests/web.config` into nested test folders | |
|
|
|
| Create | `tests/run-tests.cmd` | Windows helper to sync configs and open the test runner URL | |
|
|
|
| Create | `tests/bootstrap.asp` | Shared test bootstrap and runtime reset helpers | |
|
|
|
| Create | `tests/PlainRunnerTheme.asp` | Local runner theme that removes CDN dependence from the test UI | |
|
|
|
| Create | `tests/support/HttpCaptureHelpers.asp` | Shared HTTP capture helpers for rendered-page assertions | |
|
|
|
@@ -33,6 +34,7 @@ The `tests/` IIS application assumes the repository layout keeps `tests/`, `publ |
|
|
|
| Create | `tests/integration/TestRoutes.asp` | Route-helper/config integration coverage | |
|
|
|
| Create | `tests/integration/TestConfigSettings.asp` | Nested config and fallback behavior coverage | |
|
|
|
| Create | `tests/integration/TestRenderedOutput.asp` | Production-page output assertions through safe HTTP capture | |
|
|
|
| Create | `tests/integration/TestSharedLayout.asp` | Shared header/footer/layout assertions against rendered production pages | |
|
|
|
| Reference | `public/web.config` | Source of mirrored config keys for the test app | |
|
|
|
| Reference | `core/helpers.asp` | Helper functions and config-loading behavior under test | |
|
|
|
| Reference | `core/mvc.asp` | Dispatcher behavior used by the smoke test | |
|
|
|
@@ -49,6 +51,7 @@ The `tests/` IIS application assumes the repository layout keeps `tests/`, `publ |
|
|
|
6. If you change `tests/web.config`, run `cscript //nologo tests\sync-webconfigs.vbs` to refresh the nested copies used by the unit, component, and integration pages. |
|
|
|
7. If your production app is not served from the same host root as the `tests/` app, set `ProductionAppBaseUrl` in `tests/web.config` and re-run the sync script so rendered-output tests know where to send HTTP requests. |
|
|
|
Example: `http://localhost/` for a root site, or `http://localhost/MyClassicApp/` for a virtual-directory app. |
|
|
|
8. To sync configs and open the suite in one step on Windows, run `tests\run-tests.cmd` with an optional runner URL argument. |
|
|
|
|
|
|
|
Example layout: |
|
|
|
|
|
|
|
@@ -84,12 +87,25 @@ http://localhost/tests-dev/run-all.asp |
|
|
|
|
|
|
|
aspunit renders a UI in runner mode and loads each registered page with `?task=test` behind the scenes. |
|
|
|
|
|
|
|
On Windows you can also use: |
|
|
|
|
|
|
|
```bat |
|
|
|
tests\run-tests.cmd |
|
|
|
``` |
|
|
|
|
|
|
|
Or with an explicit runner URL: |
|
|
|
|
|
|
|
```bat |
|
|
|
tests\run-tests.cmd http://localhost:8085/run-all.asp |
|
|
|
``` |
|
|
|
|
|
|
|
## Adding a New Test Page |
|
|
|
|
|
|
|
1. Choose the right folder: |
|
|
|
- `tests/unit/` for deterministic helper or registry tests |
|
|
|
- `tests/component/` for direct controller/object tests with controlled setup |
|
|
|
- `tests/integration/` for narrow runtime smoke coverage, config behavior, or rendered-page capture |
|
|
|
- `tests/integration/` for narrow runtime smoke coverage, config behavior, or rendered-page capture |
|
|
|
- shared layout assertions belong here too, because they verify rendered production responses rather than isolated helper behavior |
|
|
|
2. Create a new `.asp` file that: |
|
|
|
- includes `../aspunit/Lib/ASPUnit.asp` |
|
|
|
- includes `../bootstrap.asp` |
|
|
|
@@ -120,6 +136,7 @@ aspunit renders a UI in runner mode and loads each registered page with `?task=t |
|
|
|
- Helper, registry, component, and integration suites all execute. |
|
|
|
- Route-helper/config integration assertions execute from the same isolated IIS app. |
|
|
|
- Rendered-page capture assertions can verify production HTML and status codes without polluting aspunit JSON responses. |
|
|
|
- Shared layout assertions can verify navbar, asset links, titles, and footer script presence across production-rendered pages. |
|
|
|
- Re-running the suite produces stable results. |
|
|
|
- The production site under `public/` still exposes no test runner pages or test routes. |
|
|
|
|
|
|
|
|