Skip to content
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

JSON/YAML schema for YAML based Citrus test source files #18

Closed
picimako opened this issue Jan 18, 2024 · 1 comment
Closed

JSON/YAML schema for YAML based Citrus test source files #18

picimako opened this issue Jan 18, 2024 · 1 comment
Assignees
Labels
feature A completely new feature
Milestone

Comments

@picimako
Copy link
Owner

picimako commented Jan 18, 2024

Summary

Citrus provides various DSLs besides Java to write tests, and one among them is YAML files.

Tasks

  • Implement a custom JSON schema provider for Citrus YAML test source files.
  • Such YAML files have to be recognized. That will be done based on the values specified in the citrus.yaml.file.name.pattern property of the citrus-application.properties.
    • If Custom citrus-application.properties files #17 is completed beforehand, custom configuration files must also be taken into account.
    • If the citrus.yaml.file.name.pattern property is not specified or is blank, then it will fall back to the Citrus defaults.
    • The file name patterns must be cached/indexed, and updated when the Citrus configuration file changes.
    • File name patterns that would match files with not .yml or .yaml extension should be excluded.
    • Optionally, for cases when the file name patterns are specified externally via the corresponding system property or environment variable, an option on the plugin settings UI could be introduced, so that users could customize/extend the list of YAML files to be recognized.
  • Schemas must be Citrus-version specific, so that the proper schemas could be provided for different Citrus versions.

Questions

Resources

@picimako picimako added the enhancement New feature or request label Jan 18, 2024
@picimako picimako changed the title XML schema for XML based Citrus test source files JSON schema for YAML based Citrus test source files Jan 19, 2024
@picimako picimako added feature A completely new feature and removed enhancement New feature or request labels Jan 28, 2024
@picimako picimako changed the title JSON schema for YAML based Citrus test source files JSON/YAML schema for YAML based Citrus test source files Jan 31, 2024
@picimako picimako self-assigned this Feb 6, 2024
@picimako picimako added this to the v1.0.6 milestone Feb 6, 2024
@picimako
Copy link
Owner Author

picimako commented Feb 8, 2024

Completed in v1.0.6 with the following caveats:

  • The file name pattern, for now, uses the default value of the citrus.yaml.file.name.pattern property with the addition of the .yml file extension: (test|it)\.(yaml|yml). That value is hardcoded for now, reading the aforementioned configuration property will happen later.
  • The 4.x schema contains schemas for test actions that are outside citrus-base, e.g. sql, plsql, selenium, etc., while the 3.x schema doesn't contain those.

yaml_test_case_schema

@picimako picimako closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A completely new feature
Projects
None yet
Development

No branches or pull requests

1 participant