Releases: rahul-verma/arjuna
Arjuna 0.9.10
This build contains critical updates which relate to the next set of advanced features which need to be created for Gui Automation abstraction.
- Externalization of Gui is mandatory for element access. Direct use of With.x not allowed. It's an internal concept now.
- Creation of an App/Page can happen without a corresponding GNS file. The Gui definition will be empty in this case.
- Element Label must be an arjuna name.
- Elements can be directly access using
. (dot)
operator. from aby Gui. template
keyword can be used in GNS files to define non-GuiElement object types.- All example code updated.
- All docs updated as per the revised features.
- Fix: Handling of Root and Anchor elements in GNS.
- Fix: An Empty Yaml GNS file is NOT a problem.
- Fix: Overlap of named parameters for withx in GNS don't conflict with internal arguments passed by Arjuna.
Arjuna 0.9.8
This release introduced various advanced GUI automation related features.
- Firefox driver uses Service object as per Selenium 4. Chrome was updated to use Service earlier.
- You can now use an existing Driver service URL. ArjunaOption.SELENIUM_SERVICE_URL is used for the purpose. Works with docker-selenium. /wd/hub is appended automatically to the URL.
- Arjuna automatically downloads driver for Chrome/Firefox using webdriver_manager package. Added setup.py dependency. Set to True by default. Can be controlled using ArjunaOption.SELENIUM_DRIVER_DOWNLOAD option.
- Browser headless mode can be controlled with ArjunaOption.BROWSER_HEADLESS option. False by default.
- BrowserName enum has been changed to contain only Chrome and Firefox as these are the current supported browsers.
- withx in GNS files supports string, list and dictionary entries in YAML and maps them to vargs and kwargs in formatting the value of withx entry referred by a label.
- Separated current Yaml parsing as Yaml and YamlFile classes in arjuna.core.yaml module.
- Introduced WithX class to handle WithX parsing and processing.
- Provision to add Withx identifiers which can be referred to from any GNS file. These are included in the
<Project Root>/guiauto/withx/withx.yaml
file. - A WithX identifier defined in
withx.yaml
can be used programmatically. It can be thought of as a method which Arjuna defines at run-time with the signatureWith.locator(*args, **kwargs)
and can be called from any part of your code.
Arjuna 0.9.7
Minor but critical update. All l10 references changed to l10n.
Arjuna 0.9.6
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
toArjunaOption.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 byL
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
- The
- 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
andconfig.user_options.value
. Relaced withconfig.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
orconfig[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 treata
as a configuration name. - Many ArjunaOptions have been renamed to simpler, shorter names.
- Arjuna automatically looks up Arjuna options and then user options for a name. This does away with the need for
- 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
- Reference Config is updated as per following sequence:
- 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.
Arjuna 0.9.5
Following are the new features introduced in this build:
- Data References
- Introduced concept of Contextual Data References.
- Built-in Support for Column and Row Excel Data References.
- The Excel data references are automatically loaded by Arjuna during init().
- The references are easily accessible using the
request
object in test/fixture functions. - Added example code and doc.
- Localizer
- Introduced concept of localization
- Built-in support for Excel based localization files
- Excel localizers are automatically loaded and merged into a single Contextual Data Reference
- The
L
function is a special function to easily localize a string as perLocale
. - Introduced
Locale
enum and ArjunaOption.LOCALE to control configured Locale.
- Chrome driver creation uses the Service object as the previous signature was deprecated.
- Arjuna uses sys.exit with the same code as returned by pytest.main
0.9.4
Significant changes and new features have gone into this release.
- In test or test scope fixture, item can be added to module scope.
- GNS default format changed to YAML. Added PyYAML to setup.py as dependency.
- root and anchor element checking refer to existing element labels. Avoids duplicating same locator information.
- Introduction of "withx" (With Extended) in GNS for cleaner identifiers which share same pattern.
- Added mimesis as a dependency in setup.py. Arjuna will use its facilties for faking/generating commonly used data.
- Introduction of basic Data Generator wrapper class on top of Mimesis.
- Value class is an overhang of Java version of Arjuna. It is completely removed from Arjuna as object wrapper.
- DataRecord or Configuration values are not Value objects any more.
- Value class remains to provide any conversion class methods, which can be a useful feature to retain.
- Added SourceNode class.
- element.source.node gives an object of this.
- Provides finder methods for directly finding content in element source rather than browser based selenium commands.
- Added xfinder in arjuna.core.xml to define finding strategy.
- Singular names for all directories.
- config.get_arjuna_option_value and config.get_user_option_value -> config.arjuna_options.value, config.user_options.value
- Bug fix: attr and related With factory methods had a bug post refactoring. Fixed.
- Bug fix: screenshot path in HTML report hook.
- Entity -> DataEntity for clarity of purpose.
- BrowserConditions class added with DocumentReadyState condition automatically called for browser methods.
- Added Linux to Desktop OS enum.
- create-project command added to CLI.
- conftest.py is generated as per project_name.lib.fixture structure.
- Fixed example codes across projects.
- Data Driven Testing
- Fixed indexed values in Data Record.
- Data Record keys/names are now case-insensitive.
- Support for
records
markup. - Support for
data_function
markup. - Support for
data_class
markup. - Support for
data_file
markup (Out of the box support for XLS, TSV/CSV and INI formats.) - Support for record filtering in data files.
- Support for
many_data_sources
builder. - Added example code and docs for data driven testing.
Arjuna 0.8.17
With this build the test and fixture signatures are made consistent. HTML report screenshots is revamped and supports screenshots for fixtures as well.
Following are all the changes:
- Widget class renamed to Section. Widget and Dialog are synonyms for Section.
- Concept of my is removed. pytest does not allow multi-scope fixtures. request fixture is used the same way in fixtures and tests now.
- For data driven test, one needs add 'data' as an arg to the test.
- Common fixtures can be placed in lib.fixtures.
- HTML report screenshots related changes:
- add_screenshot_for_failed_result now add_screenshot_for_result
- Behavior can be controlled by passing ignore_passed (on by default) or ignore_fixtures (off by default) arguments.
- Expects a screen_shooter in Function or Module space. Any object with take_screenshot(prefix) is a screen shooter.
- Usage is very simple. Include the following in conftest.py:
@pytest.mark.hookwrapper
def pytest_runtest_makereport(item, call):
result = yield
PytestHooks.add_screenshot_for_result(item, result) - Screenshots are now taken for failures in fixtures as well. Arjuna now does not depend on presence of request fixture in item.funcargs.
- Fixed name typo and arg bug in browser api.
- GuiMultiElement gives interface just like GuiElement for source inquiry.
- GuiMultiElement has many assertions available now: assert_size, assert_min_size, assert_max_size, assert_empty, assert_not_empty
- Asserter methods have simpler interface. Goal now is to add higher level assertions in objects themselves.
- Introduced state special label in GNS. This element can be automatically checked as a part of Gui Loading Protocol. Avoids the need for writing a validate_readiness method for simple single element loading need.
- Module space bug fix.
Arjuna 0.8.14
Primary changes available in this build are related to Widgets, Gui exceptions, test name representation in reports and CLI switches.
- Added arjex_internals examples project to create example code that reflects/tests internal workings of Arjuna.
- CLI changes based on community discussion
- c/consider prefix changed to i/include
- i/ignore prefix changed to e/exclude
- --enumerate-only change to --dry-run
- My.repr method is used for including test data in test name. No more of the staple 'my0' in the names.
- Fix in PyTestHooks. Still need to look for a better solution. request object is not retrievable when error happens in fixture.
- To support nested element finding across all With locators that use XPath, "." is automatically pre-fixed if not present.
- New named exceptions introduced for better information: GuiNotLoadedError, GuiLabelNotPresentError, GuiNamespaceLoadingError
- Concept of root element introduced for Widget.
- Widget takes a keyword argument 'root_element_locators' in its __init__method.
- You can specify a single locator (With object) or a list of locators.
- You can also specifiy it in corresponding GNS file with a special label: root
- If both are specified, then one passed in init overrides the GNS entry.
- If root element is specified in any of the above manner, it is used to find elements when factory methods of Widget are used (e.g. .element())
- If root element is NOT specified, automator is used as the finder.
- Test Object Space (earlier called Shared Spaces)
- my.modules_shared_space is changed to my.module.space for better code structure.
- my.space in test refers to the current test's scope.
- In fixtures, request.space refers to the scope as per the fixture scope.
- With my.space, and request.space, storing is done for scope, retrieval is from current test object up the parent chain.
- Doc links in main README.md made abolsute because for PyPi.
Arjuna 0.8.12
From 0.8.10 onwards, the goal was to document Arjuna use cases, make changes to the API in the interest of intuitive behavior and make any fixes/enhancements to support these.
Following are the changes which have gone in:
- Added asserter object to 'my'
- Split Example Project to represent documentation sections.
- Examples are now tracked based on transformation to @test and doc written.
- Examples:
- Core Features
- Writing First Test
- Value abstraction
- Configuration - Arjuna Options and User Defined Options
- Web UI Automation Basics
- Getting Started with WebApp
- GuiElement - Selenium By's Equivalent, Arjuna Extensions, Basic Interactions
- Creating a Self-Contained App Class
- GuiMultiElement
- DropDown and RadioGroup
- GUI abstraction
- Gui Namespace
- Creating an App Class
- Gui Loading Logic
- App Model
- App-Page Object Model
- App-Page-Widget Object Model
- Core Features
- Added non-coding documentation:
- Project Structure
- CLI Changes
- cm/im switches removed based on new test structure.
- cf/if changed to ct/it (--consider-tests, --ignore-tests).
- run-pickers changed to run-selected.
- Support for static RunID when --static-rid switch is passed. Useful during script development. Default is dynamic timestamped runid.
- Simplification of With
- class_name, class_names, compound_class -> With.classes
- css_selector -> selector
- tag_name -> tag
- link_text -> flink (Full text of link)
- link_ptext -> link (Default match in Arjuna is Partial)
- javascript -> js
- attr_value -> fattr (Full attribute)
- attr_pvalue -> attr (Default match in Arjuna is Partial)
- meta -> label
- With.attr* now take two arguments and simple strings rather than [attr][value] string.
- WebApp Interface Improvements
- delegates all calls which it does not contain to its 'ui' obj. It simplifies the App abstraction code in tests.
- title is a direct inquirable attribute
- go_to_url is a direct call.
- Page interace
- go_to_url is a direct call.
- Name and importing changes
- AnyRefValue changed to Value. It is now a direct arjuna import.
- DefaultTestContext -> RunContext
- guiauto_max_wait property method -> guiauto_max_wait
- ns_dir -> gns_dir
- def_file_name -> gns_file_name
- test.my and Gui have Arjuna's asserter object. AsserterMixin moved to asserter module. Added 'fail', 'assert_equal', 'assert_not_equal', 'assert_true', 'assert_false methods to Asserter. More assertions to be added.
- Basic proof of concept done w.r.t. creating session level fixtures outside of conftest. Will build on this in upcoming versions.
- Fix for GNS for attr based identification.
- Directory and project files related changes:
- arjuna_launcher.py moved to scripts directory and updated to support new structure.
- archives directory is not created now.
- Cleanup of arjuna central conf and description files.
- pytest.ini now present inside arjuna deployment.
- conftest.py now resides inside tests directory.
- Current working directory is changed to project directory before pytest is launched.
- GuiConditions, GuiReady condition and GuiNotLoaded error implemented. Arjuna has a complete Gui loading mechanism which triggers automatically for a Gui.
Arjuna - First Semi-Production Ready Release
This is the first semi-production ready release version of arjuna in its new avatar. With this arjuna has moved away from webservice based multi-language ambition to pure Pythonic implementation. Also instead of focus on developing the test engine (UniTEE), the focus is shifted to developing higher level features. Arjuna now uses pytest as its underlying engine and the UniTEE features are being ported on top of features provided by pytest.
- Automator is created in the context of an App.
- Elements are created in the context of a GUI (App/Page/Widget)
- Nested Element Finding.
- Partial Element can be used to find elements as well.
- Drodown and radiogroup components fixed.
- OR relationship bug fixed for multiple With identifiers.
- Introduced FrameIsPresent and WindowIsPresent Conditions.
- Max wait time has been made configurable for some contexts at call level.
- Window logic works. Improved window waits. All wait is constrained by Gui max wait.
- Frame logic works. Improved window waits. All wait is constrained by Gui max wait.
- Conditions raise TimeoutError which is a WaitableError.
- Exception message contains more string representation of Locator information.
- Basic unittest integration to run all tests in the tests directory of a project.
- Element names in GNS files are validated as Arjuna names (Valid Python names, 3-50 length)
- Importing from arjuna has been heavily simplified. from arjuna import * provides all public names.
- Arjuna now uses pytest as its engine instead of unittest. It supports unittest style tests as well.
- Added pytest and pytest-html as dependencies in setup.py.
- Reporting: Added support for XML and HTML reporting simultaneously. Both are switched on by default.
- CLI: Added -rf switch to which one or more of the ReportFormat allowed names can be supplied.
- Concept of Run ID representing a given run introduced.
- CLI: Support for specifying Run ID added. Default is 'mrun'.
- Logging functionality is fixed. Extraneous logs removed.
- CLI: Support for -dl (console display level) and -ll (log level) CLI switches.
- Log and screenshots directory is within Run report directory for a run id.
- RunID is clubbed with timestamp to form the final run id to avoid any overwriting of reports.
- wait_until_element_absent method support in Gui.
- Element filtering support for multi-element. (Example 34).
- Support for loadable page and widget via overridable prepare, reach_until and validate_readiness methods.
- Support for browser level screenshot.
- Support for automatic screenshot on failure in test and inclusion in HTML report.
- Support for -cm -im -cc -ic -cf -if test filtering switches added.
- Support for -e --enumerate-only switch added to check display picked tests without running.
- Added @test decorator for Arjuna test function.
- Added support for defining dependencies by provide id and exclude_if args to @test
- Data Driven Testing support using drive_with argument to @test
- Support for a single data record source using record argument.
- Added support for data store, shared objects and basic data pipeline.
- Support for 'my' as a single argument containing info and data about test func.
- Support for module level and test level fixtures using @for_module and @for_test decorators.
- Support for lookup of a resource in the the reverse order of function, class, module and session.
- Fixtures take request as arg. Tests take my and request as args.
- Dictionary as well . supported for setting and retrieval of resources.
- (Critical Fix) Support for @test decorator withour any args for simple tests.
- Support for module level shared space.