-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Decomposition of integration testsuite - proof of concept #28053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decomposition of integration testsuite - proof of concept #28053
Conversation
Hi @bartoszkubicki. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
…rresponding modules
54f77f3
to
40a8866
Compare
Small note: make sure decomposed tests where actually executed. You don't need to run all tests actually, just moved ones, CI will check the rest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except I don't think we need to add visual noise into tests with : void
.
Also, adding declare strict types
should be a separate effort.
In pull requests dedicated for integration tests modularity let's just move the tests. Can you do it all over the code at once with some reusable automation?
That’s why I wanted to wait until php7.4 & phpunit 9 changes will be delivered to 2.4-develop branch, probably they should contains all these strict types and return void. From my perspective it’s better to add return types and declare strict types and review all tests only once rather then fixing, reviewing, testing all tests few times, but would be great to have separate commits for separate changes if possible |
@ihor-sviziev is there any problem between For sure there is no problem in dividing in particular PRs changes into commits like 1. moving tests 2. fixtures fixing 3. slight refactor + types If all changes can be backward incompatible (for 2.4) I would say maybe it is better to take a chance of bigger changes. I would not bundle all work for all module into one PR, because it may be more difficult to review. Some smaller modules may be delivered together, but for example Magneto_Catalog should be done separately. However, if it is possible to do it in some automated way, then it can be done in one batch. |
@slavvka could you bring results of integration test failure? We can't see any failures in build report |
@ihor-sviziev @bartoszkubicki , I reruned tests cause looks like something went wrong, we also haven't test results in our internal infrastructure |
@VladimirZaets the same result, integration tests fails. |
@ihor-sviziev @bartoszkubicki
I think we should try to run it locally |
I don't understand - what we should try to run locally |
@bartoszkubicki as I understood - following integration test fails: |
@ihor-sviziev @VladimirZaets where is this test placed? I nor have it on my branch neither see it on 2.4-develop in github -. https://github.com/magento/magento2/tree/2.4-develop/dev/tests/static/testsuite/Magento/Test/Integrity |
|
@ihor-sviziev @VladimirZaets I have this test passed locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bartoszkubicki,
Now changes from php 7.4 and phpunit 9 were merged. Could you fix conflict with 2.4-develop branch, so we'll see correct test results? Maybe fix for this issue was already delievered in 2.4-develop
@magento run all tests |
...ento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MarkAsReadTest.php
Outdated
Show resolved
Hide resolved
.../AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MassMarkAsReadTest.php
Outdated
Show resolved
Hide resolved
...ento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MassRemoveTest.php
Outdated
Show resolved
Hide resolved
.../Magento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/RemoveTest.php
Outdated
Show resolved
Hide resolved
...nto/AdminNotification/Test/Integration/Model/ResourceModel/Inbox/Collection/CriticalTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/AdminNotification/Test/Integration/_files/notifications.php
Outdated
Show resolved
Hide resolved
app/code/Magento/AdminNotification/Test/Integration/_files/notifications.php
Outdated
Show resolved
Hide resolved
app/code/Magento/AdminNotification/Test/Integration/_files/notifications.php
Outdated
Show resolved
Hide resolved
app/code/Magento/AdminNotification/Test/Integration/_files/notifications.php
Outdated
Show resolved
Hide resolved
app/code/Magento/AdminNotification/Test/Integration/_files/notifications.php
Outdated
Show resolved
Hide resolved
.../AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MassMarkAsReadTest.php
Outdated
Show resolved
Hide resolved
.../Magento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/RemoveTest.php
Outdated
Show resolved
Hide resolved
...ento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MarkAsReadTest.php
Outdated
Show resolved
Hide resolved
…roof-of-concept Conflicts: app/code/Magento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MarkAsReadTest.php app/code/Magento/AdminNotification/Test/Integration/Controller/Adminhtml/Notification/MassRemoveTest.php app/code/Magento/Rss/Test/Integration/Controller/Feed/IndexTest.php dev/tests/integration/testsuite/Magento/AdminNotification/Controller/Adminhtml/Notification/MassMarkAsReadTest.php dev/tests/integration/testsuite/Magento/AdminNotification/Controller/Adminhtml/Notification/RemoveTest.php dev/tests/integration/testsuite/Magento/AdminNotification/Model/ResourceModel/Inbox/Collection/CriticalTest.php
d343d47
to
352b9ef
Compare
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bartoszkubicki,
Looks good, but seems like some files in dev/tests/integration were not deleted after merging with 2.4-develop branch, and static tests complains about these files. You can find them here:
https://github.com/magento/magento2/tree/352b9efe5bfaafa444c9f15f0ce13b02df1547b2/dev/tests/integration/testsuite/Magento/AdminNotification
Could you remove them?
@bartoszkubicki Also would be good to squash all your changes into single commit and force push, if you don't mind. |
@ihor-sviziev ok, tests removed. Should I squash all commits including merge commits? |
@bartoszkubicki yeah would be nice 👍 |
@magento run Static Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartoszkubicki,
Now changes looks really good.
Could you squash all your changes into single commit and I'll approve it?
@ihor-sviziev I was trying to do it, but unfortunately you have merged 2.4-develop to my branch, and now I am not able to rebase it (i have hundreds of commits and conflicts). I was trying to work around it, by applying diffs, but with no success. If there is any easy way to do it, please tell me. If not, the easiest way to achieve the same effects is to create separate branch and commit there changes without this mess (I have prepared already, but I can't change branches to be merged in this PR, so I would have to create separate PR. I have checked it - no conflicts there). |
@bartoszkubicki in this case I think you could do force push OR just create new PR from your new branch and close this one. |
Hi @bartoszkubicki, thank you for your contribution! |
Description (*)
All idea comes from this issue. @ihor-sviziev I took apart of
Magento_Rss
,Magento_AdminNotification
also, as there is test here which contains also file data provider. Generally, it was very easy to move the test and locally all tests worked the same way. I don't see any problem in moving, and refactoring tests in similar way (optimizing imports, some return types, types hints)Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)