Skip to content
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 codecov and run android tests via travis #526

Merged
merged 6 commits into from Jan 5, 2018
Merged

Add codecov and run android tests via travis #526

merged 6 commits into from Jan 5, 2018

Conversation

mueller-ma
Copy link
Member

See this PR for an example: https://github.com/mueller-ma-bot/openhab.android/pull/1
I also tested Sputnik there, but this is not included in this PR.

@digitaldan This is just the config for codecov. To add it, go to their website and login via github.

Hopefully this will help to increase the code coverage. Current is ~6%

@mueller-ma mueller-ma added the automation Everything related to Bots label Dec 14, 2017
@codecov-io
Copy link

codecov-io commented Dec 14, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@c31e282). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #526   +/-   ##
=========================================
  Coverage          ?   31.86%           
=========================================
  Files             ?       64           
  Lines             ?     4852           
  Branches          ?      655           
=========================================
  Hits              ?     1546           
  Misses            ?     3087           
  Partials          ?      219

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c31e282...5ac28fb. Read the comment docs.

@mueller-ma mueller-ma closed this Jan 1, 2018
@mueller-ma mueller-ma reopened this Jan 1, 2018
@mueller-ma
Copy link
Member Author

Travis build failed because of the failing espresso ui test. Fix is in #584
https://travis-ci.org/openhab/openhab.android/builds/323801074

@kaikreuzer
Copy link
Member

@mueller-ma Only the links to old Travis jobs are now broken - new ones are already correct as you can see on https://travis-ci.org/openhab/openhab-android

@mueller-ma mueller-ma closed this Jan 1, 2018
@mueller-ma mueller-ma reopened this Jan 1, 2018
@mueller-ma mueller-ma changed the title Add codecov Add codecov and run android tests via travis Jan 1, 2018
@FlorianSW
Copy link
Member

So, I've run the same test suite locally and it succeeded. However, I used api level 27, travis uses 22 (I assume this is intentional?), however, this shouldn't make any difference.

On the other hand, when running master, I also have only 4 tests:
Starting 4 tests on Nexus_5X_API_26(AVD) - 8.0.0
travis runs 5:
Starting 5 tests on test(AVD) - 5.1.1

And org.openhab.habdroid.ui.BasicWidgetTest > openHABMainActivityTest[test(AVD) - 5.1.1] FAILED
android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (with id: android:id/text1 and with text: is "demo" and Child at position 0 in parent (an instance of android.widget.ListView and Child at position 0 in parent an instance of android.widget.FrameLayout) and is displayed on the screen to the user)

should've failed for 2 other tests, too, if there's really no demo sitemap. I currently rerun the tests with 5.1.1 and will checkout this pull request to maybe get it reproduced locally :)

@mueller-ma
Copy link
Member Author

travis uses 22 (I assume this is intentional?)

I'm planning to create a build matrix in a different PR after this one is merged. Than tests run on multiple APIs.

@FlorianSW
Copy link
Member

Ok, so running the same test suite on Android 5.1.1, the view Hierarchy is slightly different. That's what you get on API level 27 currently:

View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1024, height=496, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->FrameLayout{id=-1, visibility=VISIBLE, width=940, height=412, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=42.0, child-count=2}
|
+-->FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=940, height=412, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->AlertDialogLayout{id=16909134, res-name=parentPanel, visibility=VISIBLE, width=940, height=412, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4}
|
+---->LinearLayout{id=16909382, res-name=topPanel, visibility=VISIBLE, width=940, height=139, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+----->LinearLayout{id=16909372, res-name=title_template, visibility=VISIBLE, width=940, height=118, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+------>AppCompatImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+------>DialogTitle{id=16908696, res-name=alertTitle, visibility=VISIBLE, width=814, height=71, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=63.0, y=47.0, text=Select default sitemap, input-type=0, ime-target=false, has-links=false}
|
+----->Space{id=16909367, res-name=titleDividerNoCustom, visibility=VISIBLE, width=940, height=21, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=118.0}
|
+---->FrameLayout{id=16908800, res-name=contentPanel, visibility=VISIBLE, width=940, height=273, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=139.0, child-count=1}
|
+----->RecycleListView{id=16909239, res-name=select_dialog_listview, visibility=VISIBLE, width=940, height=273, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+------>AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=940, height=126, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=demo, input-type=0, ime-target=false, has-links=false}
|
+------>AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=940, height=126, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=126.0, text=_default, input-type=0, ime-target=false, has-links=false}
|
+---->FrameLayout{id=16908807, res-name=customPanel, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+----->FrameLayout{id=16908331, res-name=custom, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+---->ScrollView{id=16908756, res-name=buttonPanel, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+----->ButtonBarLayout{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4}
|
+------>AppCompatButton{id=16908315, res-name=button3, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+------>Space{id=16909290, res-name=spacer, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+------>AppCompatButton{id=16908314, res-name=button2, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+------>AppCompatButton{id=16908313, res-name=button1, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+-->ViewStub{id=16908678, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|

And that's what you get on API level 22:

View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1026, height=496, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->FrameLayout{id=-1, visibility=VISIBLE, width=942, height=412, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=42.0, child-count=2}
|
+-->FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=942, height=412, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->LinearLayout{id=16908990, res-name=parentPanel, visibility=VISIBLE, width=942, height=412, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4}
|
+---->LinearLayout{id=16908991, res-name=topPanel, visibility=VISIBLE, width=942, height=118, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+----->LinearLayout{id=16908992, res-name=title_template, visibility=VISIBLE, width=942, height=118, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+------>AppCompatImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+------>DialogTitle{id=16908993, res-name=alertTitle, visibility=VISIBLE, width=816, height=71, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=63.0, y=47.0, text=Select default sitemap, input-type=0, ime-target=false, has-links=false}
|
+---->FrameLayout{id=16908998, res-name=contentPanel, visibility=VISIBLE, width=942, height=294, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=118.0, child-count=3}
|
+----->View{id=16909003, res-name=scrollIndicatorUp, visibility=INVISIBLE, width=942, height=3, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----->RecycleListView{id=16909195, res-name=select_dialog_listview, visibility=VISIBLE, width=942, height=294, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+------>AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=942, height=126, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=21.0, text=demo, input-type=0, ime-target=false, has-links=false}
|
+------>AppCompatTextView{id=16908308, res-name=text1, visibility=VISIBLE, width=942, height=126, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=147.0, text=_default, input-type=0, ime-target=false, has-links=false}
|
+----->View{id=16909005, res-name=scrollIndicatorDown, visibility=INVISIBLE, width=942, height=3, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=291.0}
|
+---->FrameLayout{id=16909000, res-name=customPanel, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+----->FrameLayout{id=16908331, res-name=custom, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+---->LinearLayout{id=16908995, res-name=buttonPanel, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4}
|
+----->AppCompatButton{id=16908315, res-name=button3, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+----->Space{id=-1, visibility=INVISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----->AppCompatButton{id=16908314, res-name=button2, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+----->AppCompatButton{id=16908313, res-name=button1, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+-->ViewStub{id=16909171, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|

So, both AppCompatTextView with the demo sitemap in it are wrapped by a RecycleListView, where "demo" ist the first child element. Then comes the different. While API level 27 wrpas this recyclclistview directly into a FrameLayout, api level 22 puts an invisible View with the res scrollIndicatorUp as the first element of the wrapping FrameLout:
View{id=16909003, res-name=scrollIndicatorUp, visibility=INVISIBLE, width=942, height=3, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}

So, the structure is slightly different, but the position of the demo is not 0 in api level 22 anymore, but 1. I think we can work around this by simply asserting, that demo is there and wrapped by a recycle list view?

@mueller-ma
Copy link
Member Author

Yes, we can do that. All the atChild() are autogenerated by the espresso test recorder.

@FlorianSW
Copy link
Member

See #592

@mueller-ma
Copy link
Member Author

@FlorianSW Tests are still failing

@FlorianSW
Copy link
Member

They're not failing for me locally. Can you check that, too?

@mueller-ma
Copy link
Member Author

Also works for me locally via Android Studio.
Rebuild travis...

@mueller-ma mueller-ma closed this Jan 4, 2018
@mueller-ma mueller-ma reopened this Jan 4, 2018
@mueller-ma
Copy link
Member Author

Ran it again and now only one test failes with No views in hierarchy found matching: (with id: org.openhab.habdroid:id/mainmenu_voice_recognition and with content description: is "Voice recognition" and is displayed on the screen to the user). Is it possible that the abi has no gapps?

@FlorianSW
Copy link
Member

Hmm, possible. I'll submit a PR shortly, which will extract this test from the BasicWidgetTest (as it's not a widget test at all, and it makes it easier to skip it), which checks, if Voice recognition is supported/available on the device before running the test suite. With that we can make sure, that voice service is really not available on the AVD and probably change that in some way.

android:
components:
- tools
- build-tools-25.0.2
- platform-tools
- tools
- android-22
- sys-img-armeabi-v7a-android-22
Copy link
Member

Choose a reason for hiding this comment

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

What about adding some extras, which should probably enable voice recognition? However, this is not based on facts, just an idea :P I'm also not sure, which of these extras are already included :/ Also: We should first somehow make sure, that it's related to the play services :D

    - extra-google-google_play_services
    - extra-google-m2repository
    - extra-android-m2repository
    - extra-android-support

Copy link
Member

Choose a reason for hiding this comment

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

Can we somehow check a build with these extras to see, if the voice recognition test is still skipped?

@FlorianSW
Copy link
Member

PR I mean: #609

Signed-off-by: mueller-ma <[email protected]>
Signed-off-by: mueller-ma <[email protected]>
@FlorianSW
Copy link
Member

org.openhab.habdroid.ui.BasicWidgetTest > openHABMainActivityTest[test(AVD) - 5.1.1] FAILED 
	android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (with id: org.openhab.habdroid:id/colorbutton_color and is displayed on the screen to the user)
	If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from one of the following AdapterViews:android.widget.ListView{183a0a3 IFED.VC. ......ID -480,0-0,678 #7f090084 app:id/left_drawer}
org.openhab.habdroid.ui.VoiceRecognitionTest > checkVoiceAvailbility[test(AVD) - 5.1.1] SKIPPED 
	org.junit.AssumptionViolatedException: Voice recognition not available, skipping tests for it.
	at org.junit.Assume.assumeTrue(Assume.java:59)
:mobile:connectedFossDebugAndroidTest FAILED

@FlorianSW
Copy link
Member

Ok, could it be possible, that the colorpicker simply isn't in the view of the user? The colorpicker check uses a ViewInteraction to check, if it is display, instead of looking at the data and checking, that the picker is present. So, when a device, let's say WVGA with 480x800[1] pixel, the colorpicker is not in the view when navigating to the Widget Overview (selecting Widget Overview, btw., wouldn't pass the isDisplayedcheck, too, however, it already uses a data interaction to click on an element, which is not visible to the user already). This is the only thing I can think of at the moment.

[1] Which is, what travis booted up:

$ android list target
Available Android targets:
----------
id: 1 or "android-22"
     Name: Android 5.1.1
     Type: Platform
     API level: 22
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, **WVGA800 (default)**, WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/armeabi-v7a
----------
id: 2 or "android-25"
     Name: Android 7.1.1
     Type: Platform
     API level: 25
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, **WVGA800 (default)**, WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.

@mueller-ma
Copy link
Member Author

@kaikreuzer Can you use @openhab-bot to add this repo on https://codecov.io/ ?

@kaikreuzer
Copy link
Member

I've logged in as openhab-bot and granted access to Github to codecov. When being logged in, I can see the page https://codecov.io/gh/openhab/openhab-android.
What else do I need to do?

@mueller-ma
Copy link
Member Author

Nothing, I'm going to merge this PR when we resolved the failing ci.

@mueller-ma mueller-ma merged commit 3d35de5 into openhab:master Jan 5, 2018
@mueller-ma mueller-ma deleted the codecov-local branch January 5, 2018 13:14
@mueller-ma
Copy link
Member Author

# Emulator Management: Create, Start and Wait
before_script:
- android list device
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a -d "5.4in FWVGA"
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, this doesn't solve the problem itself, it just works around it :/ What happens, if the demo sitemap changes slightly and the widgets we use in this test are again outside of the view?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a check for "exists, but not visible"?

Copy link
Member

Choose a reason for hiding this comment

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

It seems there isn't :/ Then this should be fine for now :D

@mueller-ma
Copy link
Member Author

@kaikreuzer Can you check if codecov is setup correctly? On my fork, where I activeted it, codecov shows up a github check: https://github.com/mueller-ma-bot/openhab.android/pull/1
But here it doesnt: #612

@kaikreuzer
Copy link
Member

@mueller-ma I've just checked: The webhook wasn't yet created, I have done so now.
Hopefully you will see codecov checks on PRs now!

@mueller-ma
Copy link
Member Author

Ok, we will see.

@mueller-ma
Copy link
Member Author

#619 is a new PR, but it doesnt have the codecov check. Maybe you try to install codecov again via https://github.com/integration/codecov

@kaikreuzer
Copy link
Member

Installing it that way isn't possible:

screen shot 2018-01-10 at 09 54 30

Note that openhab-bot does not own any repos. If I create a fork of openhab-android, I can enable it there, but that obviously won't help us.
As you can see on https://github.com/openhab/openhab-android/settings/hooks/19744585, the webhook is active and successfully delivered to codecov.io, so I would have expected that reacts on those (the webhook also has the right to push state information)...

@mueller-ma
Copy link
Member Author

mueller-ma commented Jan 10, 2018

Can you set @openhab-bot as team bot?

@kaikreuzer
Copy link
Member

I've now installed the official Github integration as myself to the org account and activated it on this repo - I hope this now works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Everything related to Bots
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants