mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
testing_plugins.md: link intellij-ui-test-robot
This commit is contained in:
parent
cdc54c7d51
commit
df1e2b84b1
@ -1,6 +1,6 @@
|
||||
[//]: # (title: Testing Plugins)
|
||||
|
||||
<!-- Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
|
||||
Most of the tests in the IntelliJ Platform codebase are *model level functional tests*.
|
||||
What this means is the following:
|
||||
@ -15,16 +15,19 @@ The most significant benefit of this test approach is that tests are very stable
|
||||
|
||||
In a product with 15+ years of a lifetime that has gone through a large number of internal refactorings, we find that this benefit dramatically outweighs the downsides of slower test execution and more difficult debugging of failures being compared to more isolated unit tests.
|
||||
|
||||
Another consequence of our testing approach is what our test framework does not provide:
|
||||
### Mocks
|
||||
|
||||
* We do not provide a recommended approach to mocking.
|
||||
We have a few tests in our codebase that use JMock.
|
||||
Still, in general, we find it difficult to mock all of the interactions with IntelliJ Platform components that your plugin class will need to have.
|
||||
We recommend working with real components instead.
|
||||
* We do not provide a general-purpose framework for Swing UI testing.
|
||||
You can try using tools such as [FEST](https://code.google.com/p/fest/) or [Sikuli](https://sikulix.com/) for plugin UI testing, but we don't use either of them and cannot provide any guidelines for their use.
|
||||
Internally, we use manual testing for testing our Swing UIs.
|
||||
Please do not use _platform/testGuiFramework_; it is reserved for internal use.
|
||||
Another consequence of our testing approach is that we do not provide a recommended approach to mocking.
|
||||
We have a few tests in our codebase that use JMock.
|
||||
Still, in general, we find it difficult to mock all of the interactions with IntelliJ Platform components that your plugin class will need to have.
|
||||
We recommend working with real components instead.
|
||||
|
||||
### UI Tests
|
||||
|
||||
Please see dedicated [intellij-ui-test-robot](https://github.com/JetBrains/intellij-ui-test-robot) library.
|
||||
It is fully integrated with Gradle-based setup via `runIdeForUiTests` task.
|
||||
|
||||
Please do not use _platform/testGuiFramework_; it is reserved for internal use.
|
||||
|
||||
## Topics
|
||||
* [Tests and Fixtures](tests_and_fixtures.md)
|
||||
|
Loading…
x
Reference in New Issue
Block a user