|
| 1 | +# How to Contribute |
| 2 | + |
| 3 | +Thank you for your interest into contributing to the IntelliJ IDEA UI test library. Contributions are essential for expansion and growth of this project. |
| 4 | + |
| 5 | + |
| 6 | +## First Time Setup |
| 7 | +1) Install prerequisites: |
| 8 | + * [Java Development Kit](https://adoptopenjdk.net/) |
| 9 | +2) Fork and clone the repository |
| 10 | +3) Import the folder as a project in JetBrains IntelliJ IDEA |
| 11 | + |
| 12 | + |
| 13 | +## Project Structure |
| 14 | + |
| 15 | +This project is structured into 5 main parts. |
| 16 | + |
| 17 | +### 1) Package <i>fixtures</i> |
| 18 | +Package <i>fixtures</i> contains several predefined fixtures that can be instantiated and used to access and work with the IntelliJ IDEA UI elements such as wizards, buttons, inputs and other parts of the IntelliJ IDEA IDE. |
| 19 | + |
| 20 | +### 2) Package <i>utils</i> |
| 21 | + |
| 22 | +Package <i>utils</i> contains static methods and constants that can be useful for writing IntelliJ IDEA UI tests. There are for example methods for taking sceenshots or creating new project without the need of implementing the whole process using provided fixtures. |
| 23 | + |
| 24 | +### 3) Package <i>exceptions</i> |
| 25 | + |
| 26 | +Package <i>exceptions</i> contains predefined exceptions for handling situation such as the object that I am creating fixture for does not exists or there is unrelevant or unsupported option passed into a method. |
| 27 | + |
| 28 | +### 4) Class <i>UITestRunner</i> |
| 29 | + |
| 30 | +* Class contains static methods for starting and closing IntelliJ IDEA for UI tests |
| 31 | +* Class contains public enum IdeaVersion defining supported IntelliJ IDEA versions |
| 32 | +* Class contains other public methods to work with the IntelliJ IDEA |
| 33 | + * getIdeaVersion() |
| 34 | + * getRemoteRobot() |
| 35 | + * getRemoteRobotConnection() |
| 36 | + <br>... |
| 37 | + |
| 38 | +### 5) The <i>test-project</i> folder |
| 39 | + |
| 40 | +The <i>test-project</i> folder contains simple test project with JUnit 5 tests. |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +## Building the Library Locally |
| 45 | + |
| 46 | +For building the library locally run the following command in the root of the project. The project will be built and installed into your .m2 local repository. |
| 47 | + |
| 48 | +``` |
| 49 | +$ ./gradlew publishToMavenLocal |
| 50 | +``` |
| 51 | + |
| 52 | + |
| 53 | +## Running Tests |
| 54 | + |
| 55 | +To exeute the JUnit 5 tests run the following command: |
| 56 | + |
| 57 | +``` |
| 58 | +$ cd ./src/test-project |
| 59 | +$ ./gradlew clean test |
| 60 | +``` |
| 61 | + |
| 62 | + |
| 63 | +## Reporting Issues |
| 64 | + |
| 65 | +If you encounter a problem and know it is caused by the IntelliJ IDEA UI test library, please open an [issue report](https://github.com/redhat-developer/intellij-common-ui-test-library/issues). We really do appriciate any relevant issue report containg at least description and steps to reproduce the issue. |
| 66 | + |
| 67 | + |
| 68 | +## License |
| 69 | + |
| 70 | +This project is distributed under the Eclipse Public License - v 2.0 license. For more information see the [LICENSE](./LICENSE) file in the root of this repository. |
0 commit comments