-
Notifications
You must be signed in to change notification settings - Fork 0
Add BrowserStack pipeline and session artifact capture #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments
to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
const sessionId = await executeTest( | ||
path.resolve(appPath), | ||
rawStepsText, | ||
{ to: () => ({ emit: () => {} }) }, | ||
'cli', | ||
aiService, | ||
'browserstack', | ||
platform, | ||
deviceName, | ||
osVersion, | ||
); | ||
|
||
console.log(`BrowserStack session ID: ${sessionId}`); | ||
|
||
if (process.env.GITHUB_OUTPUT) { | ||
fs.appendFileSync(process.env.GITHUB_OUTPUT, `session_id=${sessionId}\n`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Fail the CLI when test execution fails
The new BrowserStack runner awaits executeTest
and then exits successfully regardless of whether the test actually passes. executeTest
catches all exceptions and resolves (lines 581‑585 in test_executor.js
), so when a test fails the function returns null
or an unfinished session ID but never rejects. As a result, the Run BrowserStack tests
job will report success and still emit a session ID even when the underlying test suite failed, letting CI pipelines go green erroneously. The script should treat a missing/failed run as an error—either by propagating the exception from executeTest
or by checking its result and exiting with a non‑zero code—so that workflow failures surface in CI.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
- Added a safeguard in the BrowserStack runner to exit with an error when no session ID is returned, ensuring CI reports failures correctly backend/scripts/run-browserstack-tests.jsL21-L42
Testing
- ✅
node --check backend/scripts/run-browserstack-tests.js
- ✅
node --check backend/src/test-runner/test_executor.js
Summary
Testing
node --check backend/scripts/run-browserstack-tests.js
node --check backend/src/test-runner/test_executor.js
https://chatgpt.com/codex/tasks/task_e_68b599c569d08329baf0f771fa51f1de