Questions tagged [integration-test]
Denotes questions related to integration tests on Magento.
65 questions
0 votes
0 answers
45 views
How can we disable Amqp modules during integration test?
When I try to run integration tests: I get below error: Module 'Magento_Amqp': In Reader.php line 96: [LogicException] Service interface was expected, "Magento\TestModuleSynchronousAmqp\Api\...
0 votes
1 answer
73 views
How to use different config settings in Magento integration tests?
I want to use Magento's integration test suite to test some of my customizations. My code calls an external web API, which has different URLs depending of the environment which is used. My module's ...
3 votes
1 answer
162 views
TDD : Units Test And Integration Tests : Part Two
This question comes as a complement from issue already posted in Magento 2 and TDD good practices to implement tests After I implemented my own understanding of the solution provided. I'm getting the ...
3 votes
2 answers
565 views
Magento 2 and TDD good practices to implement tests
here is my concern, when it comes to testing in Magento 2, I find documentation is quite obselete or very difficult to understand. If PhpUnit offers ways to test a simple method...I feel like as soon ...
0 votes
0 answers
123 views
Facing issue to write test case for the product custom attribute for graphQL API response
I build a functionality where in I have custom attribute in product, I am using graphQL query to fetch the products list. To test this functionality I am writing a test case which will check if query ...
1 vote
1 answer
732 views
Integration Test not working in Custom Module Magento 2
I am creating the Integration test in my custom module. I have installed the module in vendor folder structure is like as vendor/[ModuleVendor]/[ModuleName]/Src I am using below command to run the ...
4 votes
4 answers
6k views
Getting "Connection "default" is not defined" during integration test sandbox setup
On a dockerized CI environment (Ubuntu 20.04) we are getting the following error: cd dev/tests/integration; ../../../vendor/bin/phpunit -v --testsuite 'Our Tests' ... Disabling Maintenance Mode: In ...
1 vote
0 answers
262 views
Why are extension attributes not loaded during this integration test?
I have a module that adds two extension attributes to Magento\Sales\Api\Data\OrderAddressInterface: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2 votes
1 answer
295 views
Plugin not executed in test
I have a plugin that plugs into the execute method of \Magento\Checkout\Controller\Cart\Index and redirects under some condition. di.xml: <?xml version="1.0" ?> <config xmlns:xsi=&...
0 votes
1 answer
638 views
Integration test setup fails The entity ID is incorrect. Verify the ID and try again
I have an existing store with a collection of existing plugins. I'm trying to setup an integration test to test some new features, but the test doesn't get past the installation: Module '...
0 votes
1 answer
262 views
Getting "The configuration file has changed. Run the "app:config:import" ...." during integration tests, after most of them ran already
We are getting the below message just after lots of integration tests already ran properly. How can this be caused? Configuration: /var/www/dev/tests/integration/phpunit.xml II............................
2 votes
1 answer
228 views
Difference Between @magentoAdminConfigFixture and @magentoConfigFixture
When writing integration tests, there are two quite similar annotations: @magentoAdminConfigFixture (GitHub) @magentoConfigFixture (GitHub) The latter one is used much more often: $ grep -R '@...
2 votes
3 answers
4k views
User Error: Some transactions have not been committed or rolled back during integration tests, only on CI
TL;DR I am getting the above error when running integration tests on a CI docker environment. The problem seems that somewhere within $this->dispatch() the test fails, but does not output any error ...
0 votes
1 answer
248 views
Integration tests - error when connecting to the database
I'm having trouble running the magento2 integration tests. I followed the documentation and set up the database parameters in install-config-mysql.php : 'db-host' => 'mysql:3306', 'db-user' => ...
1 vote
1 answer
3k views
Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed()
I'm getting an error Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed() when running integration tests on my local development environment. For some reason it ...