Visual map — Ch.08 · ATF — proof
Suite HRLX Leave Core · BR1 · ACL · CS2
Automated evidence
Development
Full visual path (all chapters): VISUAL_FROM_SCRATCH_00_16.html
Studio-only from scratch: ATF runs in-instance after core app from chapters 01–02 exists.
Also open: Properties + Direct Links · Schema · Studio Create All Objects · Previous: 07 Reports
How ATF objects relate
Part 1 Suite groups Parts 2–4 individual tests (server BR1, client CS2, ACL isolation).
Rule 0 — Before any object (Application + Update Set + Studio)
Repeat these checks before creating or editing any application file. This section is also section 00 Update Set — create the capture set first.
- Application picker — top-right globe / application menu → select HR Leave (
x_786686_hr_leave). Never leave Global selected when creating scoped artifacts. - Update Set — All → System Update Sets → Local Update Sets → New:
After submit: open the record → click Make Current. Direct list: {BASE}/sys_update_set_list.doField Value Name HR Leave – BuildApplication HR Leave State In Progress Description Captures all HR Leave lab artifacts - Open Studio — {BASE}/$studio.do → confirm header shows HR Leave.
If artifacts land in Global scope, delete them and recreate under HR Leave. ACLs and events created globally will not behave correctly for this app.
Verify Update Set: Create a test Script Include in Studio → open HR Leave – Build → Related List Customer Updates shows the new file.
Part 1: Test Suite — HRLX Leave Core
Purpose
Container suite for all HR Leave automated tests.
Navigation path
Direct URL
Prerequisites
- Part 1: Application Setup. ATF plugin active.
Form fields
| Field | Value |
|---|---|
| Name | HRLX Leave Core |
| Application | HR Leave |
| Active | true |
Step-by-step create
- Test Suite → New → fill fields.
- After Parts 2–4: Related list Tests → Add all three tests.
- Run Suite → all green.
Verify checklist
- Suite lists three tests.
Demo / test
Run HRLX Leave Core suite after E2E seed → 3/3 pass.
Part 2: Test — BR1 Business Days (Server)
Purpose
Validates BR1 sets u_days_count = 5 for Mon–Fri range.
Navigation path
Prerequisites
- Part 8: BR1 active.
Form fields
| Field | Value |
|---|---|
| Name | HRLX BR1 Days Calculation |
| Application | HR Leave |
Step-by-step create
- ATF → Tests → New → Name: HRLX BR1 Days Calculation.
- Step 1: Create a Record → Table req_v2 → u_start_date=2026-06-01, u_end_date=2026-06-05, u_state=draft.
- Step 2: Run Server Side Script → assertion below.
Full script (assertion step)
(function(outputs, steps, stepResult, assertEqual) {
var gr = new GlideRecord('x_786686_hr_leave_req_v2');
gr.get(steps('Create a Record').record_id);
assertEqual({ name: 'days', expected: '5', actual: gr.getValue('u_days_count') });
})(outputs, steps, stepResult, assertEqual);
Verify checklist
- Test passes on clean instance.
Demo / test
Run test alone → green.
Part 3: Test — CS2 Form Days (Client)
Purpose
Client test: changing dates on form fills u_days_count via GlideAjax.
Navigation path
Prerequisites
- Part 13: CS2 active.
Form fields
| Field | Value |
|---|---|
| Name | HRLX CS2 Form Days |
Step-by-step create
- New client test: HRLX CS2 Form Days.
- Step: Open/New req_v2 form.
- Step: Set Field Values u_start_date, u_end_date.
- Step: Assert Field Value u_days_count equals 5.
Verify checklist
- Client test passes.
Demo / test
Run test → u_days_count populated.
Part 4: Test — ACL Employee Isolation (Server)
Purpose
Impersonate employee1 → query returns only own req_v2 records.
Navigation path
Prerequisites
- Part 4: ACLs (02).
Form fields
| Field | Value |
|---|---|
| Name | HRLX ACL Employee Isolation |
Step-by-step create
- Test: HRLX ACL Employee Isolation.
- Step: Impersonate user employee1.
- Step: Record Query req_v2 → assert count matches only own records.
Verify checklist
- Isolation test passes.
Demo / test
Add to suite Part 1 → run full suite.
ATF verify checklist
- Three tests in HRLX Leave Core suite.
- Suite runs without failure.