Tuesday, May 29, 2012

GSoc 2012: Extension and Integration with External APIs: Week2


Hi 

It has been a week now since the coding period started and I have not
done much work yet, I was spending time with Javascript and jQuery basics.

This week Me, Madhusudan and Mario scheduled  meeting to discuss over
the strategy to integrate present Orcun's code (extended by Madhusudan)
to integrate with melange. Since during the year lot of code has been
pushed to melange I will require to work on merging conflicts and then
look at what the outcomes are in terms of functionality before merging.

Madhusudan has already shared the patches and the  git branch
shipmenttracking for me to work on. This week I will apply patches 
to current melange codebase and will do the  necessary changes to 
make it compatible with Melange.

Monday, May 28, 2012

Initial Connection Model Implementation

Hey all, this week I've been discussing the requirements and details of the model that I'm going to be using to represent both invitations and requests between an organization and a user. We've decided on using a model called GSoCConnection containing reference properties to the organization and the user involved in the request or invitation. Within this model also resides "private" properties to represent the actions taken by either a user or an organization. For example, a user sending a request to become a mentor will cause the user state to become 'mentor_request_accepted' and the org's state to become 'mentor_request_pending', since we'll be waiting on a response. If the org accepts, their action will be changed to 'mentor_request_accepted' and the calling class will be able to call the is_mutual_acceptance() method in order to determine whether the user needs to be promoted.

Right now I've thought up as many states as I think are relevant and added them to my GSoCConnection class as constants with methods to allow for changing the state. Another approach I've been toying with is just writing out methods for each of these to encapsulate some of the logic for determining the states and chaining them with an internal set_state method. I'm going to discuss this idea with Daniel this week and possibly discuss alternatives.

The code for my first implementation of this model can be found here (not the most elegant way to share code, I know). See you next week!

Update: Changed the pastebin link to reflect change to method names per style guide and changed my strategy for supporting states

Melange Functional Testing- Base Module & Test data

Hello everyone, This week i mainly focused on creating a base module Melange_functional_actions.py for the framework. In the base module i defined a base class funcTests which consists of many other methods which will will be used in creating test scripts for different scenarios. e.g:
  1. get_parameters(name_of_workbook)
  2. write_text_field()
  3. wait()
  4. toggle_checkbox()
  5. set_dropdown_list()
  6. wait_and_check_if_displayed()
  7. wait_and_click()
  8. wait_and_enter_text()
  9. wait_and_clear_field()
  10. assert_error()
  11. assert_link()
  12. click_on()
  13. assert_text()
  14. take_screenshot()
  15. clear_field_and_enter_new_data()
  16. setUp()
  17. tearDown()
  18. login()

I am using these methods to re write the test script for Student Registration Test . Student Registration Test has three test cases.

TC01 checks the normal path of registration.
TC02 checks for error messages when empty form is submitted.
TC03 checks for messages when wrong inputs are supplied to registration form, It assert all the messages and provide correct form data for successful registration.

Test data for the test script is here.