Run module tests in OXID eShop 6

As follow up for Run tests for OXID eShop 6 here’s how to get module tests running for OXID eShop 6.

Let’s assume we have a metadata 2.0 module (own module namespace, installable with composer) in some public github repository (original or your own fork). Let’s use the OXIDProjects oxid-module-internals as example.

In case you just want to install the module and be good, check module’s README.md or documentation about how to install via composer. Get your OXID VM up and do vagrant ssh.

Example:

The module’s source code is downloaded into the vendor directory (vendor/oxid-community/moduleinternals).
As the shop still expects module source code to be located inside source/modules, the module’s composer.json contains an entry for the ‘target-directory’ in the extra section and the OXID composer plugin takes care all necessary files are copied into that target-directory.

Best way if you want to actually develop the module is to directly git clone the module
into source/modules/target-directory.

As you did not use the composer installation way, you need now to manually register the module’s namespace. Add the module namespace to the shop’s main composer.json, either into autoload or autoload-dev section. Make sure it points to the correct directory.

Then do

Disregarding of you way of installation, doublecheck you have the module tests located
in source/modules/target-directory/Tests.

Edit the shop’s test_config.yml

and run

 

 

0.00 avg. rating (0% score) - 0 votes


0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *