* Update README

* Add Test section

* Several fixes

* Update README.md

* Update README.md
This commit is contained in:
Anna Kocheshkova 2018-04-23 09:33:10 +03:00 коммит произвёл Max
Родитель bf5fb83f17
Коммит d6ca6ec7f7
2 изменённых файлов: 65 добавлений и 16 удалений

Просмотреть файл

@ -1,5 +1,5 @@
# VSCode App Center Tools · [![Build Status](https://msmobilecenter.visualstudio.com/_apis/public/build/definitions/d7809725-8fd7-4b76-8022-ebb8720603f6/2854/badge)](https://msmobilecenter.visualstudio.com/Patricks%20Sandbox/_build/index?definitionId=2854)
This extension provides a development support for App Center projects.
This extension provides development support for App Center projects.
_NOTE: Currently it supports only React-Native based apps._
@ -11,32 +11,81 @@ _NOTE: Currently it supports only React-Native based apps._
* git
## How does it work
There are several possible scenarios how this extension could be used:
## How it works
There are several possible scenarios this extension solves:
1. You would like to start development from the scratch with the new application already linked and configured to [AppCenter](https://appcenter.ms):
* You clone new empty repository on your machine with `git clone new-repo-name` and `cd new-repo-name` and open this folder in VS Code.
* You login to the appcenter from the App Center StatusBar
1. Start development of a new React Native application with [App Center](https://appcenter.ms) already configured:
* Clone a new empty repository to your machine or log into the extension with a VSTS access token.
* Login to the App Center using the new status bar icon.
![Login to Appcenter](images/appcenter-login.png)
* After logged in you click the App Center StatusBar to show App Center Menu options.
![Login to App Center](images/appcenter-login.png)
* After logging in click the App Center status bar to show possible menu options
![AppCenter Menu](images/appcenter-start-new-idea.png)
* You will be prompted to enter idea name and select user or organization where you would like to create app in appcenter
* App Center sample app will be cloned into the repository you have provided (it would also have preconfigured App Center Analytics/Crashes/CodePush stuff)
* Two react-native apps (for iOS and Android) will be created in appcenter (`ideaname-ios` and `ideaname-android`)
* CodePush deployments will be created for every app
* App will be linked with corresponding iOS/Android secret keys and CodePush deployment keys
* You will be prompted to enter a new for your project and select user or organization where you would like to create app in App Center
* App Center sample app will be cloned into the repository you have provided (it will also have preconfigured for App Center Analytics/Crashes/CodePush SDK's)
* Two React Native apps (for iOS and Android) will be created in App Center (`project-name-ios` and `project-name-android`)
* CodePush deployments will be created for both apps
* Apps will be automatically linked with corresponding iOS/Android secret keys and CodePush deployment keys
* Changes will be pushed to your remote repository
* New Testers Distribution Group will be created for every new app in appcenter, app will be connected to your GH repository `master` branch and new build will be started
* New Testers Distribution Group will be created for every new app in App Center
* App will be connected to your GH repository `master` branch and new build will be started
* You will be notified when finished and also we will automatically run `npm install` for you
2. You would like to open already existant react-native application with CodePush already installed. When logged in the following App Center Menu options should be avaliable:
2. Link an existing react-native application to App Center.
You will see a "Set Current App" option, when logged in.
You can either choose an app from App Center or choose it to be created for you.
When you pick "Create an App Center app" option, several options are available:
* Create an app for Android
* Create an app for iOS
* Create apps for both platforms
If you choose one of the first two, the app will be created and automatically set as current. If you choose to create two apps, you will have to pick one of them as current when a prompt is shown.
When the app is linked to App Center, several new options appear in the menu:
* Build
* Test
* Distribute
* Crashes
* Analytics
They all open the corresponding App Center tabs for the application. "Distribute" also contains CodePush stuff.
3. You would like to open already existing react-native application with CodePush installed. When logged in, the following App Center Menu options should be avaliable under "Distribute > CodePush":
* Set current app for CodePush
* Change current Deployment
* Change target binary verson
* Change if release should be mandatory
* Make new CodePush release
## Test
If your React Native application has UI tests you can run it in the App Center cloud using the extension.
### Preparing tests
In order to run the tests in App Center cloud you need [App Center CLI](https://github.com/Microsoft/appcenter-cli). To install it run `npm install -g appcenter-cli` in terminal.
#### iOS
Currently, extension supports running of XCUI tests only. Please, follow [the instructions for App Center portal docs](https://docs.microsoft.com/en-us/appcenter/test-cloud/preparing-for-upload/xcuitest) to prepare tests for uploading to the App Center cloud.
### Running tests
1. Open **App Center menu** and then click **Test** button.
TODO image
2. To run tests you can use two options: `Run UI tests` and `Run UI tests asynchronously`. Command `Run UI tests` will start to build your application for testing, upload it together with tests to App Center cloud and then run it there waiting for tests to be done. Command `Run UI tests asynchronously` does the same thing except it exits the command when tests are uploaded, without waiting for test results. Choose the one you prefer the most. Also, you can track progress of command below in status bar.
TODO image
3. Select device configuration for tests.
TODO image
4. After that, `Output->React Native` window will be opened where you can monitor the progress of the build, upload and run the tests.
TODO image
## Contributing
There are a couple of ways you can contribute to this repo:

Просмотреть файл

@ -185,7 +185,7 @@
"appcenter.api.configurebranchandstartnewbuild": {
"description": "Configure branch and start new build",
"type": "boolean",
"default": "true"
"default": "false"
},
"appcenter.api.defaultbranchname": {
"description": "App Center Default Branch Name",