GSOC 2016 : [FINAL] Protractor Test Implementation and Documentation to the Moodle Mobile App

banner-gsoc2016_2

Introduction

This project mainly involves with Moodle mobile app.  The objective of this project is add more tests to the app( MOBILE-1179) and document the set-up process in the Moodle developers wiki. The basements for this project are done and have to complete only the remaining part.

Commits I added to the Moodle Mobile code base can be found here. Since the code is not yet merged to the original repository, I have added the link in my forked repository.

Github branch: gsoc-e2e

Moodle

moodleMoodle is one of the most prestigious and widely-used Free and Open Source Learning Platform in the world today, and has great community support. To get to know basic understanding I followed the guidelines which were mentioned in the Moodle website for GSOC participants. I followed each of these guidelines very clearly and had continuous communication with the mentor Juan Levya. He helped me a lot to come up with the good proposal. So they had been announced four project as selected out of ten project ideas and my proposal has been selected for Add support to end-to-end testing in the Moodle Mobile app 😃. Thanks a lot my mentor Juan Levya and Moodle for giving me this valuable opportunity. He helped me a lot for successfully competed this project.

Protractor

protractorProtractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would. Protractor also speeds up your testing as it avoids the need for a lot of “sleeps” and “waits” in your tests, as it optimizes sleep and wait times. And also allows to find elements based on things like the input’s ng-model or by {{bindings}} on the page or by an ng-repeat element so that you can easily and quickly find the elements that you want to test. Attached the architecture diagram of Protractor below and can easily take some idea.

Documentation

I have been updated Moodle wiki page and added Blog post for the documentation of this project.

Implementation

In the implementation I created separate tests files for each tests scenarios. All the test files should be located under e2e folder in right component. And also tests files end with .spec.js

Github profile: Supun94

Github branch: gsoc-e2e

Ex: If you want to make tests for course search, need to implement tests under course file (www/core/components/course/e2e/course.spec.js)

Here is some brief description about what I have been covered during the GSOC cording period.

Course Searching Test(www/core/components/course/e2e/course.spec.js)

  • User can search courses with valid word count
  • User can not search courses without valid word count

Quiz Test(www/core/components/question/e2e/quiz.spec.js)

  • View question window is available in right location
  • Check whether uder can Attept Questions
  • Continue the last attempt test
  • Check whether what happen when user try questions without submitting answer
  • User can have multiple selection to find out one correct answer
  • User can open test in browser and open new tab and relocated to the Moodle web site

App settings Test(www/core/components/settings/e2e/settings.spec.js)

  • User can click settings page tabs
  • Change general settings in Moodle mobile app
  • Change Space usage settings
  • Change Synchronization settings
  • Change About settings

Course Assign Test(www/addons/mod/assign/e2e/mod_assign.spec.js)

  • View course assign windows is available in right location
  • Click description tab and check whether it’s working or not
  • Click PDF file tab and chek whther new PDF file open from other tab
  • When user Click Add submission button and check whter submission action is working or not
  • Click secondary button

Course Book Test(www/addons/mod/assign/e2e/mod_book.spec.js)

  • Click All sections course book tabs
  • Click Background information course book tabs
  • Can go all the useful links press next and previous icon
  • Click secondary button in useful links
  • Click secondary menu button in useful links
  • Can go all the Video resources press next and previous icon
  • Click secondary button in Video resources
  • Click secondary menu button in Video resources

Course Chat Test(www/addons/mod/assign/e2e/mod_chat.spec.js)

  • Click All sections course chat tabs
  • View course chat windows
  • Click description tab
  • Adding new chat message
  • View chat users
  • Click secondary button

Course Choice Test(www/addons/mod/assign/e2e/mod_choice.spec.js)

  • Click All sections course choice tabs
  • Click Course welcome course choice tabs
  • Click Group Projects and Individual tasks course choice tabs
  • User can manage Prior Knowledge assessment choices
  • User can manage Let’s make a date! assessment choices
  • User can manage Group Projects and Individual tasks assessment choices
  • Click secondary button

Course Folder Test(www/addons/mod/assign/e2e/mod_folder.spec.js)

  • Click All sections course folder tabs
  • View course folder windows
  • Click folder tabs
  • Click secondary button

Course Forum Test(www/addons/mod/assign/e2e/mod_forum.spec.js)

  • Click All sections course forum tabs
  • View course forum windows
  • View course Forum grade test windows
  • Add a new discussion topic
  • Add a new Course discussion
  • Discussions about your group projects
  • Click secondary button

Course Glossary Test(www/addons/mod/assign/e2e/mod_glossary.spec.js)

  • Click All sections course glossary tabs
  • View course glossary windows
  • Click course glossary tabs
  • Search course glossary
  • Click secondary button

Course Filtering(www/core/components/courses/e2e/course_filtering.spec.js)

  • Filter course names by one letter
  • Filter course names if it is single word or part of the word
  • Can delete some Filtered words and again check the current filter course names

Course Participants Test(www/addons/grades/e2e/grades.spec.js)

  • User can see participants page
  • User can see participants list
  • Can click login user tab
  • Can click other specific users tab

Course Final Grade Test(www/addons/grades/e2e/grades.spec.js)

  • User can click course grade button
  • User can see main content of course grades
  • Check the expected final grades of course

Course Contents Test(www/core/components/course/e2e/course_contents.spec.js)

  • User can click course contents button
  • Check the section name tabs, of the course
  • View All section tab content
  • Course welcome section tab content
  • Background information section tab content
  • Analysis section tab content
  • Group Projects and Individual tasks section tab content
  • Reflection and Feedback section tab content

Check that the Forum Post was successfully created(www/addons/mod/forum/e2e/mod_forum.spec.js)

  • Check that the Course discussion post was successfully created
  • Check that the discussions about group projects was successfully created

User can create Notes in a course Test(www/addons/notes/e2e/notes.spec.js)

  • User can click notes icon
  • User can see notes side tabs
  • User can click Site notes tabs
  • User can click Course notes tabs
  • User can click Personal notes tabs

User can see more options in participants section as a teacher(www/addons/participants/e2e/teacher_participants.spec.js)

  • User can see different options in student user
  • User can see different options in teacher user

User can see more options in course content section as a teacher(www/core/components/course/e2e/teacher_course.spec.js)

  • User can see different options in Group Projects and Individual tasks as a teacher

User can see New staff induction test as a teacher(www/core/components/course/e2e/teacher_new_staff_induction_course.spec.js)

  • User can see New staff induction page
  • User can click All sections tab
  • User can click Welcome tab
  • User can click Policies and Procedures tab
  • User can click IT skills tab

User can see course final grade as a teacher(www/addons/grades/e2e/teacher_grades.spec.js)

  • User can click course grade button as a teacher
  • User can see main content of course grades as a teacher
  • Check the expected final grades of course as a teacher
  • Check the expected Group Project test grades of course as a teacher
  • Check the expected Factual recall test grades of course as a teacher
  • Check the expected Dissertation: Fight club test grades of course as a teacher
  • Check the expected Dissertation: A Beautiful Mind test grades of course as a teacher
  • Check the expected Dissertation: Spider test grades of course as a teacher

Course Wiki Test(www/addons/mod/wiki/e2e/mod_wiki.spec.js)

  • View course notes wiki collaborative window
  • View course notes wiki private window
  • Click Fight Club in course notes wiki private window
  • Click A Beautiful Mind in course notes wiki private window
  • Click Spider in course notes wiki private window

Course Label Test(www/addons/mod/label/e2e/label.spec.js)

  • View course label in course content
  • View full content of course label when clicked

Course Resource Test(www/addons/mod/resource/e2e/resource.spec.js)

  • User can click resource tab and landing the resource page
  • Click Open the file button
  • Click secondary button in the resource page

Course Survey Test(www/addons/mod/survey/e2e/survey.spec.js)

  • User can click survey tab and landing the survey page
  • Click the description in the survey page
  • View the survey questions
  • User can select survey responses

Calendar Event Test(www/addons/calendar/e2e/calendar.spec.js)

  • Click the calendar event tab in main menu
  • User can land the calendar event page

Course Notifications Test(www/addons/notifications/e2e/notifications.spec.js)

  • Click the notification tab in main menu
  • User can land the notification page

Course Completion Test(www/addons/coursecompletion/e2e/coursecompletion.spec.js)

  • View course completion inside the course in main page
  • User can land course completion page
  • User can view content of course completion page

Course Files Test(www/addons/files/e2e/files.spec.js)

  • Click the My files tab in main menu
  • User can land the My files page
  • Visit My private files in files page
  • Click upload button in my private files section
  • Click My Pictures tab in my private files section
  • Click essay notes tab in my private files section
  • Visit Site files section in my files page

Blog Posts

During the GSOC period I have updated my personal blog for different aspcts.

Conclusion

First of all I want to thank Moodle Community ,my mentor Juan Leyva for giving me this valuable opportunity and immensely guiding me during the GSOC period. He helped me a lot to clarify the project idea, come up with good proposal and successfully complete the project. During the implementation period I had lot more questions and he gave answers for all of these. I am glad to have such a cooperative mentor.  I got a great exposure with lot more technologies and familiar with Moodle Community.  This was an amazing experience in my life. I’m looking forward to contribute with Moodle in the future and open-source community.

Leave a Reply

Your email address will not be published.