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
-[5. BCSS Project Specific Utilities](#5-bcss-project-specific-utilities)
51
51
-[Contributing](#contributing)
52
52
-[Contacts](#contacts)
53
53
-[Licence](#licence)
@@ -90,26 +90,18 @@ This step tells your terminal to use the Python version and packages inside .ven
90
90
91
91
On Windows (Command Prompt):
92
92
93
-
`.venv\Scripts\activate`
93
+
`.venv/Scripts/activate`
94
94
95
95
On Windows (PowerShell):
96
96
97
-
`.venv\Scripts\Activate.ps1`
97
+
`.venv/Scripts/Activate.ps1`
98
98
99
99
On macOS/Linux:
100
100
101
101
`source .venv/bin/activate`
102
102
103
103
Once activated, your terminal will show the virtual environment name (e.g. (.venv)), indicating you're working inside it.
104
104
105
-
#### 3. Install Playwright browser binaries
106
-
107
-
Playwright uses real browsers to run tests. You’ll need to install these browser binaries once by running:
108
-
109
-
`playwright install`
110
-
111
-
This downloads the necessary versions of Chromium, Firefox, and WebKit so tests can run across different browser types.
112
-
113
105
### Installation & Configuration
114
106
115
107
#### 1. Install Dependencies
@@ -127,7 +119,7 @@ Note: If you're using a virtual environment (recommended), activate it before ru
127
119
128
120
#### 2. Environment Variables
129
121
130
-
Create a `.env` file in the project root to store sensitive configuration values like credentials, URLs, or feature flags. Example:
122
+
Create a `local.env` file in the project root, by running `setup_env_file.py`, to store sensitive configuration values like credentials, URLs, or feature flags. Example:
131
123
132
124
```Bash
133
125
BASE_URL=https://bcss.example.com
@@ -136,8 +128,8 @@ PASSWORD=secure_password123
136
128
```
137
129
138
130
These variables are loaded automatically by the framework using `python-dotenv`, keeping secrets out of the codebase.
139
-
The actual values required for the `.env` file can be obtained from one of the testers already using this framework.
140
-
Important Note: Ensure that `.env` is added to your `.gitignore` to avoid accidentally committing secrets.
131
+
The actual values required for the `local.env` file can be obtained from one of the testers already using this framework.
132
+
Important Note: Ensure that `local.env` is added to your `.gitignore` to avoid accidentally committing secrets.
141
133
142
134
#### 3. Test Configuration
143
135
@@ -210,10 +202,10 @@ Each test typically follows this structure:
This blueprint provides the following utility classes, that can be used to aid in testing:
329
+
This project was built on the existing NHS England Playwright Python Blueprint. The blueprint provides the following utility classes, that can be used to aid in testing:
|[Appointments Utility](.docs/utility-guides/Appointments.md)| Automates appointment slot setup for multiple practitioners at a screening centre, including calendar navigation and slot configuration. |
345
+
|[Batch Processing Utility](.docs/utility-guides/BatchProcessing.md)| Provides a one-stop function to process batches end-to-end, including preparation, printing, subject verification, and archive confirmation. |
346
+
|[Calendar Picker](.docs/utility-guides/CalendarPicker.md)| Provides methods to interact with BCSS’s three distinct calendar types |
347
+
|[Dataset Field Utility](.docs/utility-guides/DatasetField.md)| Dynamically locates and populates input/select fields based on label text, supporting both flat and nested dataset structures. |
348
+
|[Fit Kit Utility](.docs/utility-guides/FitKit.md)| Provides methods to generate FIT device IDs, split test kits into normal/abnormal groups, and simulate compartment 3 workflows. |
349
+
|[Investigation Dataset Utility](.docs/utility-guides/InvestigationDataset.md)| Automates the completion and progression of investigation datasets based on subject age and result type, with support for custom field values. |
350
+
|[Last Test Run](.docs/utility-guides/LastTestRun.md)| Tracks when specific tests were last executed to avoid redundant setups and enable “run once per day” logic. |
351
+
|[Load Properties](.docs/utility-guides/LoadProperties.md)| Loads key-value pairs from `.properties` files to centralize configuration and avoid hard-coded values in tests. |
352
+
|[Manual Cease Workflow](.docs/utility-guides/ManualCease.md)| Automates subject creation, UI interaction, and DB verification for manual cease flows, including disclaimer handling. |
353
+
|[NHS Number Tools](.docs/utility-guides/NHSNumberTools.md)| Validates NHS numbers and formats them for display or input, ensuring compliance with NHS standards. |
354
+
|[Notify Criteria Parser](.docs/utility-guides/NotifyCriteriaParser.md)| Parses compact Notify filter strings (e.g. "S1 (S1w) - sending") into structured components for use in selection builders and SQL queries. |
355
+
|[Oracle Utility](.docs/utility-guides/Oracle.md)| Provides direct access to Oracle DB for querying, executing stored procedures, and generating synthetic test subjects. |
356
+
|[PDF Reader](.docs/utility-guides/PDFReader.md)| Extracts NHS numbers from PDF documents by scanning for "NHS No:" markers, returning results as a pandas DataFrame. |
357
+
|[Screening Subject Page Searcher](.docs/utility-guides/ScreeningSubjectPageSearcher.md)| Provides methods to search for subjects by NHS number, name, DOB, postcode, and status, and verify event status directly from the UI. |
358
+
|[Subject Demographics](.docs/utility-guides/SubjectDemographics.md)| Updates subject demographic data such as DOB and postcode, with support for randomized age ranges and direct field manipulation. |
359
+
|[Subject Notes](.docs/utility-guides/SubjectNotes.md)| Verifies note content against database and UI, and confirms proper archiving of removed notes as obsolete. |
360
+
|[Subject Selection Query Builder](.docs/utility-guides/SubjectSelectionQueryBuilder.md)| Dynamically builds SQL queries to retrieve subjects based on screening status, demographics, Notify messages, and more. |
361
+
|[Table Utility](.docs/utility-guides/TableUtil.md)| Provides helper methods for interacting with HTML tables, including row selection, column indexing, and data extraction. |
362
+
|[User Tools](.docs/utility-guides/UserTools.md)| Manages test user credentials via `users.json`, supports login automation, and retrieves user metadata for role-based testing. |
363
+
346
364
### Contributing
347
365
348
366
Further guidance on contributing to this project can be found in our [contribution](./CONTRIBUTING.md) page.
0 commit comments