PHPackages                             ampersand/magento-docker-test-instance - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. ampersand/magento-docker-test-instance

ActiveLibrary[Testing &amp; Quality](/categories/testing)

ampersand/magento-docker-test-instance
======================================

A dev dependency helper to set up a magento instance, to be used for testing modules

0.2.0(1y ago)313.5k↓20.6%23LGPL-3.0-onlyMakefile

Since Mar 31Pushed 1y ago4 watchersCompare

[ Source](https://github.com/AmpersandHQ/magento-docker-test-instance)[ Packagist](https://packagist.org/packages/ampersand/magento-docker-test-instance)[ RSS](/packages/ampersand-magento-docker-test-instance/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (25)Used By (3)

magento-docker-test-instance
============================

[](#magento-docker-test-instance)

[![Build Status](https://camo.githubusercontent.com/19ad85e587e35a8823eaee1f104e9a19f910ca9cd7a58466474d564434a872cf/68747470733a2f2f6170702e7472617669732d63692e636f6d2f416d70657273616e6448512f6d6167656e746f2d646f636b65722d746573742d696e7374616e63652e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/AmpersandHQ/magento-docker-test-instance)

Quickly provision a disposable magento docker instance for testing against.

Features

- Booting a full instance for you to click around and run manual or other automated tests on
- Integration testing a module
- Unit testing a module
- Runs the same locally as in your CI pipeline (the [sample module](https://github.com/AmpersandHQ/magento-docker-test-instance/tree/sample) demonstrates travis)

We try to keep these installations as vanilla and untouched as possible. However, there are a few caveats

- This is for test use only, not for production or any deployed environment. This uses  to pull in Magento which should not be used for production.
- 2FA modules are disabled by default to allow easier admin access
- Alpha and beta versions won't be supported due to their instability

Usage
=====

[](#usage)

Run `./bin/mtest-make` to see all supported versions

```
$ ./bin/mtest-make

2-3-7       Launch 2.3.7
2-3-7-p1    Launch 2.3.7-p1
2-3-7-p2    Launch 2.3.7-p2
2-3-7-p3    Launch 2.3.7-p3
2-3-7-p4    Launch 2.3.7-p4
2-4-0       Launch 2.4.0
2-4-1       Launch 2.4.1
2-4-2       Launch 2.4.2
2-4-3       Launch 2.4.3
2-4-4       Launch 2.4.4
2-4-4-p1    Launch 2.4.4-p1
2-4-4-p2    Launch 2.4.4-p2
2-4-4-p3    Launch 2.4.4-p3
2-4-5       Launch 2.4.5
2-4-5-p1    Launch 2.4.5-p1
2-4-5-p2    Launch 2.4.5-p2
2-4-6       Launch 2.4.6
2-latest    Launch the latest 2.x series

```

Full Installation
-----------------

[](#full-installation)

You can install by cloning this repo

```
git clone https://github.com/AmpersandHQ/magento-docker-test-instance
cd magento-docker-test-instance
FULL_INSTALL=1 ./bin/mtest-make 2-4-5

# run commands inside the  container
./bin/mtest 'vendor/bin/n98-magerun2 config:store:set test/some/config 123'

```

or pull it in as a composer dependency

```
composer require --dev ampersand/magento-docker-test-instance:"^0.1"
FULL_INSTALL=1 vendor/bin/mtest-make 2-4-5

# run commands inside the  container
vendor/bin/mtest 'vendor/bin/n98-magerun2 config:store:set test/some/config 123'

```

That will allow you to then browse `http://0.0.0.0:1234/admin` with the credentials `admin/somepassword123`

Partial Installation for running unit/integration tests
-------------------------------------------------------

[](#partial-installation-for-running-unitintegration-tests)

Please see [this sample module](https://github.com/AmpersandHQ/magento-docker-test-instance/tree/sample) for instructions on how to run your custom integration/unit tests.

Configuration
=============

[](#configuration)

We have the following environment variables which can be overridden when running the `./vendor/bin/mtest-make` command

ENV VARDefault value/contentsExample`COMPOSER_REPOSITORY``COMPOSER_REPOSITORY='https://repo.packagist.com/your_org_here/' vendor/bin/mtest-make 2-4-5``UNIT_TESTS_PATH`src/Test/Unit`UNIT_TESTS_PATH='Tests/Unit' vendor/bin/mtest-make 2-4-5``INTEGRATION_TESTS_PATH`src/Test/Integration`INTEGRATION_TESTS_PATH='Tests/Integration' vendor/bin/mtest-make 2-4-5``COMPOSER_MODULE_SYMLINK`1`COMPOSER_MODULE_SYMLINK=0 vendor/bin/mtest-make 2-4-5``COMPOSER_AUTH_JSON_LOCATION``./Dockerfile-assets/auth.json` contains `{}``COMPOSER_AUTH_JSON_LOCATION=~/.composer/auth.json vendor/bin/mtest-make 2-4-5``COMPOSER_REQUIRE_EXTRA``COMPOSER_REQUIRE_EXTRA='some/suggested-module another/suggested-module' vendor/bin/mtest-make 2-4-5``COMPOSER_AFTER_INSTALL_COMMAND``COMPOSER_AFTER_INSTALL_COMMAND='cp foo.txt bar.txt' vendor/bin/mtest-make 2-4-5``TWOFACTOR_ENABLED`0Whether the magento 2fa modules are enabled by default, can be `1` or `0`XDEBUG
======

[](#xdebug)

```
# this will allow xdebug on port 9010 and docker.for.mac.localhost
./vendor/bin/mtest-enable-xdebug
```

You can configure in the docker container `/home/ampersand/.phpenv/versions/*/etc/conf.d/xdebug.ini` for your own set up, preconfigured for use at Ampersand.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance49

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~155 days

Total

23

Last Release

368d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa904d0f61196b12bd6727175110ad7a58e19d888960279e7e4b9dbb636f34b9?d=identicon)[convenient](/maintainers/convenient)

![](https://www.gravatar.com/avatar/248c125feb1acc5c8932c06226dcd5086760736ff5fc9ec69be32a3aeae8a339?d=identicon)[chickenland](/maintainers/chickenland)

---

Top Contributors

[![convenient](https://avatars.githubusercontent.com/u/600190?v=4)](https://github.com/convenient "convenient (139 commits)")[![tr33m4n](https://avatars.githubusercontent.com/u/1771667?v=4)](https://github.com/tr33m4n "tr33m4n (30 commits)")

---

Tags

magento2test-automationtesting

### Embed Badge

![Health badge](/badges/ampersand-magento-docker-test-instance/health.svg)

```
[![Health](https://phpackages.com/badges/ampersand-magento-docker-test-instance/health.svg)](https://phpackages.com/packages/ampersand-magento-docker-test-instance)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
