1. Make sure your Magento code is up to date.
2. Change to the dev/tests/functional directory, and run composer update to update any
dependencies that might prevent tests from running successfully.
3. Start Selenium. Selenium was downloaded by Composer, and can be found in the following
java -jar vendor/netwing/selenium-server-standalone/selenium-serverstandalone-2.39.0.jar
4. Start your tests using PHPUnit, using your integrated development environment (IDE), or
from the command line.
Frequently Asked Questions
We want to run tests on a custom website. The tests assume that the main
website is called “Main Website,” and do not work. Is there a way to provide
a custom name without changing the tests?
This is an error in the tests. Instead of “Main Website,” it should be set to main_website,
which will select the default website. The website_selection_patch will be included in next MTF
I get errors in Mage\Adminhtml\Test\TestCase\CreateWebsiteEntityTest. How
can I fix it?
This is an misconfiguration in the test, which was designed for an internal workflow. The website
patch addresses this issue.
You might also try this as an alternate solution. In the following file:
Change line 115 to:
$this->magentoRoot = realpath(MTF_BP . ‘/../../../’);
I get errors in Mage\Adminhtml\Test\TestCase\CreateStoreEntityTest. How
can I fix it?
This test fails due to lack of translations. Install translations into Magento.
I get errors while testing a custom website.
One possible reason is that translations enabled. The tests expect to find English text on the
page. Change the default language to English on the website that is being tested.
Why are some of tests so slow, especially when comparing the default address with the
This is caused by the way the Selenium server processes the SELECT statement. The next
version should address this issue.
Some of the tests are very slow, especially when choosing a category for a newly added
product. This process slows down when there are a lot of categories.
This is caused by the algorithm that prepares the tree:
The next version should address this issue.
How can I create tests that extend an existing module? For example, how do we add
new attributes and assertions to customer tests?
See this customer attribute example and instructions.
How can I create tests for a responsive theme or for any other custom theme?
See this custom theme example and instructions.