[WIP] RF-39249 Add AI Test Generation Command#500
Open
sebaherrera07 wants to merge 2 commits intomasterfrom
Open
[WIP] RF-39249 Add AI Test Generation Command#500sebaherrera07 wants to merge 2 commits intomasterfrom
sebaherrera07 wants to merge 2 commits intomasterfrom
Conversation
178126b to
a9c1140
Compare
generate command for AI test generationgenerate command for AI test generation
7119044 to
7fa7b22
Compare
7fa7b22 to
4be863d
Compare
generate command for AI test generation4be863d to
c179fac
Compare
c179fac to
5ca079e
Compare
22f31f0 to
74bf734
Compare
74bf734 to
b696760
Compare
Add support for generating tests using AI through the CLI. The new `generate` command (with `gen` and `ai` aliases) accepts a natural language prompt and creates a test via the Rainforest API. Features: - Generate tests from natural language prompts - Support for --start-uri or --url to specify the starting point - Optional --title flag (defaults to prompt text) - Optional --download flag to save generated test as RFML - Optional --test-folder flag to specify download location - Optional --environment-id flag for test environment - Support for authentication via --credentials or --login-snippet-id (mutually exclusive) - Platform selection with --platform (defaults to windows11_chrome) - Validation for AI-supported browsers (windows10_chrome, windows11_chrome, windows11_chrome_fhd) - Comprehensive validation and error handling Example usage: rainforest generate "Log in with valid credentials" --start-uri /login rainforest generate "Add item to cart" --url https://example.com --download Files changed: - rainforest/tests.go: Add AITestRequest, AITestResponse structs, AISupportedBrowsers list, IsAISupportedBrowser helper, and CreateTestWithAI API method - rainforest/tests_test.go: Add comprehensive unit tests for AI generation - tests.go: Add generateAITest and parseAndValidateBrowser helper functions - tests_test.go: Add tests for generateAITest with various scenarios - rainforest-cli.go: Add generate command definition with all flags - README.md: Add documentation and examples for the new command
Update version constant and add CHANGELOG entry for the new `generate` command feature.
b696760 to
26f2e5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: still have to test it locally
Introduces AI-powered test generation to the Rainforest CLI, allowing users to create tests using natural language prompts.
New Commands
rainforest generate- Generate a new test from a natural language promptrainforest generate "Log in with valid credentials" --start-uri /loginKey Features
--start-urior--url(mutually exclusive)--title,--download,--environment-idflags--credentialsor--login-snippet-id(mutually exclusive)--platform(defaults towindows11_chrome)windows10_chrome,windows11_chrome,windows11_chrome_fhdImplementation Highlights
CreateTestWithAI()API methodVersion: 3.7.0