Skip to content

Arjuna 0.9.6

Pre-release
Pre-release
Compare
Choose a tag to compare
@rahul-verma rahul-verma released this 09 Mar 15:38

This build has significant updates in Configuration introducing very powerful features and simplicity. It also has the Localizer features. Also, added are the C, L and R magic functions.

  • Localizer
    • Added built-in support for JSON based localization.
    • Excel and JSON Localizers are automatically loaded and merged into a single Contextual Data Reference
    • Change ArjunaOption.LOCALE to ArjunaOption.L10_LOCALE.
    • Added ArjunaOption.L10_STRICT property. By default it is set to False. It means for references with no localization data, no error is raised and reference itself is returned by L function.
    • bucket can be provided as an argument or as a prefix bucket.
  • Json class
    • Added Json class with jsonpath support.
    • Added jsonpath-rw and jsonpath-rw-ext as dependencies.
  • Easy Aliases (L/R/C)
    • The L function is alias for Arjuna.get_localized_str.
    • The C function is alias for Arjuna.get_config_value.
    • The R function is alias for Arjuna.get_dataref_value
  • Config Simplification
    • Arjuna automatically looks up Arjuna options and then user options for a name. This does away with the need for config.arjuna_options.value and config.user_options.value. Relaced with config.value call.
    • New config creation made simpler. RunContext is now an internal concept.
    • Docs updated.
    • . and [] retrieval mechanisms added to config object. For a given name, one can use config.name or config[name] or config.value(name)` calls interchangeably.
    • All arjuna options and user options become automatically available with . and [] lookup.
    • Arjuna.get_config gives reference config by default. If conf name is passed, then that named config object is returned.
    • The C function supports config query format i.e. a.b.c will attempt to treat a as a configuration name.
    • Many ArjunaOptions have been renamed to simpler, shorter names.
  • request object enhanced
    • request.config is by default set to reference config at the top level. Can be retrieved at any child layer.
    • request.get_config without name as argument is same as request.config
    • request.get_config(name) gets any configuration registered with that name from anywhere in the run including environment configurations.
  • RunContext and ConfigCreator Concept
    • RunContext as a concept is deprecated.
    • _ConfigCreator Name changed to ConfigBuilder
    • ConfigBuilder is directly associated with a Config object, which is automatically treated as the source/parent config.
    • One can not create a configuration with same name again.
    • Builder has the provision to add config options from any conf file which has arjunaOptions and/or userOptions
    • creator.register without a name creates a unique config name using uuid4. As it returns the config object it has its use case when direct dealing with config object is needed.
    • create.register(name) is useful if the name is to be controlled and used by test author.
  • Configuration Layer-wise auto-update:
    • Reference Config is updated as per following sequence:
      • Arjuna central config
      • Project conf
      • Named env conf if provided
      • Run Conf if provided
      • CLI Options
    • Any new custom configuration is updated as per following sequence:
      • Parent Conf (by default it is the Reference Configuration)
      • Programmatic additions
      • Named env conf if provided
      • Run Conf if provided
      • CLI Options
  • Data References
    • Arjuna.get_dataref_value method added for easy and simplified value retrieval for a context from a data reference.
    • Simple query format created. Query can be a refname or context.refname or bucket.context.refname.
  • Environment Config
    • Any number of configurations for named environments can be created.
    • The configurations are loaded by Arjuna automatically.
    • Programmatically any config can be referred any time.
    • One can provide --run-env CLI switch which picks up the env config. This superimposes this env config on the reference config itself.
    • Doc added.
  • New CLI Configuration Switches
    • Added -ao/--arjuna-option and -uo/--user-option. These switches can be supplied multiple times to add any number of Arjuna options or user options. These will override all options set by any other means in Arjuna.
    • --run-env switch as mentioned above.
    • --run-conf: Any configuration file's absolute path can be provided. This is is superimposed on the reference config.
  • Example projects and Docs
    • All example code and projects verified.
    • Split the core project into arjuna_start, arjuna_config, arjuna_data and arjuna_l10 projects.
    • Reorganized docs into smaller, focused contents.