-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Enhancement] custom metadata support for testcases and keywords #5495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[Enhancement] custom metadata support for testcases and keywords #5495
Conversation
- Add support for custom metadata tags in test cases and keywords - Include test file with examples of custom metadata usage - Enhance parsing and model handling for custom metadata - Update XML schema and output generation for metadata support
…us/robotframework into feature/custom-metadata-enhancements
- Introduced `CustomMetadata` setting in RobotSettings. - Updated parsing and lexing logic to validate custom metadata. - Enhanced command-line options to specify allowed custom metadata names. - Modified relevant classes and methods to accommodate custom metadata.
…ting documentation
…ve initialization in transformers and model classes; update tests to accommodate changes in metadata structure.
…ing names and updating documentation for command line options
…mprove validation checks, and ensure consistent initialization across settings and builders.
- Implement tests for custom metadata in the TestSuiteBuilder, covering basic filtering, keywords, special values, case sensitivity, and integration with FileSettings. - Create tests for custom metadata modifiers, including access and modification during pre-run and execution phases, complex filtering, and error handling. - Develop tests for UserKeyword custom metadata, ensuring handling of various data types, normalization, and integration. - Validate custom metadata behavior with embedded arguments, setup/teardown, and keyword binding.
|
Just my 2cts on the syntax choice. I get the appeal of that syntax but it has too many flaws to be considered a good choice:
to it does not make a lot of sense to break that pattern for metadata and have something like this: to |
|
Hello @Bouska , thank you for the valuable feedback! Typos have caused some discussion when developing this feature. Originally, the most popular opinion has been to let fail, when it has custom metadata. You would have to provide a list of all custom metadata at launch so that typos may be prevented: That approach has been altered for the opinion that metadata should be only metadata and not influence the default execution. Also, the use cases we know want to provide many custom metadata pairs. Adding them on CLI would not be feasible. I like your highlight on typo management, compatibility and least surprise. Do you have an idea how to satisfy all expectations? |
|
I really would like to see this merged as it would help us to store custom Zephyr Scale related metadata directly in the tests. |
I would go for the following: So it is a mirror on how |
Custom Metadata Feature
Closes #4409
Overview
Introduces custom metadata feature for test cases and user keywords. The implementation allows users to define metadata for both test cases and keywords using the
[CustomName]syntax.Implementation Details
[Owner],[Requirement],[My Custom Metadata]) is now treated as custom metadata.[UndefinedSetting]) will now treat these as valid custom metadata.CLI Functionality:
--custommetadataFlag--custommetadataflag allows users to filter which custom metadata keys are considered "valid" for display and parsing in output files.Test Coverage
--custommetadataNotable Changes
Summary
This feature allows users to create tests and keywords with metadata they need. Custom metadata values support the same formatting as settings metadata (
*bold*,_italic_,`code`), variable resolution, multi-line content, etc. The--custommetadataflag provides control over output, without affecting test execution.Usage Examples
Basic Custom Metadata
Variable Resolution
Text Formatting
Inline Python Evaluation
Keyword Metadata
CLI Filtering Examples