You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6da4d4f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,28 +112,30 @@ The [`.claude-plugin/plugin.json`](./.claude-plugin/plugin.json) registers these
112
112
113
113
| Skill | What It Covers |
114
114
|---|---|
115
-
|[`testing-base-classes`](./coldbox/testing-base-classes/SKILL.md)| Testing class hierarchy, annotations (appMapping, configMapping, unloadColdBox), test harness setup, when to use each base class |
115
+
|[`testing-base-classes`](./coldbox/testing-base-classes/SKILL.md)| Testing class hierarchy, annotations (appMapping, configMapping, unloadColdBox), test harness setup, when to use each base class, including `BrowserTestCase`|
|[`testing-interceptor`](./coldbox/testing-interceptor/SKILL.md)| BaseInterceptorTest, the `interceptor` variable, mockController/mockRequestService/mockFlash, configProperties, announce point testing |
121
+
|[`testing-browser`](./coldbox/testing-browser/SKILL.md)|`BrowserTestCase` browser tests (BoxLang + bx-playwright): `browse()`, `routeURL()`/`visitRoute()`/`assertRouteIs()`, `loginAs()`/`logout()` with the BrowserTesting module and its security model, app server setup, CI |
Copy file name to clipboardExpand all lines: coldbox/testing-base-classes/SKILL.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: coldbox-testing-base-classes
3
-
description: "Use this skill to understand which ColdBox testing base class to extend for a given test type, configure test bundle annotations (appMapping, configMapping, unloadColdBox, loadColdBox, coldboxAppKey), set up the tests/ harness (Application.cfc, folder structure), or choose between integration testing (BaseTestCase), isolated handler testing (BaseHandlerTest), model unit testing (BaseModelTest), and interceptor unit testing (BaseInterceptorTest)."
3
+
description: "Use this skill to understand which ColdBox testing base class to extend for a given test type, configure test bundle annotations (appMapping, configMapping, unloadColdBox, loadColdBox, coldboxAppKey), set up the tests/ harness (Application.cfc, folder structure), or choose between integration testing (BaseTestCase), isolated handler testing (BaseHandlerTest), model unit testing (BaseModelTest), interceptor unit testing (BaseInterceptorTest), and real-browser testing of the running app (BrowserTestCase, BoxLang + bx-playwright)."
| Handler CFC in complete isolation (no app load) |`BaseHandlerTest`|
27
28
| A model/service/ORM entity in isolation |`BaseModelTest`|
28
29
| An interceptor CFC in isolation |`BaseInterceptorTest`|
30
+
| User journeys in a real browser against the running app (forms, JavaScript, sessions, named routes, `loginAs()`) |`BrowserTestCase` (see `coldbox-testing-browser`) |
29
31
| Any CFML/BX component with no ColdBox app |`BaseSpec` (TestBox) |
30
32
31
33
---
@@ -237,6 +239,27 @@ class extends="coldbox.system.testing.BaseInterceptorTest"
237
239
238
240
---
239
241
242
+
## BrowserTestCase (Real Browser)
243
+
244
+
`BrowserTestCase` (BoxLang only, needs bx-playwright and TestBox 7.2+) still loads the app virtually like `BaseTestCase`, and drives a real browser against your **running** server. Extra annotations: `baseURL` (the running app) and `browserProfile` (bx-playwright profiles). It adds `browse()`, the TestBox browser matchers, and the ColdBox helpers `routeURL()`, `visitRoute()`, `assertRouteIs()`, `loginAs()` and `logout()`. Without bx-playwright its browser specs are skipped, not failed. Full guide: the [`coldbox-testing-browser`](../testing-browser/SKILL.md) skill.
245
+
246
+
```boxlang
247
+
class extends="coldbox.system.testing.BrowserTestCase" appMapping="/root" baseURL="http://127.0.0.1:8080" {
0 commit comments