# generateSessionId

Canonical: <https://test-proxy-recorder.dev/docs/reference/api/functions/generatesessionid/>
Docs index: <https://test-proxy-recorder.dev/docs/> · All docs as one file: <https://test-proxy-recorder.dev/llms-full.txt>

---

> **generateSessionId**(`testInfo`): `string`

Defined in: [playwright/index.ts:160](https://github.com/asmyshlyaev177/test-proxy-recorder/blob/d1bacb3b39a3cf6f7f5a5391a8201868e4629861/packages/test-proxy-recorder/src/playwright/index.ts#L160)

Generate a session ID from test info
Uses titlePath to create folder structure with test file name
Supports both .spec.ts and .test.ts extensions
Example: ['jobs/Create.spec.ts', 'create a job'] becomes 'jobs/Create__create-a-job'
Example: ['users/Auth.test.ts', 'login test'] becomes 'users/Auth__login-test'

## Parameters

### testInfo

[`PlaywrightTestInfo`](/docs/reference/api/type-aliases/playwrighttestinfo/)

Playwright test info object

## Returns

`string`
