Merge lp:~canonical-platform-qa/webapps-core/x-test into lp:webapps-core
| Status: | Merged |
|---|---|
| Approved by: | Alexandre Abreu on 2015-04-20 |
| Approved revision: | 120 |
| Merged at revision: | 113 |
| Proposed branch: | lp:~canonical-platform-qa/webapps-core/x-test |
| Merge into: | lp:webapps-core |
| Diff against target: |
446 lines (+409/-9) 4 files modified
README (+104/-7) webapp-amazon/manifest.json (+15/-2) webapp-amazon/tests/autopilot/amazon_webapp/__init__.py (+138/-0) webapp-amazon/tests/autopilot/amazon_webapp/test_amazon_webapp.py (+152/-0) |
| To merge this branch: | bzr merge lp:~canonical-platform-qa/webapps-core/x-test |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Alexandre Abreu (community) | 2015-02-12 | Approve on 2015-04-20 | |
| Canonical Platform QA Team | 2015-02-14 | Pending | |
|
Review via email:
|
|||
Commit Message
Added an initial selenium + autopilot test for a webapp. It runs locally, on qemu and on the phone.
| Federico Gimenez (fgimenez) wrote : | # |
| David Barth (dbarth) wrote : | # |
Would you have a rebuild handy for Trusty? Like app developers should, I
try to stick to Ubuntu LTS for development tasks.
On Mon, Feb 16, 2015 at 10:36 AM, Federico Gimenez <email address hidden>
wrote:
> Some inline comments, thanks!
>
>
> Diff comments:
>
> > === modified file 'README'
> > --- README 2013-09-13 08:20:52 +0000
> > +++ README 2015-02-14 05:29:25 +0000
> > @@ -1,9 +1,106 @@
> > -This package provides a set of default web application versions for
> popular web services.
> > +Core Webapps
> > +============
> > +
> > +This package provides a set of default web application versions for
> popular
> > +web services.
> >
> > The debian package itself serves 2 purposes:
> > -- generate click packages in a clean environment, that can be
> integrated with the rest of our toolchain
> > -- package a set of icons for the webapps, while click doesn't support
> icons directly (temporary)
> > -
> > -To generate the click packages directly, ie without the debian package:
> > -
> > -./build.sh
> > +- generate click packages in a clean environment, that can be
> integrated with
> > +the rest of our toolchain
> > +- package a set of icons for the webapps, while click doesn't support
> icons
> > +directly (temporary)
> > +
> > +Building the click packages
> > +======
> > +
> > +To generate the click packages directly, ie without the debian package::
> > +
> > + $ ./build.sh
> > +
> > +Running the user acceptance tests
> > +======
> > +
> > +Run tests locally
> > +-----------------
> > +
> > +The tests need an updated selenium package and the oxide webdriver::
> > +
> > + $ sudo add-apt-repository ppa:canonical-
> > + $ sudo apt-get update
> > + $ sudo apt-get install python3-selenium oxideqt-
> > +
> > +To run the user acceptance tests from the source branch::
> > +
> > + $ cd webapp-
> > + $ autopilot3 run --config from_source amazon_webapp
> > +
> > +Run tests in the phone
> > +------
> > +
> > +First flash the phone with developer mode enabled::
> > +
> > + $ ubuntu-device-flash --developer-mode --password 0000 \
> > + --channel=
> > +
> > +When the phone is flashed, complete the welcome wizard.
> > +
> > +To run the user accceptance tests into an Ubuntu phone with a read-only
> image::
> > +
> > + $ adt-run --click-source webapp-amazon/ \
> > + --click
> build/com.
> > + -o /tmp/adt-
> > + --setup-commands \
> > + 'mount -o remount,rw /' \
> > + --setup-commands \
> > + 'apt-add-repository -y ppa:canonical-
> > + --setup-commands \
> > + 'apt-get --no-list-cleanup update -o
> Dir::Etc:
> > + --setup-commands \
> > + 'sync; sleep 2; mount -o remount,ro /' \
> > + --- ssh -s adb -- -p 0000
> > +
> > +Run tests in a virtual machine
> > +------
> > +
> > +The user acceptance tests also can be run against a built and installed
> click
> > +package, under qemu. To do so,...
| Leo Arias (elopio) wrote : | # |
David, I'm not sure what build are you asking for. Doesn't ./build.sh work on trusty?
I only have vivid here.
| Leo Arias (elopio) wrote : | # |
Replied and pushed to federico's comments.
| Federico Gimenez (fgimenez) wrote : | # |
Thanks Leo, some inline comments, cheers!
| Federico Gimenez (fgimenez) wrote : | # |
One inline comment, all working now :)
| Alexandre Abreu (abreu-alexandre) wrote : | # |
Could we make the webapp agnostic bits (chromedriver related, PageObject, etc.) in an emulator?
| Leo Arias (elopio) wrote : | # |
Do you mean, to move the things that will be common to all the webapps to a module that all of them can share?
Yes we can, but we will need to package those common bits into a deb. It can be called something like webapp-
I imagine that shared package will have a base test class, a base page object, and all the helpers to get chromedriver running.
It will get a little weird if they are in the same branch though, because adt-run will use the archive to install dependencies in the test bed, so if a test needs an update in the common helpers, the common helpers will have to be pushed to the archive first before being able to run the new tests.
Does that answer your question? Or did I miss the point?
| Leo Arias (elopio) wrote : | # |
woohoo \o/
Let us know if you need some help from us extracting the pieces that will be common to all the apps. Well, actually, let Julien know :)

Some inline comments, thanks!