New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration testing using appium for the iOS #602

Merged
merged 1 commit into from May 25, 2017

Conversation

Projects
None yet
5 participants
@kunall17
Contributor

kunall17 commented May 15, 2017

Currently test's for connection with server and login through dev auth backend is implemented

http://chase-seibert.github.io/blog/2017/01/06/appium-react-native-quickstart.html is a great guide to get started with the appium testing

@smarx

This comment has been minimized.

smarx commented May 15, 2017

Automated message from Dropbox CLA bot

@kunall17, it looks like you've already signed the Dropbox CLA. Thanks!

@borisyankov

This comment has been minimized.

Contributor

borisyankov commented May 15, 2017

Cooool!

@@ -0,0 +1,47 @@
## Installation for the appium testing dependencies

This comment has been minimized.

@borisyankov

borisyankov May 15, 2017

Contributor

Maybe move the file to docs/appium.md

@@ -0,0 +1,62 @@
from appium import webdriver

This comment has been minimized.

@borisyankov

borisyankov May 15, 2017

Contributor

I wonder if we want to use Node for test writing?
As the project itself is JavaScript based and is not guaranteed that contributors even know Python or have it installed.

This comment has been minimized.

@kunall17

kunall17 May 15, 2017

Contributor

True that,
Thoughts @timabbott @neerajwahi ?

This comment has been minimized.

@timabbott

timabbott May 15, 2017

Member

If the libraries are just as good, doing JavaScript for the mobile tests is a great strategy, since the fewer languages one needs to learn, the better.

Already RN has JavaScript/iOS/Android, that's enough things to know :)

To install appium execute from the root folder of zulip-mobile
```
cd int-test

This comment has been minimized.

@borisyankov

borisyankov May 15, 2017

Contributor

We might want to add a script to that (maybe later, is good as instructions for now)

@kunall17 kunall17 changed the title from Add integration testing using appium for the iOS to [WIP] Add integration testing using appium for the iOS May 21, 2017

@kunall17

This comment has been minimized.

Contributor

kunall17 commented May 21, 2017

@neerajwahi

Thanks for the hard work on this @kunall17 ! Some comments below

const options = {
validEmail: 'iago@zulip.com',
inValidEmail: 'invalid@zulip.com',

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

Nit: inValid -> invalid

await driver.refresh();
});
it('Test to connect to the URL', () => driver

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

Nit: I would reword the test names as "Successfully connects to a Zulip realm" and "Signs in using the dev auth backend"

});
it('Test to connect to the URL', () => driver
.sleep(2000)

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

sleep could result in the test suite being very flaky. We should instead wait for the particular elements we need to appear

@@ -17,7 +17,8 @@
"test:flow": "flow",
"test:unit": "jest",
"test:coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"test": "npm run test:lint && npm run test:coveralls && npm run test:flow"
"test": "npm run test:lint && npm run test:coveralls && npm run test:flow",
"test-int": "mocha --compilers js:babel-core/register __int-tests__/basic.js"

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

Also I'd probably rename 'test-int' to something a bit more descriptive like 'test-appium'

@@ -0,0 +1,11 @@
/*eslint-disable */
var wd = require("wd");

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

Can we rewrite this in ES6 style?

"babel-eslint": "^7.1.1",
"babel-jest": "^20.0.0",
"babel-polyfill": "^6.23.0",

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

What does babel-polyfill do?

@@ -33,7 +33,7 @@ class AuthScreen extends React.Component {
<View style={styles.container}>
<Label
style={[styles.field]}
value={this.props.realm}
text={this.props.realm}

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

Why the change from value to text?

This comment has been minimized.

@borisyankov

borisyankov May 22, 2017

Contributor

This one was a bug, but it is actually fixed in master. Needs rebase I guess?

.eslintrc Outdated
@@ -45,7 +45,7 @@
"react/no-array-index-key": 0,
"react/no-unused-prop-types": 0,
"import/prefer-default-export": 0,
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/__tests__/*.js"]}],
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/__tests__/*.js", "**/__int-tests__/*.js"]}],

This comment has been minimized.

@neerajwahi

neerajwahi May 22, 2017

Member

Nit: I'd rename the __int-test__ directory to __appium-tests__ or even just __tests__ (and let the fact that it's a top-level directory indicates that it's integration and not unit tests)

@kunall17 kunall17 changed the title from [WIP] Add integration testing using appium for the iOS to Add integration testing using appium for the iOS May 24, 2017

@kunall17

This comment has been minimized.

Contributor

kunall17 commented May 24, 2017

Updated works on jest! :)

@borisyankov

This comment has been minimized.

Contributor

borisyankov commented May 25, 2017

That's a good start to our end-to-end testing.
Good to merge, we will polish and improve more on this soon.

@borisyankov borisyankov merged commit 768dba9 into zulip:master May 25, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment