Skip to content

Instantly share code, notes, and snippets.

@robert-altom
Created October 23, 2023 22:10
Show Gist options
  • Save robert-altom/34e7654bcf2eea353c6fe68221ee326f to your computer and use it in GitHub Desktop.
Save robert-altom/34e7654bcf2eea353c6fe68221ee326f to your computer and use it in GitHub Desktop.

AltWalker 0.4.0: Support for python 3.12, new fixtures and LiveViewer release

Support for python 3.12

The load_module() method has been deprecated and is scheduled for removal in Python 3.12. AltWalker has transitioned to using exec_module instead. Additionally, the verify, walk, and online commands now include the --import-mode option, offering the following values:

  • importlib: This mode employs importlib to import test modules.
  • prepend: The directory containing each module is prepended to the end of sys.path if not already there.
  • append: The directory containing each module is appended to the end of sys.path if not already there.

New fixtures

Two new fixtures have been introduced:

  • beforeStep: Will be executed before every step.
  • afterStep: Will be executed after every step.

You can define these fixtures in your test code like this:

# tests/test.py

def beforeStep():
    """Will be executed before every step."""

def afterStep():
    """Will be executed after every step."""


class ModelA:

    def beforeStep():
        """Will be executed before every step from this model."""

    def afterStep():
        """Will be executed after every step from this model."""

    # ...

These fixtures offer you the flexibility to customize behavior before and after individual steps, enhancing the control and functionality of your test suite.

Check out the documentation for more details.

LiveViewer

Inital release of AltWalker's LiveViewer, you can find the repository here: https://altwalker.github.io/live-viewer/.

AltWalker's LiveViewer is a powerful tool designed to enhance your experience with AltWalker. This application provides real-time visualization and monitoring capabilities for your AltWalker test runs, allowing you to gain deeper insights into test execution, track progress, and identify potential issues with ease. With AltWalker's LiveViewer, you can effortlessly keep an eye on the execution of your test models and ensure the success of your testing endeavors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment