{"id":25519693,"url":"https://github.com/aligent/magento-integration-test-pipe","last_synced_at":"2025-12-22T10:30:14.025Z","repository":{"id":65217744,"uuid":"587992986","full_name":"aligent/magento-integration-test-pipe","owner":"aligent","description":"Bitbucket pipes for running integration and functional tests for Magento 2 projects.","archived":false,"fork":false,"pushed_at":"2024-08-02T09:15:14.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-02-16T13:24:00.204Z","etag":null,"topics":["functional-testing","integration-testing","magento2","pipe","testing"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aligent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-12T04:07:02.000Z","updated_at":"2024-08-02T06:28:53.000Z","dependencies_parsed_at":"2024-08-02T07:30:52.999Z","dependency_job_id":"4ce4d006-3789-4ae8-bb68-de31fbed4ab6","html_url":"https://github.com/aligent/magento-integration-test-pipe","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.1333333333333333,"last_synced_commit":"3492ee27d385930282c5af772bf1b26c703e3c68"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fmagento-integration-test-pipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fmagento-integration-test-pipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fmagento-integration-test-pipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fmagento-integration-test-pipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligent","download_url":"https://codeload.github.com/aligent/magento-integration-test-pipe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239703290,"owners_count":19683240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-testing","integration-testing","magento2","pipe","testing"],"created_at":"2025-02-19T17:29:24.013Z","updated_at":"2025-12-22T10:30:13.990Z","avatar_url":"https://github.com/aligent.png","language":"Shell","readme":"# Aligent Magento Integration and API Functional Testing Pipe\n\nA bitbucket pipe for running Magento integration and api functional tests\n\nIt is designed to be run parallelly so you can leverage bitbucket parallel steps. [Example pipeline](#example-pipeline)\n\nThe pipe detects a `composer.lock` file and installs packages. If no `composer.lock` file is found, the pipe will create\na new magento project.\n\n## Architecture\n![image](https://user-images.githubusercontent.com/40108018/213162548-349aeb6a-fb87-4146-b903-ec30afcb32f5.png)\n\n\n## Environment Variables\n\n| Variable                | Usage                                                                                                                                                                                                          |\n|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `TYPE`                  | Available tests are `integration`, `rest`, `graphql`. Default: `integration`                                                                                                                                   |\n| `DATABASE_USERNAME`     | Default: `user`                                                                                                                                                                                                |\n| `DATABASE_ROOTPASSWORD` | Default: `rootpassword`                                                                                                                                                                                        |\n| `DATABASE_PASSWORD`     | Default: `password`                                                                                                                                                                                            |\n| `ELASTICSEARCH_HOST`    | Must be `host.docker.internal` when running in pipelines. Optionally change this if you are developing the pipe locally.                                                                                       |\n| `RABBITMQ_HOST`         | Must be `host.docker.internal` when running in pipelines. Optionally change this if you are developing the pipe locally.                                                                                       |\n| `DATABASE_HOST`         | Must be `host.docker.internal` when running in pipelines. Optionally change this if you are developing the pipe locally.                                                                                       |\n| `COMPOSER_AUTH`         | JSON stringified composer `auth.json` with the relevant configuration you need.                                                                                                                                |\n| `REPOSITORY_URL`        | `https://repo.magento.com/` - If using this, make sure the `COMPOSER_AUTH` variable is set. \u003cbr\u003e  `https://mirror.mage-os.org/` - Only supports open source edition. \u003cbr\u003e Default: `https://repo.magento.com/` |\n| `MAGENTO_VERSION`       | (Optional) Default: `magento/project-community-edition:\u003e=2.4.7 \u003c2.4.8` \u003cbr\u003e Commerce: `magento/project-enterprise-edition:\u003e=2.4.7 \u003c2.4.8`                                                                      |\n| `GROUP`                 | (Optional) Specify test group(s) to run. Example: `--group inventory,indexer_dimension` \u003cbr\u003e See phpunit [@group annotation](https://phpunit.readthedocs.io/en/9.5/annotations.html#group)                     |\n| `TESTS_PATH`            | (Optional) Specify a test path to run. Example `./app/code/The/Module`                                                                                                                                         |\n| `COMPOSER_PACKAGES`     | (Optional) Specify any packages to require. Used when testing against a stand-alone module. Example `aligent/magento-async-events`                                                                             |\n\n## Using private packages\nWhen you are testing a standalone module that has dependencies which are private, you may want to include private\nregistries or repositories so that the test pipeline can download the packages. The pipe provides support for this.\n\nInclude the `repositories` field in your module's `composer.json`. When the pipe creates a new magento project, it will\nmerge the module's `composer.json`'s `repositories`  field to the project's `composer.json`. You will also need\nto make sure that the `COMPOSER_AUTH` variable includes credentials for the private registries.\n\n## Example Pipeline\n```yml\nimage: php:8.3\n\ndefinitions:\n  services:\n    elasticsearch:\n      image: magento/magento-cloud-docker-elasticsearch:7.11-1.3.2\n      variables:\n        ES_SETTING_DISCOVERY_TYPE: single-node\n        ES_JAVA_OPTS: '-Xms512m -Xmx512m'\n\n    mariadb:\n      image: mariadb:10.6\n      memory: 256\n      variables:\n        MYSQL_DATABASE: magento_integration_tests\n        MYSQL_USER: user\n        MYSQL_PASSWORD: password\n        MYSQL_ROOT_PASSWORD: rootpassword\n\n    rabbitmq:\n      image: rabbitmq:3.12-management\n      memory: 256\n      env:\n        RABBITMQ_DEFAULT_USER: guest\n        RABBITMQ_DEFAULT_PASS: guest\n\n  steps:\n    - step: \u0026integration\n        name: \"Integration Test\"\n        caches:\n          - docker\n        script:\n          - pipe: docker://aligent/magento-integration-test-pipe\n            variables:\n              TYPE: integration\n              TESTS_PATH: ../../../vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Framework/MessageQueue/TopologyTest.php\n              REPOSITORY_URL: https://mirror.mage-os.org/\n              GROUP: --group group_a,group_b\n        services:\n          - mariadb\n          - elasticsearch\n          - rabbitmq\n\n    - step: \u0026rest\n        name: \"REST API\"\n        caches:\n          - docker\n        script:\n          - pipe: docker://aligent/magento-integration-test-pipe\n            variables:\n              TYPE: rest\n              TESTS_PATH: vendor/magento/magento2-base/dev/tests/api-functional/testsuite/Magento/Directory/Api/CurrencyInformationAcquirerTest.php\n              REPOSITORY_URL: https://mirror.mage-os.org/\n\n        services:\n          - mariadb\n          - elasticsearch\n          - rabbitmq\n\n    - step: \u0026graphql\n        name: \"GraphQL\"\n        caches:\n          - docker\n        script:\n          - pipe: docker://aligent/magento-integration-test-pipe\n            variables:\n              TYPE: graphql\n              TESTS_PATH: vendor/magento/magento2-base/dev/tests/api-functional/testsuite/Magento/GraphQl/Directory/CurrencyTest.php\n              REPOSITORY_URL: https://mirror.mage-os.org/\n\n        services:\n          - mariadb\n          - elasticsearch\n          - rabbitmq\n\npipelines:\n  branches:\n    production:\n      - parallel:\n        - step: *integration\n        - step: *rest\n        - step: *graphql\n```\n\n## Contributing\n\nCommits to the `main` branch will trigger an automated build for the latest tag in DockerHub, commits to the `dev`\nbranch will trigger an automated build with the `dev` tag in Docker hub.\n\nA docker compose based environment is available to help develop the pipe locally.\n\n## Local project testing\n\nThe docker compose environment can be run to test a project locally, without requiring a pull request. Simply follow these steps:\n\n1. Checkout the project you would like to test to a working directory.\n2. Open a terminal and set a `PROJECT_DIR` environment variable pointing to the project's directory. For example:\n\n```shell\n$ PROJECT_DIR=~/projects/my-test-project\n```\n3. Create one or more `.env` files within your project to set environment variables that need to be overridden (e.g. `GROUP`)\n   *  Note that environment variables can be overridden by setting values in your shell directly. The use of `.env` files makes it easier to quickly change between types of tests, etc.\n4. Start the environment, providing overridden environment variables or your custom `.env` file:\n\n```shell\n$ docker compose --env_file path/to/env_file up -d\n$ docker compose exec magento sh\n```\n\n6. Make sure that `/pipe.sh` is executable.\n\n```shell\n/# chmod +x pipe.sh\n```\n\n7. Invoke the pipe\n\n```shell\n/# ./pipe.sh\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fmagento-integration-test-pipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligent%2Fmagento-integration-test-pipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fmagento-integration-test-pipe/lists"}