2

For a beginner, testing in Magento2 is quite confusing-

  • Functional tests- there is dev\tests\functional\tests\app, which contains tests. DevDocs says we need to install MTF. is MTF needed for running with Selenium, or i can run with Magento alone.

  • Unit tests, does that have to be written in module directory of dev/tests/unit folder.

1
  • We've tried to make testing documentation as simple as possible here. If it's still too confusing, please let us know how we can help. Apr 26 '16 at 12:24
0

MTF based on Selenium, so you cannot run it without.

Unit test should be written in module folder. In future I believe, all tests will be placed in module dir

5
  • What about app folder in functional..what purpose it serves?
    – huzefam
    Apr 24 '16 at 14:13
  • @huzefam, the dev\tests\functional\tests\app has similar structure to app\code
    – joni jones
    Apr 25 '16 at 11:46
  • @KAndy, in nearest future only unit tests will be located in module folders, because in most cases functional and integration tests are used only by core developers.
    – joni jones
    Apr 25 '16 at 11:51
  • @jonijones, It is problem. Any good developer must write integration tests for their modules
    – KAndy
    Apr 25 '16 at 11:58
  • I agree with you, but for most developers which use some module, tests are not needed. If tests will be included into module - they will increase package size, but as I said, most of developers will not use this tests.
    – joni jones
    Apr 25 '16 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.