Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 4e2475f

Browse files
authored
Merge pull request #8034 from magento/db_integration_annotations
Updated Integration test docs with missing annotations
2 parents 3b039f6 + aead2ac commit 4e2475f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/guides/v2.4/test/integration/annotations.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ The following annotations are available in integration tests:
1212

1313
Name|Annotation|Format|Description
1414
---|---|---|---
15+
Admin Configuration Fixture|`@magentoAdminConfigFixture`|`@magentoAdminConfigFixture <config_path> <config_value>`| Configures an admin setting for the test run. For example, to enable Captcha, you would use `@magentoAdminConfigFixture admin/captcha/enable 1`.
1516
Application Isolation|`@magentoAppIsolation`|`@magentoAppIsolation enabled|disabled`|Enables or disables application isolation when you run tests. When enabled, an application state after a test run will be the same as before the test run. For example, you should enable it, when you want to create sessions in a test, but you don't want them to affect other tests.
1617
Configuration Fixture|`@magentoConfigFixture`|`@magentoConfigFixture [<store_code>_store] <config_path> <config_value>`|Sets up configuration settings for a particular test. The list of settings is stored in the `core_config_data` database table. After the test execution, the settings revert to their original state.
1718
Database Isolation|`@magentoDbIsolation`|`@magentoDbIsolation enabled|disabled`|Enables or disables database isolation. Disabled by default, unless you are using `@magentoDataFixture`, in which case it is enabled by default. All data, required for a test, live during transaction only. Any test results won't be written in a database.
18-
Data Fixture|`@magentoDataFixture`|`@magentoDataFixture <script_filename>|<method_name>`|Points to a class or a method which creates testing entities (fixtures) for test execution.
19+
Data Fixture|`@magentoDataFixture`|`@magentoDataFixture <script_filename>|<method_name>`|Points to a class or a method which creates testing entities (fixtures) for test execution. These are applied during the transaction.
20+
Data Fixture Before Transaction|`@magentoDataFixtureBeforeTransaction`|`@magentoDataFixtureBeforeTransaction <script_filename>|<method_name>`|Points to a class or a method which creates testing entities (fixtures) for test execution before the transaction has begun. You will need to implement a rollback file for changes made here. (e.g. Fixture file my_fixture.php would also require a my_fixture_rollback.php that reverts the original fixture's changed.)
1921
Application Area|`@magentoAppArea`|`@magentoAppArea adminhtml|frontend|global`|Configures test environment in the context of specified application area.
2022
Enable/Disable Cache|`@magentoCache`|`@magentoCache <type>|all enabled|disabled`|Enables or disables certain cache segment or all of them to prevent isolation problems.
23+
Indexer Dimension Mode|`@magentoIndexerDimensionMode`|`@magentoIndexerDimensionMode <indexer> <mode>`|Sets the indexer dimension mode for the test run. More information can be found in the [DevBlog](https://community.magento.com/t5/Magento-DevBlog/Indexers-parallelization-and-optimization/ba-p/104922_).
2124
Register Components|`@magentoComponentsDir`|`@magentoComponentsDir <dir_path>`|Registers fixture components from specified directory (recursively). Unregisters the components after the test is finished.
2225

2326
### Applying annotations
@@ -26,10 +29,13 @@ The Magento-specific annotations for integration tests are applied in the follow
2629

2730
1. `@magentoAppIsolation`
2831
1. `@magentoDbIsolation`
32+
1. `@magentoDataFixtureBeforeTransaction`
2933
1. `@magentoDataFixture`
34+
1. `@magentoIndexerDimensionMode`
3035
1. `@magentoComponentsDir`
3136
1. `@magentoAppArea`
3237
1. `@magentoCache`
38+
1. `@magentoAdminConfigFixture`
3339
1. `@magentoConfigFixture`
3440

3541
This order is necessary to meet the requirement of setting up the store-scoped configuration values for fixture stores (stores that are created by data fixtures).

0 commit comments

Comments
 (0)