Commit 45bf325
authored
Accept hyphens in TestingBotSessionID so modern session ids resolve (#39)
* Accept hyphens in TestingBotSessionID so modern session ids resolve
Modern TestingBot / W3C WebDriver session ids are hyphenated (e.g.
b0dbacacfa63-342d529ca760-...). The extraction pattern was
TestingBotSessionID=([A-Za-z0-9]+), which stopped at the first hyphen and
captured only the leading segment.
That truncated id 404s against the TestingBot REST API (the full id maps to an
internal test id) and, because getAuthenticationHash() then hashes the wrong
string, the embedded mini iframe and share links break too. Net effect: every
embedded report, Build page and GitHub-checks summary silently failed for real
sessions.
Widen the character class to [A-Za-z0-9_-]+ and add TestingBotSessionIdParsingTest
covering hyphenated, plain, multiple and no-match inputs.
* Cover underscore in session-id parsing test
The pattern allows [A-Za-z0-9_-]+; add an underscore-containing id (abc_def-123)
to capturesMultipleSessionIds so the underscore branch of the character class is
exercised alongside the hyphenated ids.1 parent b8923cb commit 45bf325
2 files changed
Lines changed: 47 additions & 1 deletion
File tree
- src
- main/java/testingbot
- test/java/testingbot
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments