Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tests]

The tag has no usage guidance.

1
vote
0answers
57 views

Code refactor : replace model with repository

I am trying to refactor code of app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.php by replacing \Magento\Cms\Model\Page with \Magento\Cms\Api\PageRepositoryInterface and removing direct use of ...
1
vote
1answer
323 views

Magento 2, how to create a test from a custom module in the new MFTF (magento functional testing framework)

I've read the documentation that is available for the new MFTF for Magento 2, however I can't figure out how to go about creating tests that are located in a different folder other than the folders ...
6
votes
1answer
864 views

Run static tests for a specific module

I am running php bin/magento dev:tests:run static to check my code quality but it takes a really long time. Is there a way I can run them for one module and/or one theme?
0
votes
1answer
207 views

magento 2 how to call my custom method in test.php at root folder?

I would like to know, I have a custom method in test.php at magento2 root folder i would like to call my custom method how to do that? i have written a sample test script below please suggest me here ...
8
votes
1answer
536 views

What are the static tests checking?

After building my module I tried running bin/magento dev:tests:run static. This reported a few problems with my code, but I'm not sure exactly what is checked when running this tests. The official ...
0
votes
1answer
55 views

Magento CPU 100% utilization even when less traffic

we have three store magento sites installed in server on a single instance. the cpu is going for 100% usage for just very less traffic. Any help will be appreciated?
0
votes
1answer
270 views

Magento 1 - MTF How to run functional test ?

Magento 1 ships with a /tests/ folder containing functional test based on PHPUnit and Selenium ( note: you shouldn't deploy this folder to live site :) I'm looking for some information in order to ...
4
votes
2answers
773 views

Failing the dependencies check

I'm running the static tests for one of my magento 2 modules php bin/magento dev:tests:run static and I get the following errors. Data set: [ROOT]/app/code/Sample/News/Block/Adminhtml/Author/Edit/...
4
votes
2answers
734 views

Using 2 instances of the same class as dependencies for an other class

I've built a CRUD module in Magento2. My Save admin controller has 2 dependencies that are basically the same classes, with different settings. But when I run the static tests php bin/magento dev:...
2
votes
1answer
74 views

Constructor integrity tests

I've created a simple CRUD module for Magento 2 and now I'm running the tests to see if I didn't break something. Apparently there are a lot of things wrong with my module. I will be posting some ...