Skip to content

Add full integration tests workflow#57

Merged
sprankhub merged 7 commits intomage-os:2.4-developfrom
vpodorozh:full-integration-tests-workflow
Nov 16, 2023
Merged

Add full integration tests workflow#57
sprankhub merged 7 commits intomage-os:2.4-developfrom
vpodorozh:full-integration-tests-workflow

Conversation

@vpodorozh
Copy link
Contributor

@vpodorozh vpodorozh commented Nov 13, 2023

Description (*)

Provide github workflow to run full integration test suite.

Related Pull Requests

Manual testing scenarios (*)

Run manually pipeline workflow "Integration Tests - Full Test Suite"

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@vpodorozh vpodorozh requested a review from a team as a code owner November 13, 2023 19:31
Copy link
Contributor

@Vinai Vinai left a comment

Choose a reason for hiding this comment

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

Small change request, otherwise good 👍

@Vinai
Copy link
Contributor

Vinai commented Nov 14, 2023

The unit test failures are not related to the changes in this PR.

"elasticsearch:7.17"
],
"message_queue": [
null
Copy link
Contributor

Choose a reason for hiding this comment

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

Since warden spins up a rabbitmq container, why not use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We actually can put here quite a big map services and all of them will be taken into account by matrix. The thing is Rabbit MQ is actually not needed for integration tests - so I just left dummy value of null. Not a big deal to change it.

Actually, this is the next questions that we need to address

  • Which services and versions should we count as the most valuable for testing needs?
    I assume this should be the full list of supported services&versions of Magento Open Source based on release notes.
  • How do we handle this? Should we use one list of support services for all tests? Would take too much run-time in pipelines?

Thx @Vinai

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follow up question&suggestion:

Do we need setup tests? To make sure Mage-OS can be setup and run on various services&versions. I think we can actually just run integration&unit tests on one most common pre-set, but run setup tests before release on all variations.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe there are integration tests that test the AMQP integration. If there is no queue configured, these tests are skipped. So, in order to run the full test suite, we need rabbitMQ.

For example \Magento\AsynchronousOperations\Model\MassScheduleTest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Which services and versions should we count as the most valuable for testing needs?

Ideally this should be an optional input, to make it possible to run only a subset of service versions, or by default all supported versions.

Copy link
Contributor

@Vinai Vinai Nov 15, 2023

Choose a reason for hiding this comment

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

How do we handle this? Should we use one list of support services for all tests? Would take too much run-time in pipelines?

The mid-term goal is to use https://github.com/mage-os/github-actions/tree/main/supported-version instead of the supported-services.json.
However, this will require adding all supported versions to the returned matrix of that action.

Copy link
Contributor

@Vinai Vinai left a comment

Choose a reason for hiding this comment

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

Thank you!

@sprankhub sprankhub merged commit bdde41c into mage-os:2.4-develop Nov 16, 2023
mage-os-ci pushed a commit that referenced this pull request Feb 6, 2026
…l methods

Fixed 25 test failures by allowing real method implementations to work:

1. AbstractModelTest.php:
   - Added onlyMethods([]) to allow all methods to use real implementation
   - Changed getMock() to getMockForAbstractClass() for proper abstract handling
   - This fixes 18 failures where methods were returning null

2. AbstractFactoryTest.php:
   - Replaced deprecated createMock(Class, ['param' => value]) syntax
   - Used getMockBuilder()->setConstructorArgs()->getMockForAbstractClass()
   - Added onlyMethods([]) to allow real methods to work
   - This fixes 7 failures in filter creation tests

Pattern: For abstract classes being tested, use:
  ->onlyMethods([])
  ->getMockForAbstractClass()

This allows the real (non-abstract) methods to execute while still
mocking the abstract class instantiation.

Commit #57 - Major test failure reduction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants