Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Write Installer/Updater screenshot tests #2935

Closed
robocoder opened this Issue · 17 comments

3 participants

@robocoder
Collaborator

The last big missing functionnality not yet tested is our Installation process, as well as the update process.

Let's add screenshot tests for:

  • Installer process
  • Upgrade to GIT repo from 1.0

The result will be that we always know whether installation + update to latest Piwik work. This will result in more agility and ability to release new versions faster.

@robocoder
Collaborator

(In [5866]) refs #2935 - remove broken webtests =P

@robocoder
Collaborator

(In [5992]) refs #2935 - re-enable JavaScript (hack)

@robocoder
Collaborator

(In [5993]) refs #2935 - add delay for form to auto-post

@robocoder
Collaborator

(In [6007]) refs #2935 - simulate auto-post form

@mattab
Owner

It is really critical for our QA process to re-enable the Webtests on Jenkins.

@Anthon would you have an estimate for this task? is it half day or 2 days work? :)

@robocoder
Collaborator

Much more than 2, I suspect -- a lot of web tests were disabled.

Moreover, the ticket involves rewriting all the web tests.

We would switch to either PHPUnit+Mink or Behat+Mink. Using Mink will give us more driver choices, eg Selenium (or Selenium2) for pages with JavaScript (eg testing software update), and non-Selenium drivers for non-JavaScript pages (eg login).

@robocoder
Collaborator

(oh another option is phpspec + mink)

@mattab
Owner

It sounds really hard and might never happen.. :(

Maybe we could find a workaround to re-enable at least the install/update tests which were an incredibly useful part of our QA toolset... ?

Is there a way to make the existing tests work again using selenium? I remember the problem was about Javascript files/Jquery not being executed properly to click on some buttons?

@robocoder
Collaborator

the javascript engine used by HtmlUnit couldn't handle the dynamic changes to the DOM. I'm subscribed to the webtest mailing list and we are not the only ones feeling the pain.

It might be nice to use Behat+Mink. I've already done work here to parallelize Selenium testing.

@mattab
Owner

Webtests are not that critically important, compared to getting Jenkins back to working. Decreasing priority...

Anthon, do you reckon I should create a ticket for Jenkins setup?

@mattab
Owner

Many times our sql update code wasn't failure-friendly and would fail when re-executed as it left the DB in a half-updated state.

Having the following test would ensure that all future update scripts written are working in a failure scenario.

A new idea for a webtest:

Download 1.8.3 release
Download latest
Run Auto update - but make sure the auto update code fails at the last step
Re-run auto update: the code should still run and the SQL not fail. For this, some queries will throw exceptions which must be specifically ignored, eg. "1060 Duplicate column name 'xx'" can be ignored for an ALTER that adds a column.
The update re-running after initial failure should succeed. 
@mattab
Owner

I've been told we should use Webdriver eg. https://github.com/facebook/php-webdriver

and we could run the test on Travis CI as well.

If anyone is fluent in webdriver/selenium, please contact me at matt@piwik.org :)

@mattab
Owner

Consolidating milestones FTW

@diosmosis
Collaborator

In 50742af: Refs #2935, add installation UI test, allow no fixture to be specified for screenshot test and fix following installation process regressions:

  • pending events should be executed after all plugins successfully loaded so plugin order in config file is unimportant
  • do not set piwikUrl on View instances if the DB cannot be connected to
  • create Twig instance when clearing template cache instead of new View
@diosmosis
Collaborator

In f05c080: Refs #2935, fixing Installation UI test.

@mattab
Owner

@capedfuzz well done on adding those tests. Please close the ticket if it's fixed :)

@mattab
Owner

Feedback:

@robocoder robocoder added this to the 2.2.1 - Piwik 2.2.1 milestone
@diosmosis diosmosis was assigned by robocoder
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@diosmosis diosmosis Refs #2935, add installation UI test, allow no fixture to be specifie…
…d for screenshot test and fix following installation process regressions:

- pending events should be executed after all plugins successfully loaded so plugin order in config file is unimportant
- do not set piwikUrl on View instances if the DB cannot be connected to
- create Twig instance when clearing template cache instead of new View
50742af
@sabl0r sabl0r referenced this issue from a commit in sabl0r/piwik
@diosmosis diosmosis Refs #2935, fixing Installation UI test. f05c080
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.