Skip to content

Getting Started with MFTF

Eugene Tulika edited this page Apr 4, 2018 · 8 revisions

Prepare Environment

  1. Run the Selenium server
    • Download the latest Selenium Server.
    • Download a Selenium web driver for your web browser into the same directory that contains the Selenium server.
    • Add the directory with the web driver to PATH.
    • Run the Selenium server in terminal (or other command line interface):
java -jar <path_to_selenium_directory>/selenium-server-standalone-<version>.jar
  1. Disable Add Secret Key in URLs option in Stores->Configuration->Admin->Security

Prepare Repository

Below is a rough overview of the key steps outlined in the Official MFTF Dev Docs tailored to Extension Developers and the MSI project.

  1. Clone MSI Repo git clone https://github.com/magento-engcom/msi.git [PATH_TO_MAGENTO_MSI]
  2. CD to the acceptance test directory of msi:
    • cd [PATH_TO_MAGENTO_MSI]/dev/tests/acceptance
  3. Install the dependencies:
    • composer install
  4. Build the project:
    • ./vendor/bin/robo build:project
  5. Locate and Open the .env file.
  6. Fill in the minimal necessary details:
#Magento Base url. It should include `index.php/` if rewrites rules are not enabled.
MAGENTO_BASE_URL=http://mageto.url/`, 

#Magento backend route name
MAGENTO_BACKEND_NAME=admin`

#admin username
MAGENTO_ADMIN_USERNAME=admin`

#admin password
MAGENTO_ADMIN_PASSWORD=admin123
  1. Configure the location of the tests in the MSI modules. Uncomment the #CUSTOM_MODULE_PATH attribute. Set the comma separated FULL PATHs to your Modules' MFTF Test directories: CUSTOM_MODULE_PATHS=[PATH_TO_MAGENTO_MSI]/app/code/Magento/[MODULE_NAME]/Test/Acceptance

Example:

CUSTOM_MODULE_PATHS=[PATH_TO_MAGENTO_MSI]/app/code/Magento/Inventory/Test/Acceptance,[PATH_TO_MAGENTO_MSI]/app/code/Magento/InventoryApi/Test/Acceptance

Note: Right now tests are located in the PR branch https://github.com/magento-engcom/msi/pull/625. Use it as a reference until it is merged to the 2.3-develop

  1. Generate the tests. Run: ./vendor/bin/robo generate:tests

Run MSI Tests

Execute the MSI group of the tests:

  • cd [PATH_TO_MAGENTO_MSI]/dev/tests/acceptance
  • ./vendor/bin/robo group msi

MSI Documentation:

  1. Technical Vision. Catalog Inventory
  2. Installation Guide
  3. List of Inventory APIs and their legacy analogs
  4. MSI Roadmap
  5. Known Issues in Order Lifecycle
  6. MSI User Guide
  7. DevDocs Documentation
  8. User Stories
  9. User Scenarios:
  10. Technical Designs:
  11. Admin UI
  12. MFTF Extension Tests
  13. Weekly MSI Demos
  14. Tutorials

Clone this wiki locally