Lisp in Summer Projects - 2013

coming-soon

29 thoughts
last posted Aug. 31, 2013, 2:20 p.m.
0
get stream as: markdown or atom
0

Day 2 - June 25, 2013

Updated version of Font Awesome used to get the new App.net icon.

Added App.net link support.

Added user specified titles to the social links (Twitter, App.net, Facebook, Github and RSS).

Added a CHANGELOG.md.

Updated the initial screenshot to include the App.net link.

0

Day 4 - June 27, 2013

Did some searches and reading about unit and web integration testing in Clojure. Collected some resources.

0

Day 5 - June 28, 2013

Created email validation unit tests with expectations.

Found an improved email regex to use from an issue against the noir project.

Project test planning.

Collected some more testing resources.

0

Day 8 - July 1, 2013

Reading about cucumber.

Added cucumber to the project and wrote a basic initial feature to test the contact model.

Upgraded to Clojure 1.5.1.

Added lein ancient plugin and updated some dependencies.

0

Day 9 - July 2, 2013

Created a substantial more complete set of unit test features for the contact model, particularly around contact creation.

Implemented the step definitions for all the existing feature steps.

Documented how to run the expectations and cucumber tests.

0

Day 10 - July 3, 2013

Editing pass on the README.

Unit testing for the updated-at property of a contact.

0

Day 11 - July 4, 2013

Added lein spell plugin to catch typos in docs and codestrings.

Explored making all the configuration dynamic to support using a different redis configuration for tests, this turned out to be overly complicated, so instead allowed for an ENV environmental variable that when set to "test" uses a different (still static) configuration file.

0

Day 13 - July 6, 2013

Add valid email check in contact model before allowing create, with a test for the same.

Added negative contact exists tests.

Broke out the contact unit tests into separate files.

Wrote the features for delete tests.

Worked out how to get the cucumber data table as a map in the step definition.

0

Day 14 - July 7, 2013

More research on Clojure testing libraries.

0

Day 15 - July 8, 2013

Wrote cucumber features for contact retrieval and listing.

Implemented cucumber steps for contact removal.

0

Day 16 - July 9, 2013

Implemented cucumber steps for contact retrieval.

0

Day 17 - July 10, 2013

Added ring mock to the project.

0

Day 19 - July 12, 2013

Created a check macro which combines assert and is for better cucumber test failure output.

Replaced assert with check in the cucumber steps.

0

Day 20 - July 13, 2013

Added continuous integration to the project with Travis CI.

Added the Travis CI build status badge to the README.

Added Travis CI notification to HipChat.

0

Day 22 - July 15, 2013

Editing pass on the README.

0

Day 23 - July 17, 2013

Cleaned up use of #'s in cucumber features.

Add part of the tests for contact listing.

Filtered out nil from list of referrers.

0

Day 24 - July 18, 2013

Finish the validations in the tests for the list contacts feature.

Created lein test and test! aliases to handle a clean run of all the tests.

A little cleanup on the cucumber features.

0

Day 25 - July 19, 2013

Prototyped an integration test w/ Kerodon. Not impressed. No selectable driver like it's inspiration, Capybara, and so no JS support (from Selenium). This makes it fairly useless.

0

Day 27 - July 21, 2013

Moved test config file setting from env. variable to leiningen profile .

Dealt w/ concurrency issues on Travis CI tests. Dropped back to testing just the Oracle JDK 7.

0

Day 29 - July 23, 2013

Update Carmine to 2.0.0 and update Carmine config to avoid new deprecations.

0

Day 35 - July 28, 2013

Remove lein-expectations from lein project.

Added configurable error response if Redis is not avalible.

0

Day 38 - July 31, 2013

Made the coming-soon Trello board public and linked it from the README with a graphic I made.

Alias lein spell to run with -n flag.

Alias lein ancient to run in the test profile so as not to miss any dependencies.

Did some research on web integration testing approaches.

0

Day 39 - August 1, 2013

Setup Selenium and Phantomjs for headless browser testing.

Created cucumber integration tests for user providing email to the web app.

Start to implement the steps for the cucumber integration tests for user providing email to the web app.

0

Day 40 - August 2, 2013

Update the test config file to have all distinct values for validation.

Start to add the selenium steps to verify landing page render and email submission.

0

Day 45 - August 7, 2013

Update some dependencies.

Added lein test-server to run a ring server in the test profile.

Made a change in the state management of cucumber unit tests.

Fixed the unit tests for updated-at getting updated on a duplicate registration.

Removed the integration test that the updated-at gets updated when a user registers again via the web app.

Researched using Selenium to respond to JS alert dialogs.

0

Day 49 - August 11, 2013

Made lots of attempts at getting Selenium to respond to the alert dialogs. There is clj-webdriver taxi support for alerts now but the PhantomJS driver doesn't support them.

I tried switching over to Firefox which is also supported on Travis-CI but Firefox supports HTML5 so it never gets to the popup as the browser's client-side validation fails before the ClojureScript validation.

I then went down a wormhole trying to validate that the browser's client-side validation failed, which I figured out. Key was that there is a known issue with Firefox 23 and Selenium's executeScript (solved by downgrading to Firefox 22), there is a validity property on the element, and execute-script requires an explicit return in the provided JavaScript to return the validity element or portions thereof.

It's unclear the right direction to go from here. Do perfunctory testing of the validation with PhantomJS and leave it at that, moving on to testing that the contents of the page have been customized properly? Or push on with browser testing of validation, maybe even figuring out how I can regression test on other browsers.

Definitely hitting diminishing returns with this project becoming overly tested. But a key goal is learning about testing with Clojure which is still happening.

0

Day 54 - August 16, 2013

Reworked the lein aliases to remove some repetition.

Updated carmine dependency.

Made some REPL use notes.

Added starting a web server to Travis CI config.

Setup (browser-up) function to work for PhantomJS, Chrome or Firefox.

0

Day 55 - August 17, 2013

Simplified the user providing email integration test to the parts that it can check and fixed an issue in the test w/ not clearing out the email address from failed attempts. Extended the wait to 2 secs. since web server may be slower on Travis.

Ran first integration tests on Travis. Didn't work since lein ring server-headless blocks running the server. Travis' before script doesn't run in its own process so its then dead.

Some Googling led to starting the server with a simple Unix & to force the web server into the background.

Once the web server was sorted out, the Selenium web driver couldn't find the phantomjs binary.

Figured out through slow trial and error where Travis-CI's phantomjs binary is (/usr/local/phantomjs/bin/phantomjs) and configured driver to use that phantomjs (and mimic'd it locally).

Finally have phantomjs running in the Travis cloud properly but it fails to see the thank you message on the successful submissions. Reworked the timing there and added some more content validation tests to try to determine what's going on. Not successful and not clear what's different locally vs. on Travis.

0

Day 69 - August 31, 2013

Did some dependency updates and noticed that lein ancient wasn't warning me of out of date plug-ins. Checked it's page and saw that's an option, and that I wasn't giving lein ancient permission to tell me about qualified releases. Updated the alias to support those things and updated a bunch of dependencies.

Re-tested on IE7 to see if the JS error is gone w/ latest cljs. It's not.

Commented out the phantom-js tests that work locally but not on Travis CI so the tests are passing again. Need to decide to replace those with real browsers from Sauce or with just mocked requests. The mocked requests could answer if things rendered on the page from the config file (part of what's being tested, but not if the cljs code is working to make the (admittedly very simple) interactions on the page work. The mock requests would work for the admin testing as well.