Skip to content

Conversation

rsrohit
Copy link
Owner

@rsrohit rsrohit commented Sep 1, 2025

Summary

  • expose BrowserStack session IDs from test executor for downstream use
  • provide CLI wrapper to run tests against BrowserStack
  • introduce GitHub Actions workflow that runs tests on BrowserStack and uploads video/log artifacts

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +21 to +36
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`);

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 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex fix comments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Testing

  • node --check backend/scripts/run-browserstack-tests.js
  • node --check backend/src/test-runner/test_executor.js

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant