Skip to content
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

Integration testssuite decomposition - Rss and AdminNotification #28733

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from

Conversation

bartoszkubicki
Copy link

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)

  1. Fixes Decomposition of dev/tests testsuites across corresponding modules #28012

Manual testing scenarios (*)

  1. Just run moved integration tests. If everything still works and tests pass it means that they were successfully decomposed from testsuite

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

** This is cleaned up port of #28053**

@m2-assistant
Copy link

m2-assistant bot commented Jun 15, 2020

Hi @bartoszkubicki. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

@ihor-sviziev
Copy link
Contributor

@magento run all tests

@ihor-sviziev ihor-sviziev self-assigned this Jun 16, 2020
ihor-sviziev
ihor-sviziev previously approved these changes Jun 16, 2020
Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔ Approved.

Failing functional tests looks not related to changes form this PR.

@ihor-sviziev ihor-sviziev added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Jun 16, 2020
@ihor-sviziev ihor-sviziev changed the title Porting changes for integration testssuite decomposition Integration testssuite decomposition - Magento_Rss and Magento_AdminNotification Jun 16, 2020
@ihor-sviziev ihor-sviziev changed the title Integration testssuite decomposition - Magento_Rss and Magento_AdminNotification Integration testssuite decomposition - Rss and AdminNotification Jun 16, 2020
@ihor-sviziev ihor-sviziev added the Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. label Jun 16, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7688 has been created to process this Pull Request

@VladimirZaets VladimirZaets added the Priority: P3 May be fixed according to the position in the backlog. label Jun 16, 2020
@engcom-Alfa engcom-Alfa self-assigned this Jun 17, 2020
@engcom-Alfa
Copy link
Contributor

QA not applicable

@ghost ghost dismissed ihor-sviziev’s stale review June 19, 2020 07:52

Pull Request state was updated. Re-review required.

@engcom-Charlie
Copy link
Contributor

Need additional discussion to approve such changes, put on hold for now.

@ihor-sviziev
Copy link
Contributor

@engcom-Charlie is there any updates about this PR? Can we move it forward?

@engcom-Charlie
Copy link
Contributor

Hi @naydav, is there any update?

@sidolov
Copy link
Contributor

sidolov commented Aug 19, 2020

Hi @ihor-sviziev , the location of the tests in Magento is under discussion right now. We have the same approach for our bundled extensions, like MSI, Adobe Stock integration, etc. I'll keep you updated and will leave the feedback once we get the decision. It would be great to share with us pros and cons of such approach. Thank you!

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Aug 20, 2020

@sidolov
In general I think it's a good idea to have all tests in one place for the module, I would prefer also moving all js unit, web api tests and others, but unit tests we already have per module, next closest to unit - integration tests.

pros - having all tests for the module in one place.
cons - From the tests perspective - quite frequently integration tests depends on other modules, so technically "dev" dependencies should be declared in the require-dev section of the module's composer (not sure if it's actually needed)

@sidolov
Copy link
Contributor

sidolov commented Aug 20, 2020

@ihor-sviziev agree with you on dependencies declaration concern. Yeah, require-dev section should resolve the problem and avoid strict dependencies for production environments.

@bartoszkubicki
Copy link
Author

@ihor-sviziev @sidolov I think in most of cases if integration test have dependency, also tested code has similar dependency (for example integrations tests for checkout needs customer module, but real code needs them also). I don't see any serious problem here.

This PR try to show the way to resolve a problem going a little bit opposite way. Let's say we want to remove some modules, that we don't use and it can be done nicely composer (replace with *). This needs well declared dependencies (no hidden) and real modularity (also on test level). However, as long as integration tests are away from modules and are part of project, despite we don't use modules, we make integration tests suite useless as a whole. We have to keep all modules or just don't run them (or manually remove folders for modules we no longer have, what is of course terrible idea, if for example we have to restore module for some reason).

@gabrieldagama
Copy link
Contributor

Risk set to low since tests shouldn't affect other areas.

@sivaschenko
Copy link
Member

Pending discussion and approve of moving integration tests to modules by the Dev Guild

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Nov 16, 2020

@sivaschenko any updates on this? One month already passed...

Also for some reason this PR was moved again to "review". Does it mean we can approve and merge it?
/CC @sidolov

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Nov 18, 2020

Seems like it was mistake. Moved back to correct status

@sivaschenko
Copy link
Member

Completing approval for this pull request can be delayed as we are processing PRs in priority order

@bartoszkubicki
Copy link
Author

@ihor-sviziev, @sivaschenko what is the status of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: AdminNotification Component: Rss Priority: P3 May be fixed according to the position in the backlog. Progress: to approve Release Line: 2.4 Risk: low Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
Status: To Approve
Development

Successfully merging this pull request may close these issues.

Decomposition of dev/tests testsuites across corresponding modules
10 participants