Terminal settings
Control how Test Companion interacts with your IDE’s integrated terminal, including shell integration timeout and terminal reuse behavior.
Terminal settings control how Test Companion interacts with your IDE’s integrated terminal. These options affect command execution timing and terminal window management. Most users can leave these at their default values, but they are available for troubleshooting specific terminal integration issues.
How to open settings
-
Click the gear icon (âš™) in the top-right corner of the Test Companion panel.

-
Select the Terminal Settings tab.

- Make the necessary changes and click Save to apply them.
- Click Cancel to discard any unsaved changes.
Shell integration timeout (seconds)
When Test Companion needs to run a terminal command (like npm test or pytest), it first establishes a connection with the terminal’s shell integration layer. This integration allows the extension to detect when a command starts, when it finishes, and what the output is. The timeout value determines how long the extension waits for this connection to be ready.
| Setting | Details |
|---|---|
| Field type | Number input |
| Default value | 4 |
| What it does | Sets how many seconds Test Companion waits for the terminal’s shell integration to activate before executing commands. |
When to increase this value
If you experience issues where Test Companion’s terminal commands seem to fail or time out without producing output, it may be because the shell integration is taking longer than 4 seconds to activate. This can happen when:
- Your shell startup scripts (
.bashrc,.zshrc, etc.) perform slow operations like loading NVM, RVM, or conda environments - You are using a remote development setup (SSH, WSL, or a remote container) where the network adds latency
- Your machine is under heavy load and shell startup is slower than usual
In these situations, try increasing the timeout to 8 or 10 seconds.
When to decrease this value
If your shell starts up very quickly and you want Test Companion to move faster, you can reduce this value. A value of 2 seconds works well on machines with fast shell startup and no heavy initialization scripts.
Enable aggressive terminal reuse
By default, Test Companion tries to reuse terminal instances to keep your terminal panel clean and avoid accumulating dozens of open terminal tabs during a long session. With this option enabled, the extension may reuse a terminal that is open in a different directory — it simply navigates to the correct directory before running the command.
| Setting | Details |
|---|---|
| Field type | Checkbox |
| Default value | Enabled (checked) |
| What it does | When enabled, Test Companion reuses existing terminal windows that are not in the current working directory, rather than creating new ones. |
When to disable this
If you notice issues with task lockout after a terminal command, try disabling this setting. Task lockout can occur when the extension reuses a terminal that is in the middle of a long-running process (like a development server) and cannot send new commands to it.
Disabling this setting makes Test Companion create a new terminal for each command when no idle terminal is available in the correct directory. This is safer but may result in more terminal tabs.
Example scenario
You have a terminal running npm run dev (a long-running development server). With aggressive terminal reuse enabled, Test Companion might try to reuse that terminal tab for a new command, which could interrupt the server. With aggressive terminal reuse disabled, it creates a fresh terminal tab instead, leaving the server running.
Troubleshoot terminal issues
If commands are failing silently or producing unexpected results, try these steps in order:
- Increase the shell integration timeout to 8-10 seconds and try again.
- Disable aggressive terminal reuse to rule out conflicts with running processes.
- Close all terminal tabs in VS Code and start a fresh task.
-
Check your shell startup scripts for errors or slow operations. Try running
time zsh -i -c exit(ortime bash -i -c exit) in an external terminal to measure your shell startup time.
If none of these steps resolve the issue, reach out to BrowserStack support with your shell startup time, operating system details, and the error messages you see (if any).
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!