Tuesday, August 7, 2012

Melange Functional Testing


This week i worked on creating assertTextIn(), openUrl() and clearDatastore() methods, fixed import order, synchronization problems and changing names of few fields along with others. Major part of the week spent in reading and experimenting, trying to find out how the framework can be improved.

Currently local server starts at a random port and execute the tests, clears the datastore after every test but it has to be improved to get it working even for remote instances. Next week i am planning to improve clearDatastore() method  and start working on suggestions made by Leo.

Monday, August 6, 2012

Anonymous Connections, aka Mentor/Admin Invites

Hey all,
     So as you may (or may not) know, I flew home Monday morning to drive up the the Adirondacks in New York with my family to visit my neighbors and came back very late on Thursday. Incidentally, I had 0 internet or cell phone service for 3 days. None. Zilch. It was incredible. That said while I may have gone 100% dark on you guys, I didn't have a flood of emails waiting when I got back so hopefully you all weren't too mad at me. Better yet, I got a bunch of work done up there; so much that I only missed the timeline by like a day. Which probably should have been longer anyway.

So unfortunately I wasn't able to do the daily snippet emails, so if you'll bear with me and take a peek at my big ol' commit on my connection branch and tell me if I screwed anything up I'd really appreciate it. Style should be ok, I've made an effort to improve it for fear of death by Daniel. The process looks a little like this:

  1. Org admin clicks the "Start Connection" link inside an org homepage and is redirected to the OrgConnectionPage view, which looks pretty much the same.
  2. Admin enters the emails and/or link_ids of users they wish to connect with and clicks the submit button. 
  3. OrgConnectionForm separates the valid link_ids/emails and the emails without any GSoCProfiles to be used by the generate() method
  4. Page displays something like the picture above for all emails that were sent notifications.
  5. The users receives an email with a link that looks pretty much like this: <http://localhost:8081/gsoc/profile/mentor/google/gsoc2009/08b7e441bd0ede68f7b2421bd8e2f6e0>   where that last ugly section is an md5 hash of the AnonymousConnection object created as a placeholder.
  6. The user follows the link, signs in, and is directed to create a GSoCProfile
  7. Once the user clicks submit, the AnonymousConnection object is deleted and replaced with a GSoCConnection object.
  8. Normal interaction with the connection continues from here
All in all, this pretty much took a couple of modifications and a second transaction in OrgConnectionPage, an additional url configuration for gsoc/views/profile, a template and another method in notifications. 

I need to test this on the production server, which brings me to my current situation: my changes are taking effect locally but not on my appengine instance. I tried building with paver again but I'm kinda stuck here and am probably going to need help since complex build phases are not included in my list of string skills (yet :P). If you have a fix and would like to email me I'll keep an eye on it, but I'll probably just end up harassing you all on the conference call tomorrow.