Verify Serial Studio is running with API enabled. Sessions-scoped so the check runs once per pytest invocation.
()
| 22 | |
| 23 | @pytest.fixture(scope="session") |
| 24 | def serial_studio_running(): |
| 25 | """ |
| 26 | Verify Serial Studio is running with API enabled. |
| 27 | |
| 28 | Sessions-scoped so the check runs once per pytest invocation. |
| 29 | """ |
| 30 | client = SerialStudioClient() |
| 31 | |
| 32 | try: |
| 33 | client.connect() |
| 34 | client.disconnect() |
| 35 | return True |
| 36 | except ConnectionError: |
| 37 | pytest.fail( |
| 38 | "Serial Studio is not running or API Server is not enabled.\n" |
| 39 | "Please:\n" |
| 40 | " 1. Start Serial Studio\n" |
| 41 | " 2. Enable API Server (Settings > Miscellaneous > Enable API Server)\n" |
| 42 | " 3. Ensure it's listening on port 7777" |
| 43 | ) |
| 44 | |
| 45 | |
| 46 | @pytest.fixture |
nothing calls this directly
no test coverage detected