magium/magento1-clairvoyant-ui

A Magento 1 based UI to build Magium Selenium tests in the Admin UI

Installs: 141

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 3

Open Issues: 0

Type:magento-module

0.9.8 2018-02-27 06:11 UTC

This package is not auto-updated.

Last update: 2024-04-13 17:35:44 UTC


README

The purpose of Magium is to make building and running browser tests as an everyday part of your development experience. Magium takes a big step towards that direction by reducing the investment required to build Selenium tests by establishing a structure and framework for indvidual software products, Magento being the first one.

Magium, however, is more than just a tool to make browser testing easier for developers. Our goal is to make web site testing not just easier, but more holistic. In other words, while Magium's first step was in making developer's lives easier, there is no reason to stop there. Magium Clairvoyant is a series of products under development to inject Magium into the production environment.

That is done via a new Magento module that we have built that provides the ability to build and execute simple Magium tests directly from the Magento UI based off of data that Clairvoyant can extract from the normal execution of the website. To see how this works you can check out this short YouTube video.

Short version

You can also view a longer version that includes instructional elements here:

Long version

Getting started is super easy.

To install Clairvoyant you need to create a composer.json file for your Magento project that looks something like this:

{
    "name": "root/www",
    "require": {
    },

    "extra" : {
        "magento-deploystrategy": "copy",
        "magento-root-dir": "/var/www/magento"
    }
}

Then execute

composer require magium/magento1-clairvoyant-ui

That's it. From there you can start building your tests.

The first thing you will need to do is make sure that you have Selenium Server running. That's easy. And Magium prefers Chromedriver, though you can configurably set it differently.

The log in to your Magento instance and navigate to System / Configuration :: Magium and change the settings to suit your environment. In particular, the Selenium Server URL.

config.png?raw=true

From there you can configure Clairvoyant for your individual site, though we recommend initial testing using the sample data set. Navigate to System / Magium / Test Configuration and change any Xpath, URL or identity data that you need to make Clairvoyant conform to your site. Additionally you need to configure how you want the test to be run: immediately, or via a queue. Immediate mode will trigger as soon as an associated event is triggered. Via the queue will inject the test into a queue and get executed by cron.

customer-identity.png?raw=true

Once you have configured Clairvoyant it's time to start building tests. Tests are designed to have data from Magento injected into them and get interpolated into the test. We suggest watching the YouTube videos about to see that in action.

edit-test.png?raw=true

One of the key components of building Clairvoyant tests is the use of assertions. The assertions are extracted from Magium and presented for your consumption in the instruction form, along with navigators and actions.

assertions.png?raw=true

But while building a test is good, you don't just want to build it and then run it in production; you want to test the test first. To do that you click on the Test Execution button on the top right side of the form and you can simulate an event by injecting various Magento objects into the Magium Dependency Injection Container and executing the test with interpolation. Again, see the video for more information about that.

When the test is completed you will see a log of the test.

test-execution.png?raw=true

Once you are satisfied with your test navigate to System / Magium / Test Execution. This is where you will associate the test with certain events.

bind-tests.png?raw=true

Now that the test has been bound to the event, find an appropriate product and save it. When the test has executed you can navigate to System / Magium / Test Queue and see the results of the test.

test-log.png?raw=true

So check it out and let us know how we can make your browser testing an enjoyable experience. Again, check out the YouTube videos if you have more questions.

Short version

You can also view a longer version that includes instructional elements here:

Long version