feat: Added support to set portrange for systemPort,mjpegServer,wdaLocalPort#1885
feat: Added support to set portrange for systemPort,mjpegServer,wdaLocalPort#1885saikrishna321 merged 4 commits intomainfrom
Conversation
Co-authored-by: SrinivasanTarget <srinivasan.sekar1990@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces support for specifying port ranges for system ports, WDA local ports, and MJPEG server ports in both Android and iOS device management to improve flexibility and avoid port conflicts.
- Added new plugin arguments (
systemPortRange,wdaLocalPortRange,mjpegServerPortRange) to allow users to specify custom port ranges - Updated device managers and capability management to use specified port ranges with fallback to defaults
- Enhanced the
getFreePorthelper to accept optional port ranges usinggetPort.makeRange
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/interfaces/IPluginArgs.ts | Added new port range arguments to the plugin interface |
| src/helpers.ts | Enhanced getFreePort function to support optional port ranges |
| src/device-utils.ts | Updated device allocation to pass port ranges to capability management |
| src/device-managers/AndroidDeviceManager.ts | Modified to use systemPortRange when allocating system ports |
| src/device-managers/IOSDeviceManager.ts | Updated to use wdaLocalPortRange and mjpegServerPortRange for iOS devices |
| src/CapabilityManager.ts | Enhanced capability functions to use port ranges with getPort.makeRange |
| package.json | Added schema definitions for the new port range arguments |
| test/unit/helpers.spec.ts | Added unit tests for the enhanced getFreePort function |
| test/unit/AndroidDeviceManager.spec.ts | Updated tests to verify systemPortRange usage |
| test/unit/IOSDeviceManager.spec.ts | Updated tests to verify port range usage and improved formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: SrinivasanTarget <srinivasan.sekar1990@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: SrinivasanTarget <srinivasan.sekar1990@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: SrinivasanTarget <srinivasan.sekar1990@gmail.com>
## [11.1.0](v11.0.8...v11.1.0) (2025-10-13) ### Features * Added support to set portrange for systemPort,mjpegServer,wdaLocalPort ([#1885](#1885)) ([67c3add](67c3add))
|
🎉 This PR is included in version 11.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This pull request introduces support for specifying port ranges for system ports, WDA local ports, and MJPEG server ports in both Android and iOS device management. This allows users to control which ports are allocated for device communication, improving flexibility and avoiding port conflicts. The changes update the capability and device manager logic to use these ranges, extend plugin arguments, and add tests to ensure correct behavior.
Port Range Support for Device Management
systemPortRange,wdaLocalPortRange,mjpegServerPortRange) toIPluginArgsand updated the schema inpackage.jsonto allow users to specify port ranges for device communication. [1] [2]AndroidDeviceManager.ts,IOSDeviceManager.ts) and their respective capability management functions to use the specified port ranges when allocating ports, falling back to defaults if not provided. [1] [2] [3] [4] [5] [6] [7] [8]Helpers and Utility Updates
getFreePorthelper to accept an optional port range, usinggetPort.makeRangewhen a range is provided.Testing Enhancements
Code Style Improvements
#1873