Enhance Ruby Testing Guide with setup and execution details#16805
Conversation
Expanded the Ruby Testing Guide to include local development setup, test running methods, and environment variables.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
titusfortner
left a comment
There was a problem hiding this comment.
This is great. A few comments and requests for clarification. Thanks!
- Added comprehensive Type Signatures with Steep section - Includes instructions for adding RBS files for new classes - Added guide for updating existing type signatures - Documented Steep commands for type checking - Added best practices and common RBS types reference table - Added RubyMine IDE setup instructions - Enhanced debugging section with Bazel and RSpec options - Added interactive REPL usage with bazel run //rb:console
luke-hill
left a comment
There was a problem hiding this comment.
Really good - lots of this is well documented and much easier to comprehend
- Add Bundler install command before `bundle install` (luke-hill) - Add Debugging section with `debug` gem and `rdbg` instructions, moved from trunk README#ruby (titusfortner)
Code Review by Qodo
Context used 1. Wrong BiDi env var
|
|
|
||
| # Run BiDi-specific tests | ||
| bazel test //rb/spec/integration/selenium/webdriver/bidi/... | ||
|
|
||
| ``` | ||
|
|
||
| ### Available Variables | ||
| ### Common Variables | ||
|
|
||
| | Variable | Purpose | Values | Example | | ||
| |----------|---------|--------|---------| | ||
| | --- | --- | --- | --- | | ||
| | `BIDI` | Enable BiDi protocol | `true`, `false` | `BIDI=true` | | ||
| | `WD_REMOTE_BROWSER` | Specify browser for remote tests | `chrome`, `firefox`, `edge`, `safari` | `WD_REMOTE_BROWSER=firefox` | |
There was a problem hiding this comment.
1. Wrong bidi env var 🐞 Bug ≡ Correctness
rb/TESTING.md instructs enabling BiDi with BIDI=true, but the Ruby spec harness actually checks ENV['WEBDRIVER_BIDI']; following the guide will not enable BiDi guards/websocket behavior.
Agent Prompt
### Issue description
`rb/TESTING.md` tells contributors to enable BiDi with `BIDI=true`, but the Ruby test harness keys off `WEBDRIVER_BIDI`.
### Issue Context
BiDi guard conditions and driver option wiring both check `ENV['WEBDRIVER_BIDI']`.
### Fix Focus Areas
- rb/TESTING.md[295-316]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| | Condition | Values | | ||
| | --- | --- | | ||
| | `browser` | `:chrome`, `:firefox`, `:edge`, `:safari`, `:safari_preview`, `:ie` | | ||
| | `driver` | `:remote` | | ||
| | `platform` | `:linux`, `:macos`, `:windows` | | ||
| | `headless` | `true`, `false` | | ||
| | `bidi` | `true`, `false` | | ||
| | `ci` | `true`, `false` | | ||
|
|
There was a problem hiding this comment.
2. Guard values don't match 🐞 Bug ≡ Correctness
The Guard Conditions table documents platform: :macos and ci: true/false, but the implementation uses Platform.os values like :macosx and Platform.ci values like :github/:jenkins/:appveyor (or nil); documented values will not match and guards will behave incorrectly.
Agent Prompt
### Issue description
The documented guard condition values for `platform` and `ci` don’t match the actual values provided to the guards.
### Issue Context
`platform` uses `Selenium::WebDriver::Platform.os` (e.g., `:macosx`), and `ci` uses `Selenium::WebDriver::Platform.ci` (e.g., `:github`).
### Fix Focus Areas
- rb/TESTING.md[100-112]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
User description
Expanded the Ruby Testing Guide to include local development setup, test running methods, and environment variables.
🔗 Related Issues
💥 What does this PR do?
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Documentation
Description
Expanded Ruby Testing Guide with local development setup instructions
Added comprehensive RSpec and Rake test execution methods
Introduced Code Style & Linting and Documentation generation sections
Enhanced Guards section with conditions table and debugging tips
Reorganized content for better clarity and workflow guidance
Diagram Walkthrough
File Walkthrough
TESTING.md
Comprehensive expansion of Ruby testing documentationrb/TESTING.md
bundle installinstructions
Bazel, RSpec, and Rake
examples
blocks