Skip to content

Commit 01e4d4a

Browse files
authored
Add contribution guide (#55)
Fixes #54 Signed-off-by: Zbynek Cervinka <[email protected]>
1 parent d9a7059 commit 01e4d4a

File tree

2 files changed

+72
-16
lines changed

2 files changed

+72
-16
lines changed

CONTRIBUTING.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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.

README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22

33
### Add this library to an existing IntelliJ Plugin project
44

5-
1) Install the plugin to your local maven repository (use Java 8 to run the following cmd)
6-
```
7-
./gradlew publishToMavenLocal
8-
```
9-
10-
2) Extend the build.gradle file of the IntelliJ Plugin repo
5+
1) Extend the build.gradle file of the IntelliJ Plugin repo
116

127
```
138
sourceSets {
@@ -44,7 +39,7 @@ repositories {
4439
}
4540
```
4641

47-
3) Run and close the IntelliJ Idea before and after all the UI tests
42+
2) Run and close the IntelliJ Idea before and after all the UI tests
4843
```
4944
private static RemoteRobot robot;
5045
@@ -58,12 +53,3 @@ public static void closeIde() {
5853
UITestRunner.closeIde();
5954
}
6055
```
61-
62-
### Run JUnit tests to test this library
63-
64-
You can run JUnit tests contained in this repository to test this library by executing the following command:
65-
66-
```sh
67-
cd src/test-project
68-
./gradlew test
69-
```

0 commit comments

Comments
 (0)