Skip to content

Instantly share code, notes, and snippets.

@piotrekkaminski
Created June 8, 2015 23:51
Show Gist options
  • Save piotrekkaminski/6311d369aa829800f8ec to your computer and use it in GitHub Desktop.
Save piotrekkaminski/6311d369aa829800f8ec to your computer and use it in GitHub Desktop.
MTF FAQ
FAQ:
We want to run the tests on a custom website. The tests assume main website called Main Website and do not work. Is there a way to provide custom name without changing the tests?
This is an error in the tests. Instead of Main Website it should be main_website and it will select the default website. This patch will be included in next MTF release.
https://gist.github.com/piotrekkaminski/df0b6f570aa410a3c7f6
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 internal workflow. Patch below should address this issue.
https://gist.github.com/piotrekkaminski/755f3f1ca2c1b7cafc23
You might also to change
dev\tests\functional\tests\app\Mage\Adminhtml\Test\Constraint\AssertProductIsPresentOnCustomWebsite.php line 115
$this->magentoRoot = realpath(MTF_BP . '../../../../');
I changed it 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 custom website.
One of the possible reasons are translations enabled. The tests expect to find english texts on the page.
Switch default language to english on the tested website.
Some of the tests are very slow, specifically comparing the default address with the data sets.
This is due to how Selenium server works with SELECT element. Next version should address this issue.
Some of the tests are very slow, specifically 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 which prepares tree \Magento\Mtf\Client\Element\TreeElement. Next version should address this issue.
How to create tests that extend existing module, e.g. assuming we want to add new attributes and assertions to customer tests.
We have an example and instructions here: https://gist.github.com/piotrekkaminski/7f2d90232ad36ea42a61
How to create tests for responsive theme or any other custom theme.
We have an example and instructions here: https://gist.github.com/piotrekkaminski/a098272232cc5b827c5d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment