Skip to content

Commit d2ccf57

Browse files
author
radeva
authored
docs(readme): update readme & add contributing.md (#86)
1 parent 229267b commit d2ccf57

File tree

2 files changed

+120
-9
lines changed

2 files changed

+120
-9
lines changed

CONTRIBUTING.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Contributing to nativescript-dev-appium
2+
3+
:+1: First of all, thank you for taking the time to contribute! :+1:
4+
5+
Here are some guides on how to do that:
6+
7+
<!-- TOC depthFrom:2 -->
8+
9+
- [Code of Conduct](#code-of-conduct)
10+
- [Reporting Bugs](#reporting-bugs)
11+
- [Requesting Features](#requesting-features)
12+
- [Submitting a PR](#submitting-a-pr)
13+
- [Where to Start](#where-to-start)
14+
15+
<!-- /TOC -->
16+
17+
## Code of Conduct
18+
Help us keep a healthy and open community. We expect all participants in this project to adhere to the [NativeScript Code Of Conduct](https://github.com/NativeScript/codeofconduct).
19+
20+
21+
## Reporting Bugs
22+
23+
1. Always update to the most recent master release; the bug may already be resolved.
24+
2. Search for similar issues in the issues list for this repo; it may already be an identified problem.
25+
3. If this is a bug or problem that is clear, simple, and is unlikely to require any discussion -- it is OK to open an issue on GitHub with a reproduction of the bug including workflows and screenshots. If possible, submit a Pull Request with a failing test, entire application or module. If you'd rather take matters into your own hands, fix the bug yourself (jump down to the [Submitting a PR](#submitting-a-pr) section).
26+
27+
## Requesting Features
28+
29+
1. Use Github Issues to submit feature requests.
30+
2. First, search for a similar request and extend it if applicable. This way it would be easier for the community to track the features.
31+
3. When requesting a new feature, please provide as much detail as possible about why you need the feature in your apps. We prefer that you explain a need rather than explain a technical solution for it. That might trigger a nice conversation on finding the best and broadest technical solution to a specific need.
32+
33+
## Submitting a PR
34+
35+
Before you begin:
36+
* Read and sign the [NativeScript Contribution License Agreement](http://www.nativescript.org/cla).
37+
* Make sure there is an issue for the bug or feature you will be working on.
38+
39+
Following these steps is the best way to get you code included in the project:
40+
41+
1. Fork and clone the nativescript-dev-appium repo:
42+
```bash
43+
git clone https://github.com/<your-git-username>/nativescript-dev-appium.git
44+
# Navigate to the newly cloned directory
45+
cd nativescript-dev-appium
46+
# Add an "upstream" remote pointing to the original {N} repo.
47+
git remote add upstream https://github.com/NativeScript/nativescript-dev-appium.git
48+
```
49+
50+
2. Set up the project:
51+
52+
```bash
53+
#In the repo root
54+
npm install
55+
```
56+
57+
3. Create a branch for your PR
58+
```bash
59+
git checkout -b <my-fix-branch> master
60+
```
61+
62+
4. The fun part! Make your code changes. Make sure you:
63+
- Follow the [NativeScript code conventions guide](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md).
64+
65+
5. Before you submit your PR:
66+
- Rebase your changes to the latest master: `git pull --rebase upstream master`.
67+
- Ensure your changes pass tslint validation. (run `npm run tslint` in the root of the repo).
68+
69+
6. Push your fork. If you have rebased you might have to use force-push your branch:
70+
```
71+
git push origin <my-fix-branch> --force
72+
```
73+
74+
7. [Submit your pull request](https://github.com/NativeScript/nativescript-dev-appium/compare). Please, fill in the Pull Request template - it will help us better understand the PR and increase the chances of it getting merged quickly.
75+
76+
It's our turn from there on! We will review the PR and discuss changes you might have to make before merging it! Thanks!
77+
78+
79+
## Where to Start
80+
81+
If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-dev-appium/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).

README.md

+39-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,44 @@
22

33
A package to help with writing and executing e2e [Appium](http://appium.io) tests.
44

5-
## <a name='requirements'></a>Requirments
5+
<!-- TOC depthFrom:2 -->
6+
7+
- [Requirеments](#requirеments)
8+
- [Set Up](#set-up)
9+
- [Structure](#structure)
10+
- [Files Preview](#files-preview)
11+
- [Usage](#usage)
12+
- [Custom Appium Capabilities](#custom-appium-capabilities)
13+
- [Options](#options)
14+
- [Features](#features)
15+
- [Troubleshooting](#troubleshooting)
16+
- [Common Problems](#common-problems)
17+
- [Missing Features](#missing-features)
18+
- [Contribute](#contribute)
19+
- [Get Help](#get-help)
20+
21+
<!-- /TOC -->
22+
23+
## Requirеments
624

725
The `nativescript-dev-appium` plugin requires:
826
* latest version of [Appium](https://github.com/appium/appium/releases)
927
* latest version of [Xcode](https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html)
1028
* [Android SDK Tools](https://developer.android.com/studio/releases/sdk-tools.html) version greater than 25.3.0
1129

12-
## <a name='setup'></a>Set Up
30+
## Set Up
1331

1432
Add the plugin as a `devDependency` to your project:
1533

16-
`$ npm install -D nativescript-dev-appium`
34+
```shell
35+
$ npm install -D nativescript-dev-appium
36+
```
1737

1838
Then install [Appium](https://www.npmjs.com/package/appium) - we recommend a global installation to avoid adding it to every project you would like to test:
1939

20-
`$ npm install -g appium`
40+
```shell
41+
$ npm install -g appium
42+
```
2143

2244
After completion of the installation, if your project has a dependency to *TypeScript*, the plugin should have added an `e2e` folder containing predefined configs and samples.
2345

@@ -52,7 +74,7 @@ After completion of the installation, if your project has a dependency to *TypeS
5274
> * `e2e/reports` - this folder is created during test execution and stores the actual images from comparison
5375
> * `e2e/resources` - this folder aims to store the expected images for comparison
5476
55-
## <a name='usage'></a>Usage
77+
## Usage
5678

5779
Before running the tests you will have to build your app for the platform on test or both. Navigate to your demo app folder from where you will execute the commands that follow.
5880

@@ -80,7 +102,7 @@ $ npm run e2e -- --runType sim.iPhone8.iOS110
80102

81103
Generated tests are standard [Mocha](http://mochajs.org) tests.
82104

83-
## <a name='customCapabilities'></a>Custom Appium Capabilities
105+
## Custom Appium Capabilities
84106

85107
When installed, the plugin creates `e2e` folder containing sample test file and configuration folder `config` where your custom capabilities reside.
86108
The existence of such capabilities is a runner's requirement which comes from [Appium](https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md). Additional locations where the runner will search for the config file are:
@@ -109,7 +131,7 @@ Thus, the same configuration can be used by both apps without duplication of fil
109131

110132
If you wish to use another location of the capapabilities file instead default ones, you can specify it with `--capsLocation` option. Remember that the path provided has to be relative to the root directory.
111133

112-
Notice that once custom capabilities are provided you will be able to pick any of them using the `--runType` option (e.g. `--runType android25`). Sample content of `appium.capabilities.json` file could be:
134+
Notice that once custom capabilities are provided you will be able to pick any of them using the `--runType` option (e.g. `--runType android25`). See sample content of `appium.capabilities.json` file below. For more details regarding the Appium Capabilities read [Appium documentation about Desired Capabilities](https://appium.io/docs/en/writing-running-appium/caps/):
113135

114136
```
115137
{
@@ -146,7 +168,7 @@ As you can see, the `app` property can be left an empty string which will force
146168

147169
**It is important to build your app in advance as explained in [Usage](#usage) section, because the runner expects to provide app package to it or such to exists in the search location.**
148170

149-
## <a name='options'></a>Options
171+
## Options
150172

151173
|Option| Description | Value |
152174
|---|---|---|
@@ -186,9 +208,17 @@ $ npm run e2e -- --runType android25 --verbose
186208
## Common Problems
187209

188210
1. Missing installed appium
189-
2. Missleading appPath or capabilities location. Please make sure that the path to the app or capabilities location is correct.
211+
2. Misleading appPath or capabilities location. Please make sure that the path to the app or capabilities location is correct.
190212

191213

192214
## Missing Features
193215

194216
1. Faster developer turnaround when working on an app. Find a way to use livesync and kick off Appium tests for the app that's on the device already.
217+
218+
## Contribute
219+
We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md). If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-dev-appium/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
220+
221+
## Get Help
222+
Please, use [github issues](https://github.com/NativeScript/nativescript-dev-appium/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-features). For general questions and support, check out the [NativeScript community forum](https://discourse.nativescript.org/) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation).
223+
224+
![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-dev-appium?pixel)

0 commit comments

Comments
 (0)