{"id":19783143,"url":"https://github.com/edmondscommerce/edmondscommerce-magento2-testing","last_synced_at":"2025-09-09T19:29:17.437Z","repository":{"id":56975109,"uuid":"235393917","full_name":"edmondscommerce/edmondscommerce-magento2-testing","owner":"edmondscommerce","description":"Magento 2 module to help with testing and QA","archived":false,"fork":false,"pushed_at":"2023-08-21T13:48:11.000Z","size":46,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T06:02:08.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/edmondscommerce.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-21T16:56:09.000Z","updated_at":"2023-08-07T16:39:30.000Z","dependencies_parsed_at":"2024-11-12T06:07:28.116Z","dependency_job_id":"533f18c2-53ca-4456-8d04-4b4deb369289","html_url":"https://github.com/edmondscommerce/edmondscommerce-magento2-testing","commit_stats":{"total_commits":30,"total_committers":5,"mean_commits":6.0,"dds":"0.23333333333333328","last_synced_commit":"c4e22b22fd1a7f5e406aa40926b3569ea6d10ec4"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/edmondscommerce/edmondscommerce-magento2-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fedmondscommerce-magento2-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fedmondscommerce-magento2-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fedmondscommerce-magento2-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fedmondscommerce-magento2-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edmondscommerce","download_url":"https://codeload.github.com/edmondscommerce/edmondscommerce-magento2-testing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fedmondscommerce-magento2-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274348901,"owners_count":25268973,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T06:07:25.187Z","updated_at":"2025-09-09T19:29:17.373Z","avatar_url":"https://github.com/edmondscommerce.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edmonds Commerce Magento 2 Integration Testing\n\n## Installation\n\nFirst make sure the container has access to the BitBucket repos. If it does not then add the public key to the\naccount, details can be found [here](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html)\n\nThen cd to the project directory and run the following commands\n\n```bash\ncomposer config repositories.edmondscommerce-test-runner vcs git@github.com:edmondscommerce/edmondscommerce-magento2-testing.git\ncomposer require edmondscommerce/module-magento2-test-runner --dev\n```\n\nAlso ensure that you have the Magento 2 coding standards installed\n\n```bash\ncomposer require --dev magento/magento-coding-standard\n```\n\n## Running QA\n\nThere will now be a `qa.m2.bash` file in the `vendor/bin` folder. By default it will scan the entire `app/code`\ndirectory. If there are already several modules in there that are failing, then it can just scan a specific\ndirectory by passing the relative path to it.\n\n```bash\n# Scan the entire directory\nbash vendor/bin/qa.m2.bash\n\n# Just scan the EdmondsCommerce directory\nbash vendor/bin/qa.m2.bash app/code/EdmondsCommerce\n```\n\nThis tool should be run on a regular basic, and must be passing before requesting changes are merged.\n\n## Running Integration Tests\n\n### MySql Config\n\nIn `dev/tests/integration/etc` make a copy of `install-config-mysql.php.dist` called `install-config-mysql.php`\n\nAlter the contents to have the correct configuration, you MUST use a totally separate database.\n\nYou can remove the `amqp-` files if not using rabbit queue.\n\nSee [here](https://devdocs.magento.com/guides/v2.3/test/integration/integration_test_execution.html#setup) for further details\n\n### Setting up php unit configuration\n\nBy default the tool will copy a standard phpunit.xml file into the test folder. This can be bypassed by passing\nfalse to the script, however you will need to create a `dev/tests/integration/phpunit.edmondscommerce.xml` file\nbefore the tests will run.\n\n### Running the tests\n\nThere is a new tool in the `vendor/bin` directory called `runIntegrationTests.bash`. It can be run like so\n\n```bash\n# Copy the default config and run the tests\nbash vendor/bin/runIntegrationTests.bash\n# Don't copy the config and use the file that is already there\nbash vendor/bin/runIntegrationTests.bash false\n```\n\n# Running Acceptance Tests\n\nThere is a helper script that will try to setup the Magento 2 acceptance testing suite, this will\nalso validate as much as possible and allows for the use of a centralised environment configuration file.\n\n## Project Requirements\n\n* You must have the appropriate version of MFTF installed as a dev dependency\n* Magerun2 must be installed and usable on the system path as `magerun`\n* System level bash support, this has been tested under Centos 7\n\n## Setup\n\nThe script is written in a way to provide as much feedback as possible when something is wrong with the\nconfiguration.\n\nIn places it will auto fix issues with data from the main environment file and also try to protect you.\n\n### Environment file\n\nIn this repository there is a [test.bash.dist](./test.bash.dist) file that needs to be copied to the\nroot of the Magento 2 project and renamed to `test.bash` - this will be used to load your project/environment\nspecific variables to use later.\n\nThis file should also be git ignored, this will be checked as part of the setup script, this also serves as an environment check\nas this file should never exist in production nor should this module be installed in production for that matter.\n\nOnce the file is copied, fill out the different variable values as required.\n\n### Running the Setup Script\n\nRun `bash vendor/bin/setupAcceptanceTests.bash` from the root of your project, this is assuming that \nbin files are still setup to be symlinked with composer. \n\nYou can use the full path `vendor/edmondscommerce/module-magento2-test-runner/bin/setupAcceptanceTests.bash` if necessary\nand the tool will recognise this.\n\nDuring the running of the script the configured Magento store will be set to use a new test database set in the\nenvironment file, this test database must exist and be accessible by the configured Mysql user in the database file.\n\nThe script will validate different things in the environment and let you know what to do if it finds a problem.\n\n## Running the tests\nThe setup script will generate the test suite that you configure but will not run them.\n\nFor the acceptance tests to run you must have Selenium or Zalenium configured and working before the tests\nwill run correctly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondscommerce%2Fedmondscommerce-magento2-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedmondscommerce%2Fedmondscommerce-magento2-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondscommerce%2Fedmondscommerce-magento2-testing/lists"}