Skip to content

#325: redesign of Android test - #353

Merged
TikhomirovSergey merged 8 commits into
appium:masterfrom
TikhomirovSergey:#325_fix_android
Apr 6, 2016
Merged

TikhomirovSergey merged 8 commits into
appium:masterfrom
TikhomirovSergey:#325_fix_android

Conversation

@TikhomirovSergey

Copy link
Copy Markdown
Contributor

Change list

  • fix of TouchAction. Instances of the TouchAction are reusable now
  • redesign of Android test. They are speedy and more stable now

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

  1. It was imposible to re-use instances of the TouchAction. Proposed changes should improve it.
  2. Enhanced test coverage. More tests and less time.

@TikhomirovSergey

Copy link
Copy Markdown
Contributor Author

@SrinivasanTarget Can you review this PR.

@Jonahss @bootstraponline you can take a look at this PR too if you want :)

service.start();

if (service == null || !service.isRunning())
throw new RuntimeException("An appium server node is not started!");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This same beforeClass code is duplicated everywhere. maybe refactor this into a method that can be used across multiple classes?

@TikhomirovSergey

Copy link
Copy Markdown
Contributor Author

@bootstraponline Thanks for the remork. It was improved

driver.startActivity("io.appium.android.apis", ".accessibility.AccessibilityNodeProviderActivity");
Assert.assertEquals(driver.currentActivity(), ".accessibility.AccessibilityNodeProviderActivity");
driver.startActivity("com.android.contacts", ".ContactsListActivity", "com.android.contacts", ".ContactsListActivity", false);
Assert.assertEquals(driver.currentActivity(), ".ContactsListActivity");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertEquals should be statically imported so Assert. can be omitted.

@bootstraponline

Copy link
Copy Markdown
Member

Code looks good to me. 👍

@TikhomirovSergey

Copy link
Copy Markdown
Contributor Author

@bootstraponline The second code style issue was fixed. iOS tests are going to be redesigned the same way. This PR is the partial fix of #325

@SrinivasanTarget

Copy link
Copy Markdown
Member

LGTM

@bootstraponline

Copy link
Copy Markdown
Member

👍

@TikhomirovSergey
TikhomirovSergey merged commit efdb5e6 into appium:master Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants