Skip to content

make Espresso test at least build - #2457

Merged
jesmrec merged 2 commits into
owncloud:masterfrom
hannesa2:buildEspresso
Feb 26, 2019
Merged

jesmrec merged 2 commits into
owncloud:masterfrom
hannesa2:buildEspresso

Conversation

@hannesa2

Copy link
Copy Markdown
Contributor

Now it builds at least, but current situation is complete useless

image

@jesmrec

jesmrec commented Feb 21, 2019 •

Copy link
Copy Markdown
Member

These tests are E2E and his validity is scoped. I mean, you need to perform these steps:

  • Create an owncloud server.
  • Set environment variables with the data of the server:
export OCTEST_APP_USERNAME=demo
export OCTEST_APP_PASSWORD=demo
export OCTEST_SERVER_BASE_URL=https://demo.owncloud.com
export OCTEST_SERVER_TRUSTED=3
export OCTEST_APP_USERNAME2=demo
export OCTEST_APP_PASSWORD2=demo
export OCTEST_SERVER_LOOKUP=false

these variables are read from System.env:

// arguments to be passed to functional tests

Once you have the server completely set-up, and a device/simulator plugged (they are instrumented tests), you can trigger them with

./gradlew -Pandroid.testInstrumentationRunnerArguments.class=com.owncloud.android.authentication.AuthenticatorActivityTest connectedAndroidTest —info

These kind of tests are not being very useful and were developed some time ago. We are currently working in a different perspective related with the switch of architecture to Android components, in which we develop isolated tests from each layer, that do not need any further set up, any backend and anything else, so all dependencies are either mocked or faked. So, i recommend not to waste time in these tests, so other better tests are incoming.

@hosy

hosy commented Feb 21, 2019

Copy link
Copy Markdown
Contributor

@jesmrec is it not possible to pass this values by code? If it tests again the server https://demo.owncloud.com why you have to set-up your own server?

@jesmrec

jesmrec commented Feb 21, 2019

Copy link
Copy Markdown
Member

@hosy the parameters there are only an example, because you can use any server (parameters OCTEST_SERVER_TRUSTED and OCTEST_SERVER_LOOKUP let you tell the code different server set ups supported by the tests).

@jesmrec jesmrec changed the title make Esprosso test at least build make Espresso test at least build Feb 21, 2019
@hannesa2

Copy link
Copy Markdown
Contributor Author

So, i recommend not to waste time in these tests

So it's a waste of time to add a gradle task which checks in advance and explain if something is wrong

Ok, when it's that much unimportant, then merge it ! I see it as a pre-task for #2391 (comment)

@davigonz davigonz modified the milestones: 2.11.0, 2.10.0 Feb 22, 2019
@davigonz

Copy link
Copy Markdown
Contributor

LGTM, ready to test @jesmrec

@jesmrec

jesmrec commented Feb 25, 2019

Copy link
Copy Markdown
Member

it works with the new dependencies. Approved

@davigonz

Copy link
Copy Markdown
Contributor

@hannesa2 please rebase and we are done

@michaelstingl

Copy link
Copy Markdown
Contributor

@hannesa2 I granted you permissions to branch in the ownCloud repo directly. Then the team could also do the rebase and merge.

@hannesa2

Copy link
Copy Markdown
Contributor Author

done

@davigonz

davigonz commented Feb 26, 2019 •

Copy link
Copy Markdown
Contributor

This is the next PR to merge, there was a Transifex commit after your rebase, we need a new one, thanks

@hannesa2

hannesa2 commented Feb 26, 2019 •

Copy link
Copy Markdown
Contributor Author

Hey guys, this is no more funny. This is my spare time !

@michaelstingl thanks to give me the right to create branches, so everyone can rebase it 100x times by himself.

Or I like to see a much faster/nervous merge-button-pressing !
Or change this muste-rebase-before behaviour
It needs >5 days from recognize a waste-of-time PR to merge

@jesmrec
jesmrec merged commit 4bb4cc1 into owncloud:master Feb 26, 2019
@hannesa2
hannesa2 deleted the buildEspresso branch February 27, 2019 06:27
@jesmrec

jesmrec commented Feb 27, 2019

Copy link
Copy Markdown
Member

I think that rebasing should be a matter of the PR owner, mainly in case of conflicts. Rebasing will be the way to update branches against master after code review and QA.

@hannesa2

Copy link
Copy Markdown
Contributor Author

Exactly this is annoying and there is room for improvement. The technique does not force to do so, just a policy from maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants