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

Updated Integration test docs with missing annotations #8034

Merged
merged 8 commits into from
Oct 16, 2020

Conversation

dobooth
Copy link
Contributor

@dobooth dobooth commented Oct 12, 2020

Purpose of this pull request

This pull request (PR) updated the table with new annotation blocks.

Fixes #7936.

Affected DevDocs pages

https://devdocs.magento.com/guides/v2.4/test/integration/annotations.html

@dobooth dobooth requested a review from nathanjosiah October 12, 2020 18:00
@dobooth dobooth added 2.4.x Magento 2.4.x related changes Editorial Typo and grammar fixes or minor rewrites to correct inaccuracies labels Oct 12, 2020
@@ -12,12 +12,15 @@ The following annotations are available in integration tests:

Name|Annotation|Format|Description
---|---|---|---
Admin Configuration Fixture|`@magentoAdminConfigFixture`|`@magentoAdminConfigFixture <config_path> <config_value>`| Configures an admin setting for the test run. For example, to enabled Captcha, you would use `@magentoAdminConfigFixture admin/captcha/enable 1`.
Copy link
Contributor

Choose a reason for hiding this comment

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

For example, to enabled Captcha, => For example, to enable Captcha,

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.
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.
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.
Data Fixture|`@magentoDataFixture`|`@magentoDataFixture <script_filename>|<method_name>`|Points to a class or a method which creates testing entities (fixtures) for test execution.
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.
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 for changes made here.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe worth an example for clarity?

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.)

Application Area|`@magentoAppArea`|`@magentoAppArea adminhtml|frontend|global`|Configures test environment in the context of specified application area.
Enable/Disable Cache|`@magentoCache`|`@magentoCache <type>|all enabled|disabled`|Enables or disables certain cache segment or all of them to prevent isolation problems.
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_).
Copy link
Contributor

Choose a reason for hiding this comment

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

I still feel like this doesn't make any sense as a random blog post. This blog post is technical documentation that can't be found anywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I am going to see if there is a place on devdocs for this.

@dobooth
Copy link
Contributor Author

dobooth commented Oct 16, 2020

running tests

@dobooth
Copy link
Contributor Author

dobooth commented Oct 16, 2020

running tests

@ghost
Copy link

ghost commented Oct 16, 2020

Hi @dobooth, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@dobooth dobooth deleted the db_integration_annotations branch October 16, 2020 19:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.4.x Magento 2.4.x related changes Editorial Typo and grammar fixes or minor rewrites to correct inaccuracies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Docs For Missing Integration Test Annotations
4 participants