Skip to content

Releases: rahul-verma/arjuna

Arjuna 1.0.0

12 May 06:09
Compare
Choose a tag to compare

This is the first production ready of Arjuna. Following are the changes since last release:

  • New CLI switches -ip, -ep for package based selection added.
  • Support for ir (inclusion rules) and er (exclusion rules)
    • Exclusion rules are evaluated. If a test function meets any of the rules, it is removed from collection.
    • If the test function meeting any of the inclusion rules, it is included in the collection.
    • --rule changed to -ir and -er to add provision for include and exclude rules via CLI. Used for magic group creation.
    • ir and er sections can be added in a group definition in groups.yaml file.
    • Internally, the ip/ep/im/em/it/et are converted to to ir/er rules. This means Arjuna is not using pytest markers for test selection. All selection is done based on Arjuna rule set.
    • There is an AND condition between package, module and test rules.
    • PytestHooks.select_tests hook created to select tests based on Arjuna rules. Called in pytest_collection_modifyitems pytest hook in conftest.py.
    • Rules are also supported for user defined attributes.
  • New symbols for rule creation:
    • For string targets: !~= for does not match and !*= does not partially match.
  • Arjuna built-in group fixture is now a default fixture. Group information is directly available in request.group. request.group.space can be used to store any objects.
  • GuiApp's GuiNamespace acts a common namespace across pages, sections and dialogs.
  • All run options work with the rule-based approach.
  • Support for minimalist project structure for simple use of Arjuna.
  • Test Fixtures --> Referred as Test Resources. Have an option setting as default using default keyword argument.
  • Support for xfail and skip keyword arguments in @test decorator. xfail() and skip() helper functions added.
  • New Exceptions:
    • TestDecoratorError
    • TestSessionsFileNotFoundError
    • TestStagesFileNotFoundError
    • TestGroupsFileNotFoundError
  • Test function default info, tags, bugs, envs get created for inquiry using request.
  • Fix in updating options from non-default env entry in envs.yaml.
  • Fix to allow a user option name as an Enum constant.
  • Fix in auto screenshot in case of failure in HTML report.
  • Docs added for:
    • Test Functions
    • Test Resources
    • Test Sessions, Stages and Groups
  • PytestHooks made a private API.

Arjuna 0.9.24 Beta

28 Apr 05:51
Compare
Choose a tag to compare
Arjuna 0.9.24 Beta Pre-release
Pre-release
  • Critical Fixes:
    • dry_run and report format CLI defaults.
  • create-project command changed and fixed as per new project structure for config yamls.
  • CLI Updates
    • Logging switches -dl and -ll moved inside the commands.
    • -o and --dray-run show the allowed enum constants as choices.
  • Doc updates:
    • CLI doc.
    • Configuration doc.
    • Test Project doc.

Arjuna 0.9.23 Beta

27 Apr 12:53
Compare
Choose a tag to compare
Arjuna 0.9.23 Beta Pre-release
Pre-release

This build fully implements the concept of Test Session, Stage and Group. These concepts are aligned in the .yaml conf files as well as the CLI.

Important: create-project command needs to be updated to create newly expected files in a new project.

  • Test Groups
    • are defined groups.yaml file.
    • A group can be run from the command line.
  • Test Stages
    • are defined in stages.yaml file.
    • use include: and provide list of group names.
    • A stage can be run from command line.
  • Test Sessions
    • are defined in sessions.yaml file.
    • use include: and provide list of stage names.
    • A session can be run from command line.
  • CLI enhancements:
    • run-stage command added. Using it you can directly run a defined test stage.
    • run-group command added. Using it you can directly run a defined test group.
  • New Named Exceptions:
    • UndefinedTestStageError, InvalidTestStageDefError
    • UndefinedTestGroupError
  • CLI update
    -o, -im, -em, -it, -et switches changed from plural switches expecting nargs to multi-switch method. This means these switches are single-arg switches and can be used in command line any number of times.

Arjuna 0.9.22 Beta

24 Apr 18:15
Compare
Choose a tag to compare
Arjuna 0.9.22 Beta Pre-release
Pre-release
  • Moved all types of configurations to YAML.
  • Simplified internal configuration process.
  • Single file for each of the following:
    • Data configurations
    • Environment Configurations
    • Session Configurations
  • New Named Exceptions:
    • UndefinedTestSessionError
    • InvalidTestSessionDefError

Arjuna 0.9.21 Beta

22 Apr 17:25
Compare
Choose a tag to compare
Arjuna 0.9.21 Beta Pre-release
Pre-release

This build has significant feature updates including data/env confs concept finalization, run-session command & basic session.yaml structure support, multi-threading support for groups in session definition, introduction of Arjuna hooks and a major CLI revamp.

  • Data Conf and Env conf concepts updated
    • In a test project, you can define any number of data confs and/or env confs. These are auto-loaded.
    • The configuration name for them are the file names (minus the .conf extension.)
    • Arjuna looks for data.conf and env.conf and updates the reference configuration, if these files exist.
    • Arjuna also generates confs for all combinations of run confs and env confs when it loads. For each combination:
      • Ref config is taken as base
      • data conf is superimposed
      • env conf is superimposed
      • CLI options are superimposed
    • The config name is set to runconfname_envconfname e.g. run1_env1.
    • The name can be used in the magic C function query or as the cname argument.
  • Fixtures now allow drive_with argument.
  • -c / --conf switch added. It becomes the conf object mapped to conf.
  • Arjuna Session, Stage and Test Grouping concept added:
    • run-project and run-selected represent a default session, stage and group as per the CLI switches. It always executes in a single thread.
    • Built-in fixture group can be included in a test signature or fixture signature. It yields group parameters including name of group, thread name and configuration.
    • pytest_generate_tests hook added to test project conftest.py, its Arjuna template and added PytestHooks.configure_group_for_test
      • Auto-parameteries "group" built-in Arjuna fixture. The fixture can be added to a test function signature or any of its fixtures. Configuration passed with -c switch is used to parameterize the group fixture mentioned above.
      • It is optional to use this fixture. However, if group related information (e.g. thread name, group name) is needed run time in fixture functions and test functions, then it can be used.
    • run-session switch added to run a named session.
    • Basic session.yaml support added. Supports stages and groups.
      • A session can have multiple stages.
      • Stages are always executed sequentially.
      • A stage can have any number of groups.
      • Stage can have groups run in parallel with its threads setting. Default is 1.
      • A group has a unqiue and it defines pickers. It also can have a conf associated with it.
      • Each group is run in a thread.
      • If conf is defined for a group, the reference configuration is changed to this conf for this group run.
      • Each group is reported separately in a .html and .xml file.
  • Dry Run Major enhancement
    • Not a boolen switch any more
    • Takes SHOW_TESTS/SHOW_PLAN/RUN_FIXTURES arguments.
  • Arjuna Hooks concept added
    • hook directory in project root directory will contain various Arjuna hook modules and corresponding hook calls.
    • arjuna_config.py is the name for configuration hooks.
      • register_configs(configurator) is the first Arjuna hook created
      • One can programmatically register any number of configurations by taking existing or these newly created configuration objects as basis.
      • The hook is executed before sessions file is processed or test execution starts for a non-session run.
      • The configurations created here can be used with -c / --conf command line switch. They can also be used as group config in session files.
  • CLI Changes: CLI interface heavily updated for simpler names of switches along with more information in help.

Arjuna 0.9.20 Beta

14 Apr 09:39
Compare
Choose a tag to compare
Arjuna 0.9.20 Beta Pre-release
Pre-release

This release marks the fully documented Tester Programming Interface of Arjuna. A major internal re-structuring of packages has been done to support this. Integration of docs with readthedocs.org: https://arjuna-taf.readthedocs.io.

Following is list of changes:

  • Major change in internal packaging to aid in controlled API doc generation.
  • License info changed from doc string to line-wise comments.
  • Sphinx is now used for docs instead of markdown.
  • Integration of docs with readthedocs.org: https://arjuna-taf.readthedocs.io
  • Google Doc Style for Python has been identified for Arjuna API documentation.
    • Tried for Configuration, ConfigurationBuilder and logging functions. Works well.
  • Moved private enums and exceptions to arjuna.core module.
  • Added doc strings for:
    • DDT Classes
    • Enums
    • Exceptions
    • Magic Functions
    • Test Engine
      • @test
      • Fixtures
      • Relation
      • Asserter
      • PytestHooks.add_screenshot_for_result
    • @track
    • Json
    • xml: NodeLocator and XmlNode
  • Elements in Gui are now referred as widgets (taking a cue from wxPython)
  • template in GNS is changed to type for easy understandability (stands for widget type, default is element.)
  • (Internal) Locator Meta Data concept has evolved. It now contains meta data about the widget beyond locating it. Its now referred as Gui Widget Meta Data. Reflected in internal class names, messages and exception names.
  • Implemented ScreenShooter protocol. Created ScreenShooter base class. GuiApp and GuiPage support the protocol in Arjuna.
  • Added Image helper class.
  • Added doc strings for:
    • Gui, GuiAppContent, GuiApp, GuiPage, GuiSection, GuiDialog
    • SingleGuiWidget, Locatable, GuiElement. GuiMultiElement, GuiDropDown, GuiRadioGroup
    • Gui Locator Formatter, GuiWidgetLocator, Dictable
    • GNS, GNS Formtter
    • GuiSource, SingleEntityGuiSource, GuiPageSource, GuiElementSource, GuiMultiElementSource
    • Image
    • AsserterMixin
    • ScreenShooter
    • All Arjuna Types in helper.arjtype
  • GuiDialog is a class of its own now. Rules to follow. Separated in its own module.
  • GuiAppContent separated in its own module.
  • GNS rules have been indicated in the API doc. Coded restrictions need to be done yet for a more closely controlled GNS namespace structure.
  • Log output (from display) is captured in the HTML report. Not displayed on the screen.
  • GuiSource concept materialized as a hierarchy. Still work to do.

Arjuna 0.9.17

01 Apr 15:56
Compare
Choose a tag to compare
Arjuna 0.9.17 Pre-release
Pre-release

This build contains very powerful features related to logging and element level control of wait time.

  • Added TRACE level to log.
    • log_trace is a direct call.
    • By default trace messages are not included in display or log.
    • Is configurable from command line, project.conf, --run_env and --run-conf.
  • Added support for Contextual Logging
    • All log messages are of default context
    • You can mark a log message as belonging to one or more contexts.
    • You can allow contexts by controlling the ArjunaOption.LOG_ALLOWED_CONTEXTS which is configurable from command line, project.conf, --run_env and --run-conf.
  • Added track decorator.
    • It logs begin with args, finish with return and exceptions for Classes, Methods and Functions.
    • It also supports tracking @classmethods and @staticmethods automatically with class level track or individual track decorating.
    • Properties can be decorated with track as well:
      • Class level decorating does not cover properties.
      • Decorating a setter automatically covers the getter.
    • Default log level associating with tracking is debug. Can be controlled in each track decorator by providing the level argument.
  • --run-conf can be provided wihtout .conf extension.
  • Added doc for CLI.
  • @for_session fixture support added.
  • Major internal re-architecuring to support meta-data in GNS definition and direct coded locator calls.
  • max_wait argument support in
    • gui.wait_until_absent, gui.element.wait_until_absent
    • gui.gns.wait_until_absent(label), gui.gns.label.gns.wait_until_absent(label), gui.gns.label.wait_until_absent
    • gui.contains, gui.element.contains
    • gui.gns.contains(label), gui.gns.label.gns.contains(label), gui.gns.label.contains
  • Documents updated for a more manageable format instead of tight coupling with example code.
  • WebApp, Page, Section class names are changed to GuiApp, GuiPage and GuiSection for future compatibility.

Arjuna 0.9.13

25 Mar 15:15
Compare
Choose a tag to compare
Arjuna 0.9.13 Pre-release
Pre-release

New methods have been added to Gui and GuiElement API in this build.

  • wait_until_absent call supported
    • Can be called with Gui as well as GuiElement as .wait_until_absent(**locator_kwargs)
      • Raises GuiElementForLabelPresentError exception on failure.
    • Can be called with Gui as well as GuiElement as .wait_until_absent(**labels)
      • Raises GuiElementPresentError exception on failure.
  • contains call supported
    • Returns True/False.
    • Can be called with Gui as well as GuiElement as .contains(**locator_kwargs)
    • Can be called with Gui as well as GuiElement as .contains(**labels)
  • FIX: Import bug in emd.py

Arjuna 0.9.12

24 Mar 10:58
Compare
Choose a tag to compare
Arjuna 0.9.12 Pre-release
Pre-release

Many new features and refinements have gone in this build.

  • Added locate/element/multi_element/dropdown/radio_group factories to Gui and element/multi_element factories to GuiElement.
  • The factories provide a more Pythonic syntax than using tuples or factories for every locator type in user API.
  • withx works with the revised factory methods. One can provide <withx_name>=Params([arg1=val1, arg2=val2, ... argN=valN]) argument to factory methods for identification.
  • Locator and Formatter class added for providing complex identification constructs as a single argument. .locate method added to Gui and GuiElement.
  • Formatted identifiers
    • Identifiers can contain formatter placeholders with the syntax $xyz$ where xyz is a name which you want to replace with a value.
    • For using formatted identifiers in code, you can use gui.format(xyz=<value>).element(locator="$xyz$") syntax.
    • For using formatted identifiers in GNS, you can use gui.format(xyz=<value>).label syntax.
    • Auto-loaded placeholder values: (query syntax is same as that for the magic C, R and L functions.)
      • Configuration - Specified as C.<query>
      • Contextual Data Reference - Specified as R.<query>
      • Localized Strings - Specified as L.<query>
  • With and WithType are now completely internal to Arjuna.
  • XmlSource class added with comprehensive node finding and inquiry support. xfinder name changed to NodeLocator to make it similar to Locator for Gui element finding.
  • Example code and documentation updates in progress.

Arjuna 0.9.11

14 Mar 15:32
Compare
Choose a tag to compare
Arjuna 0.9.11 Pre-release
Pre-release

CRITICAL Update: @Property and getattr conflicts needed to be resolved. Hence instead of direct . access in Gui and element, a special object GNS has been added to provide such dynamic access without conflicting with methods, properties and attributes defined in Guis and its inherited classes in tester's code.

  • Direct log msg calls added: log_debug, log_info, log_warning, log_error, log_fatal. Implentation method used could be extended for contextual logging in Arjuna in future.
  • Introduced GNS class. Gui and nested element access for labels defined in GNS can be done as gui.gns.label and element.gns.label respectively.
  • root and anchor elements code optimized to work with direct reference to original element.
  • withx supports attr and fattr with named args support for both name and value arguments.
  • basic .locate factory added. Needs to be enhanced to support any advanced non-GNS implementations one might find a need for.
  • Typo fixed in CLI help for -im.
  • All example code has been moved to a single project arjex. Code and docs need a fix.

Given the critical nature of this fix, release is being done. Example code and docs need and update.