Skip to content

Disqus support #13

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

Merged
merged 82 commits into from
Jan 4, 2016
Merged

Disqus support #13

merged 82 commits into from
Jan 4, 2016

Conversation

freskoulix
Copy link
Contributor

Added Disqus comments support into selenium tests

  • Merged all previous work
  • Added support to comment through Disqus during compilation of examples
  • Prepared the code for production

Tests

Tests, located at: tests directory, are separated into three categories:
common/ which contains tests for the live site
compile_tester which contains tests for sketches that belong to user: cb_compile_tester
libraries which contain tests for the examples in /libraries page

Logs

Logs are produced at: logs/ directory. During each test circle, a json log file is produced, containing a timestamp on its filename.

Reports

Reports are produced at: reports directory. A report is a symmetric difference between the last two logs, current-previous (if available), or else all the current log.

Data

data/ directory contains configuration options in json format, used in tests.

Disqus

The comments through Disqus are updated at examples, during the compilation of an example with all its set of boards and at libraries when all its examples are finished with testing.

Brandon Duffany added 30 commits February 23, 2015 01:51
This commit introduces tests for the following pages:
- /libraries
- /user/cb_compile_tester

It tests that every single sketch compiles. For the latter, we keep
a log of all successes and failures in the logs directory.
For some reason, it appears that the vast majority of cb_compile_tester's
sketches are failing to verify. Not sure yet whether that's something to do
with the script, or whether those sketches actually have errors.
Removes an unnecessary time.sleep invocation that was used for debugging.
Fixed broken tests due to bug in `temp_copy`.
The following tests are currently flaky:
- TestLibraryExamples.test_compile_all_libraries (fails _sometimes_ with
  exception 'window.selectedBoard is undefined')
- TestHome.test_login (passes _always_  when run on its own, fails _always_ when
  run with other tests)
Conflicts:
	tests/sketch/test_sketch.py

Also, this commit fixes a minor issue with `tests/sketch/test_sketch.py`
Create a Dockerfile which bootstraps an Ubuntu image so that
it can run our tests.
tox now successfully runs, but the selenium webdriver does not
actually work. Possibly, we should change the webdrivers to be
remote webdrivers.
Sigh... there are bugs with the python33 implementation of Selenium's remote webdriver.
In particular, I was experiencing bizarre serialization issues.
The error was very similar to this: https://code.google.com/p/selenium/issues/detail?id=6199
but it was happening for Firefox as opposed to Chrome.
This allows us to take advantage of SauceLabs as well as docker-selenium,
among other things. Exciting stuff!
- Added function to generate reports after compilations tests
- Added function to throttle between compilations
- Added Disqus comment support during compiles
@freskoulix
Copy link
Contributor Author

@dastergon Can you have a look?

from time import gmtime
from time import strftime
from urlparse import urlparse
import json
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a redundant import since simplejson is used below

Module is not used anywhere in tests.
…imeout.

(useful for compiles of examples).

Tests stop after 2.5 hours of testing.
To resume, the last available log is loaded and tests continue the compiles
when more urls are left to follow compared to the loaded log.
. all good
F for compile failure at least in one board
O for open failure
E for error (exception thrown) during compile
U for unsupported sketch/example (its required boards list is an empty list at boards_db.json

The last compile that failed some way,
affects the status of the indicator.
freskoulix added a commit that referenced this pull request Jan 4, 2016
@freskoulix freskoulix merged commit 4dfa82d into master Jan 4, 2016
@freskoulix freskoulix deleted the disqus-support branch February 24, 2016 16:24
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.

3 participants