Skip to content

Commit 0009641

Browse files
Merge pull request #547 from TikhomirovSergey/master
Documentation was synced to latest changes
2 parents bda74e6 + d4b0b74 commit 0009641

18 files changed

+1772
-110
lines changed

archive/docs/How-to-propose-a-PR.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#A good pull-request should contain
2+
3+
### Change list
4+
5+
There should be provided briefly described change list which are you going to propose.
6+
7+
### Types of changes
8+
9+
What types of changes are proposed/introduced to Java client?
10+
_Put an `x` in the boxes that apply_
11+
12+
- [ ] Bugfix (non-breaking change which fixes an issue)
13+
- [ ] New feature (non-breaking change which adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
15+
16+
### Details
17+
18+
There should be provided more details about changes if it is necessary. If there are new features you
19+
can provide code samples which show the way they work and possible use cases. Also you can create [gists](https://gist.github.com)
20+
with pasted java code samples or put them at a PR description using markdown. About markdown please read [Mastering markdown](https://guides.github.com/features/mastering-markdown/) and [Writing on GitHub](https://help.github.com/categories/writing-on-github/)
21+
22+
#Pull-request template
23+
24+
There is [PULL_REQUEST_TEMPLATE.md)](https://github.com/appium/java-client/blob/master/PULL_REQUEST_TEMPLATE.md) which should help you to make a good pull request.
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#Be sure that it is not a server-side problem if you are facing something that looks like a bug
2+
3+
The Appium Java client is the thin client which just sends requests and receives responces generally.
4+
Be sure that this bug is not reported [here](https://github.com/appium/appium/issues) and/or there is
5+
no progress on this issue.
6+
7+
#The good issue report should contain
8+
9+
### Description
10+
11+
The bug report should contain a brief description of a bug.
12+
If it is the feature request then there should be the description of this feature and the way that it should work.
13+
14+
### Environment (bug report)
15+
16+
* java client build version or git revision if you use some shapshot:
17+
* Appium server version or git revision if you use some shapshot:
18+
* Desktop OS/version used to run Appium if necessary:
19+
* Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:
20+
* Mobile platform/version under test:
21+
* Real device or emulator/simulator:
22+
23+
### Details
24+
25+
If it is necessary there should provided more details
26+
27+
28+
### Code To Reproduce Issue (good to Have if you report a bug)
29+
30+
It's easier to reproduce bug and much faster to fix it.
31+
You can git clone https://github.com/appium/sample-code or https://github.com/appium/sample-code/tree/master/sample-code/apps and reproduce an issue using Java and sample apps.
32+
Also you can create a [gist](https://gist.github.com) with pasted java code sample or paste it at ussue description using markdown. About markdown please read [Mastering markdown](https://guides.github.com/features/mastering-markdown/) and
33+
[Writing on GitHub](https://help.github.com/categories/writing-on-github/)
34+
35+
### Ecxeption stacktraces (bug report)
36+
37+
There should be created a [gist](https://gist.github.com) with pasted stacktrace of exception thrown by java.
38+
39+
### Link to Appium logs
40+
41+
There should be created a [gist](https://gist.github.com) which is a paste of your _full_ Appium logs, and link them to a new issue. Do _not_ paste your full Appium logs at the issue description, as it will make this issue very long and hard to read!
42+
If you are reporting a bug, _always_ include Appium logs as linked gists! It helps to define the problem correctly and clearly.
43+
44+
45+
#Issue template
46+
There is [ISSUE_TEMPLATE.md](https://github.com/appium/java-client/blob/master/ISSUE_TEMPLATE.md) which should help you to make a good issue report.
47+
48+
#... And don't say that you weren't warned.
49+
50+
If a report is not readable and/or there is no response from a reporter and some important details are needed then the issue will be closed after some time.
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[Download the jar from Maven](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.appium%22%20AND%20a%3A%22java-client%22) or add the following to pom.xml:
2+
3+
```
4+
<dependency>
5+
<groupId>io.appium</groupId>
6+
<artifactId>java-client</artifactId>
7+
<version>4.1.2</version>
8+
</dependency>
9+
```
10+
11+
It currently depends on selenium-java 2.53.1. If it is necessary to use another version of Selenium then you can configure pom.xml as follows:
12+
13+
```
14+
<dependency>
15+
<groupId>io.appium</groupId>
16+
<artifactId>java-client</artifactId>
17+
<version>4.1.1</version>
18+
<exclusions>
19+
<exclusion>
20+
<groupId>org.seleniumhq.selenium</groupId>
21+
<artifactId>selenium-java</artifactId>
22+
</exclusion>
23+
</exclusions>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>org.seleniumhq.selenium</groupId>
28+
<artifactId>selenium-java</artifactId>
29+
<version>${selenium.version.you.require}</version>
30+
</dependency>
31+
```

archive/docs/Note-for-developers.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# IDE
2+
3+
The **Intellij Idea** is recommended.
4+
5+
# Settings
6+
7+
## Importing the project
8+
9+
This is the Gradle project.
10+
11+
![](https://cloud.githubusercontent.com/assets/4927589/18324097/6141ef7c-7543-11e6-8661-81d631615502.png)
12+
13+
Be sure that:
14+
15+
- The `JAVA_HOME` environmental contains a path to JDK > 7
16+
17+
- If non built-in gradle distribution is used then its version should be > 2.1
18+
19+
## Compiler
20+
21+
This project is compiled in some not common way. We use `ecj` Eclipse Java Compiler. Below is the sample how to define this compiler by IDE.
22+
![eclipse compiler](https://cloud.githubusercontent.com/assets/4927589/14228367/6fce184e-f91b-11e5-837c-2673446d24ea.png)
23+
24+
## JDK
25+
26+
Please check following settings:
27+
28+
![](https://cloud.githubusercontent.com/assets/4927589/18324490/7ffd3ba4-7545-11e6-9f22-eb028737283c.png)
29+
30+
![](https://cloud.githubusercontent.com/assets/4927589/18324593/f5254e3a-7545-11e6-85c5-e4c491ee268d.png)
31+
32+
![](https://cloud.githubusercontent.com/assets/4927589/18324648/3f4635a6-7546-11e6-966c-2949059968ac.png)
33+
34+
![](https://cloud.githubusercontent.com/assets/4927589/18324760/cbca4aee-7546-11e6-8cfb-e86d8018be6a.png)
35+
36+
![](https://cloud.githubusercontent.com/assets/4927589/18324835/2e3bfc04-7547-11e6-8f5e-981aea8f1771.png)
37+
38+
## Coding Standards
39+
40+
Appium java-client strictly follows [Google Java Style](http://google-styleguide.googlecode.com/svn/trunk/javaguide.html) as a coding standards. Contributors are requested to follow this by configuring in their IDE's Editor Code style,
41+
42+
* Clone [Google Style Guide](https://github.com/google/styleguide.git) from git
43+
44+
**Intellij IDEA** users can configure this way,
45+
`Files -> Other Settings -> Default Settings ->Editor -> Code Style -> Manage -> Manage -> Import -> eclipse-java-google-style.xml (Downloaded from Google Style Guide)-> Apply`
46+
47+
Reformat your code before raising a Pull Request.
48+
49+
50+
## Code Coverage
51+
52+
`jacoco-maven-plugin` generates the coverage reports, once integration tests are successfully run by `maven-surefire-plugin`
53+
54+
**Intellij IDEA** user's can configure and view this way,
55+
`Analyse -> show coverage Data -> Add -> Select ${basedir}/target/coverage-reports/jacoco-unit.exec (jacoco-unit.exec generated after integration test run) -> Click Show Selected -> Coverage Results displayed in IDE`
56+
57+
# Please do not forget to check the code before the pull-request proposal.
58+
59+
It is needed to go to the directory where `java_client` is located. You can do it via command line. And then run the following command
60+
61+
`gradle check`. If everything is ok then all checks should be passed. Otherwise you can open reports at `JAVA_CLIENT_DIRECTORY/build/reports`
62+
63+
**The adding of new tests is required when new feature is added or some bug is fixed.**

0 commit comments

Comments
 (0)