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

Commit 4ef5457

Browse files
committed
Fixed static tests
1 parent d2e47ba commit 4ef5457

File tree

1 file changed

+20
-41
lines changed

1 file changed

+20
-41
lines changed

src/contributor-guide/pull-request-tests.md

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,34 @@ Semantic Version Checker is a test that compares the changed code against the ma
2121
Please see the [Backward Compatibility Development Guide](https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/index.html) for more information
2222

2323
### Functional Tests
24+
2425
Functional Tests are PHPUnit-based tests that check Magento functional behavior from the perspective of a user. They press buttons and links in browser, fill and submit forms, look and check what is displayed in the browser's window like real users.
2526

2627
### Sample Data Tests
28+
2729
Sample Data Tests are functional tests that run on Magento with Sample Data included.
2830

2931
### Unit Tests
32+
3033
Unit tests are PHPUnit-based (for PHP) and Jasmine-based (for JS) tests which check the behavior of single methods of Magento classes. The purpose is to validate that each unit of Magento performs as designed.
3134

3235
### Integration Tests
36+
3337
Integration Tests are PHPUnit-based tests that check the behaviour of group of Magento components. They include three types of tests:
34-
* Standard Integration tests which check Magento behavior on installed instance.
35-
* Setup Integration tests which check Magento behavior during the installation process.
36-
* Integration Integrity tests which check the consistency of installed Magento instance (configuration files, DB schemes etc.)
38+
39+
- Standard Integration tests which check Magento behavior on installed instance.
40+
- Setup Integration tests which check Magento behavior during the installation process.
41+
- Integration Integrity tests which check the consistency of installed Magento instance (configuration files, DB schemes etc.)
3742

3843
### WebAPI Tests
3944
WebAPI Tests are functional tests that check the behavior of Magento Web API endpoints. They send requests to endpoints of installed Magento instance and and then check the response received and the state of the instance. Currently they include three kinds of tests:
45+
4046
- SOAP Web API tests
4147
- REST Web API tests
4248
- GraphQL WEB API tests
4349

4450
### Static Tests
51+
4552
Static Tests are set of different checks that analyze each single file of Magento code base separately. Most of them analyze the whole Magento code base whereas some run only against the change set.
4653

4754
### Database Compare
@@ -51,49 +58,21 @@ Database Compare is a test which compares DB schema and data between freshly ins
5158
### Magento Component Health Index
5259

5360
Magento Component Health Index is a test which analyses Magento code quality and calculates weighted health index (100 is great, lower is worse) per Magento Component (module). The index is calculated based on 3 groups of indicators:
54-
- General code quality indicators (GCQI). The metrics described [here](http://pdepend.org/documentation/software-metrics/index.html):
55-
- Inheritance rate
56-
- Coupling Between Objects
57-
- Cyclomatic Complexity Number
58-
- Class Size
59-
- NPath Complexity
60-
- Code Rank
61-
- Number Of Methods
62-
- Number Of Child Classes
63-
- Magento-specific code quality indicators (MSCQ):
64-
- Inline JS usage (<script> tag without attribute **x-magento-init** or **x-magento-template**)
65-
- PHP Static method calls (except unit tests)
66-
- PHP global state usage (global variables usage & static local variable usage, registry object usage)
67-
- PHP usage of protected modifiers for methods & properties (except unit tests)
68-
- PHP and JS 'fixmeComments' usage (**TODO**, **FIXME**, **HACK**, **XXX**, **@SuppressWarnings** etc.)
69-
- Legacy API usage indicators (LAI):
70-
- Legacy method calls in action classes (**loadLayout()**, **renderLayout()** etc.)
71-
- Legacy classes extension (**\Magento\Backend\Block\Widget\Grid\Extended**, **\Magento\Backend\Block\Widget\Form**, **\Magento\Backend\Block\Widget\Form\Generic**, **\Magento\Payment\Model\Method\AbstractMethod**, **\Magento\Payment\Model\Method\Cc**, **\Magento\Backend\Block\Widget\Grid** etc.)
72-
- Legacy layout block classes usage
73-
- Direct class calls instead of an interface that has DI preference
74-
- Comparison of composer dependencies against etalon file
61+
62+
- General code quality indicators (GCQI). The metrics described [here](http://pdepend.org/documentation/software-metrics/index.html)
63+
- Magento-specific code quality indicators (MSCQ)
64+
- Legacy API usage indicators (LAI)
7565

7666
## Running tests for a pull request {#run-pull-request-tests}
7767

7868
Automated tests can be triggered manually with an appropriate comment:
69+
7970
- `@magento run all tests` - run or re-run all required tests against the PR changes
8071
- `@magento run <test-build(s)>` - run or re-run specific test build(s)
81-
For example: `@magento run Unit Tests` or `@magento run Unit Tests,Integration Tests`
82-
83-
`<test-build(s)>` is a comma-separated list of build names. Allowed build names are:
84-
85-
1. `Database Compare`
86-
2. `Functional Tests CE`
87-
3. `Functional Tests EE`,
88-
4. `Functional Tests B2B`
89-
5. `Integration Tests`
90-
6. `Magento Health Index`
91-
7. `Sample Data Tests CE`
92-
8. `Sample Data Tests EE`
93-
9. `Sample Data Tests B2B`
94-
10. `Static Tests`
95-
11. `Unit Tests`
96-
12. `WebAPI Tests`
72+
73+
For example: `@magento run Unit Tests` or `@magento run Unit Tests,Integration Tests`
74+
75+
`<test-build(s)>` is a comma-separated list of build names. Build names can be copied from the Checks section.
9776

9877
## Test results
9978

@@ -107,7 +86,7 @@ When the contribution requires changes to more than one repository merged simult
10786

10887
The related pull requests should be specified in the pull request description in the following format:
10988

110-
```
89+
```lang-none
11190
### Related Pull Requests
11291
https://github.com/<organization>/<repository>/pull/<pull request number>
11392
<links to other realted PRs>

0 commit comments

Comments
 (0)