GSoC Coding Week 2 Report – Systers

Fon Noel Nfebe 2018-05-29 Programming

So it was a successful week one. I believe week one will constitute the most challenging week of the entire summer as week two was smoother and more work was done! 12 new tests significantly more advanced were introduced as compared to 8 in the last week. As mentioned in my last blog, every week for the rest of the summer I shall publish a change log. Here is coding week 2's change log report.

Overview

Project Name : Infrastructure Automation – Systers Portal

Repository : Systers Portal Repository -GitHub

Task(s) : Transfer base, login and admin tests from automated-testing repo to portal repository (main task)

Issue : #407

Status : Completed 

Task description

As a continuation of my task for GSoC which again,  is about decentralizing (from automated testing repo) tests for the portal into its own repository. Which constitutes moving/rewriting (in python) all tests in the automated testing repository (written in Java) to the portal repository as explained in week one. Coding week 2 continues this task and in particular, more tests were moved or rewritten in python, new non-existent tests where also written. Automated tests affecting the whole portal app including Base tests (contact page test, homepage test etc), tests for Authentication-Pages and Admin/Logged-in user actions were moved from here to here. As mentioned 12 new tests where introduced.

What has changed

+12 new selenium automated tests have been introduced into the portal repository for the base pages, authentication, users and admin actions. please watch this 6 minutes video for details.

 

Challenges

Again, with computers, we are only limited by how much we know or can imagine as we have endless possibilities. In week two I however face much fewer chanllenges as the ground framework for work to be done has already been laid.

Testing WYSIWYG with Selenium:

Since WYSIWYG text editors and in our case CKEditor very often introduce iframes which are essentially new windows or pages different from the current context, it's a little tricky to deal with them. We a little research and the provision of context (browser) switching in selenium the challenges were waved.

I leave you with this needless piece of code! See you next week!

def test_can_goto_thank_you(self):
    self.browser.get('%s%s' % (self.live_server_url, '/thanks_for_reading'))
    self.browser.find_element_by_xpath("//a[contains(text(),'Close Article')]").click()
    self.assertTrue('Come Back Next Time' in self.browser.title)

 

Similar Post You May Like

Advertisement

Recent Posts

Advertisement